Beginning ASP.NET MVC 4

Book description

By now you'll have heard of ASP.NET MVC. This exciting new approach to developing ASP.NET web applications has taken the development world by storm over the last few years. Now a mature technology suitable for mainstream use, its adoption has exploded in recent times.

Until recently, ASP.NET MVC was regarded as an advanced technology only suitable for experienced developers with a strong knowledge of classic ASP.NET and C# coding behind them. This book overturns that prejudice and shows that the beautiful simplicity of ASP.NET MVC is just as suitable for novice developers venturing into real-world application design for the first time.

With the aid of a fully worked demo application this book explains and demonstrates for you the three pillars of MVC in action. You'll see howthe Model, View and Controller patterns work together in a compliementary manner to provide MVC's powerful results.

There's never been a better time to learn how to use ASP.NETMVC 4. The technology will speed your development times, reduce the verbosity of your code and simplify your application designs all at once. Take the first step towards ASP.NET MVC mastery with Beginning ASP.NET MVC 4.

What you'll learn

  • How to get started with ASP.NET MVC. What tools and components you'll need and how to download and set up the demo application on your system.

  • Understand the details of the MVC pattern with deep-dives into each of the Model, View and Controller elements supported by working code showing them in action.

  • How to apply and extend the MVC patterns to real world solutions: adding AJAX and jQuery, validation and securing user data, testing and deploying the finished application. All of these are discussed and demonstrated.

  • Who this book is for

    This book is written for readers with basic ASP.NET expertise, such as you might gain from reading Beginning ASP.NET 4.5 in C#. You should be familiar with the underlying structure of ASP.NET applications and comfortable following examples that are underpinned with straight-forward C# code.

    If you've just found your feet with ASP.NET and are looking to take the next step on the road to mastery then this is the book for you.

    Table of contents

    1. Title Page
    2. Dedication
    3. Contents at a Glance
    4. Contents
    5. About the Author
    6. About the Technical Reviewer
    7. Acknowledgments
    8. Introduction
    9. CHAPTER 1: Introducing ASP.NET MVC 4
      1. What Is ASP.NET?
      2. ASP.NET Web Forms
      3. ASP.NET Web Pages
      4. ASP.NET MVC
      5. Summary
    10. CHAPTER 2: Installing ASP.NET MVC 4
      1. Software Requirements for ASP.NET MVC 4
      2. Installing ASP.NET MVC 4 Development Components
      3. Installing ASP.NET MVC 4 Server Components
      4. Visual Studio Application Templates
      5. Anatomy of an ASP.NET MVC 4 Internet Application
      6. Summary
    11. CHAPTER 3: The “Have You Seen Me?” ASP.NET MVC 4 Web Application
      1. Description of the Application
      2. Creating the ASP.NET MVC 4 Sample Application
      3. Creating the Database
      4. Summary
    12. CHAPTER 4: Controllers
      1. The Routing Engine
      2. Creating Controllers
      3. Working with Action Methods
      4. Summary
    13. CHAPTER 5: Views
      1. Understanding View Engines
      2. Working with Views
      3. The Rendering Process
      4. Understanding the Razor View Engine
      5. Working with HTML Helper Methods
      6. Working with ViewData and ViewBag
      7. Working with Strongly Typed Views
      8. Introducing ASP.NET MVC 4 Mobile Features
      9. Summary
    14. CHAPTER 6: Models
      1. What Are Models?
      2. Creating the Data Model
      3. Adding a Business Model
      4. Adding View Models
      5. Understanding Model Binding
      6. Summary
    15. CHAPTER 7: Data Validation
      1. The Validation Workflow
      2. Manual Validation
      3. Validation with Data Annotations
      4. Creating Custom Data Annotations
      5. Summary
    16. CHAPTER 8: Ajax and jQuery
      1. Introducing jQuery
      2. Understanding Unobtrusive JavaScript
      3. Working with Ajax
      4. Working with JSON
      5. Introducing Web API
      6. Summary
    17. CHAPTER 9: Security
      1. Authentication and Authorization
      2. Securing Controllers and Action Methods
      3. Authenticating with External Sources
      4. Implementing Membership and Roles
      5. Securing ASP.NET MVC Applications Against External Attacks
      6. Summary
    18. CHAPTER 10: Routing
      1. Routing Concepts
      2. Creating Custom Routes
      3. Creating a Catch-all Segment
      4. Adding Constraints to Routes
      5. Understanding When Routing Is Not Applied
      6. ASP.NET Routing vs. URL Rewriting
      7. Reading Parameters from the URL
      8. Generating Links and URLs
      9. Summary
    19. CHAPTER 11: Testing the Application
      1. Understanding Unit Testing
      2. Examining the Test Project
      3. Running Tests
      4. Testing Business Models
      5. Testing Controllers
      6. Testing Routes
      7. Summary
    20. CHAPTER 12: Deploying the Application
      1. Preparing the Application for Deployment
      2. Deploying to an In-House Server
      3. Deploying to Windows Azure
      4. Summary
    21. Index

    Product information

    • Title: Beginning ASP.NET MVC 4
    • Author(s):
    • Release date: June 2013
    • Publisher(s): Apress
    • ISBN: 9781430257523