Table of Contents
Preface
Chapter 1: ASP.NET MVC
Chapter 2: Your First ASP.NET MVC Application
Chapter 3: Handling Interactions
Chapter 4: Components in the ASP.NET MVC framework
Chapter 5: Routing
Chapter 6: Customizing and Extending the ASP.NET MVC Framework
Chapter 7: Using Existing ASP.NET Features
Chapter 8: AJAX and ASP.NET MVC
Chapter 9: Testing an Application
Chapter 10: Hosting and Deployment
Appendix A: Reference Application— CarTrackr
Appendix B: ASP.NET MVC Mock Helpers
Appendix C: Useful Links and Open Source Projects Providing Additional Features
Index
- Chapter 1: ASP.NET MVC
- Model-view-controller
- View
- Controller
- The ASP.NET MVC framework
- Driving goals of the ASP.NET MVC framework
- Comparing ASP.NET MVC and ASP.NET Webforms
- Choosing between ASP.NET MVC and ASP.NET Webforms
- Summary
- Model-view-controller
- Chapter 2: Your First ASP.NET MVC Application
- Creating a new ASP.NET MVC web application project
- What's inside the box?
- Strong-typed ViewData
- Creating a new view
- Unit testing the controller
- Summary
- Chapter 3: Handling Interactions
- Creating a form
- Creating a form using HTML
- Creating a form using HtmlHelper
- Handling posts
- Request variables
- Updating objects from request variables
- Action method parameters
- Handling file uploads
- Creating an upload form
- Creating an upload controller action
- Using the ModelBinder attribute
- Using the default ModelBinder
- Creating a custom ModelBinder
- Validating data
- Summary
- Creating a form
- Chapter 4: Components in the ASP.NET MVC framework
- The ASP.NET MVC request life cycle
- The RouteTable is created
- The UrlRoutingModule intercepts the request
- The routing engine determines the route
- The route handler creates the associated IHttpHandler
- The IHttpHandler determines the controller
- The controller executes
- A ViewEngine is created
- The view is rendered
- Extensibility
- Route objects
- MvcRouteHandler
- ControllerFactory
- Controller
- ViewEngine
- View
- The model in depth
- Creating a model
- Enabling validation on the model
- The controller in depth
- Creating a controller
- Rendering data on the response
- Reading data from the request
- Action method selection
- Handling unknown controller actions
- Action method attributes
- The view in depth
- Location of views
- Creating a view
- Master pages
- View markup
- Partial views
- Action filters
- IAuthorizationFilter
- IActionFilter
- IResultFilter
- IExceptionFilter
- Summary
- The ASP.NET MVC request life cycle
- Chapter 5: Routing
- What is ASP.NET routing?
- ASP.NET routing versus URL rewriting
- UrlRoutingModule
- Route patterns
- Defining routes
- Parameter constraints
- Catch-all routes
- Routing namespaces
- Combining ASP.NET MVC and ASP.NET in one web application
- Creating URLs from routes
- Summary
- Chapter 6: Customizing and Extending the ASP.NET MVC Framework
- Creating a control
- Creating a filter attribute
- Creating a custom ActionResult
- Creating a ViewEngine
- Summary
- Chapter 7: Using Existing ASP.NET Features
- Session State
- Reading and writing session data
- Configuring session state
- TempData
- Membership, authentication, and authorization
- Configuring web site security
- Implementing user and role based security in a controller
- Configurable authentication options
- Caching
- Globalization
- Resources
- Using local resources
- Using global resources
- Setting language and culture preferences
- Resources
- Mixing ASP.NET Webforms and ASP.NET MVC
- Plugging ASP.NET MVC into an existing ASP.NET application
- Plugging ASP.NET into an existing ASP.NET MVC application
- Sharing data between ASP.NET and ASP.NET MVC
- Building views at compile time
- Summary
- Session State
- Chapter 8: AJAX and ASP.NET MVC
- Different AJAX frameworks
- XMLHttpRequest
- JavaScript Object Notation (JSON)
- ASP.NET AJAX
- ASP.NET MVC AJAX helper
- Working with JsonResult
- jQuery
- jQuery syntax
- Using jQuery with ASP.NET MVC
- Working with JsonResult
- Using jQuery UI
- Summary
- Different AJAX frameworks
- Chapter 9: Testing an Application
- Unit testing
- Unit testing frameworks
- Hello, unit testing!
- Generating unit tests
- Testing the action method
- Mocking frameworks
- Testing the Login action method
- Mocking ASP.NET components
- Testing routes
- Testing UpdateModel scenarios
- Summary
- Unit testing
- Chapter 10: Hosting and Deployment
- Platforms that can be used
- Differences between IIS 7.0 integrated and classic mode
- Hosting an ASP.NET MVC web application
- Creating a wildcard script map in IIS 7.0
- Creating a wildcard script map in IIS 6.0
- Modifying the route table to use file extensions
- Summary
- Appendix A: Reference Application— CarTrackr
- CarTrackr functionality
- Home page
- Login screen
- List of cars
- Car details
- Refuellings list
- Data layer
- Linq to SQL model
- Repository pattern
- Dependency injection
- How CarTrackr controllers are built
- Using Unity for dependency injection
- ASP.NET MVC Membership Starter Kit
- Form validation
- ASP.NET provider model
- Unit testing CarTrackr
- Unit tests in CarTrackr
- Mock repository
- Summary
- CarTrackr functionality
- Appendix B: ASP.NET MVC Mock Helpers
- RhinoMocks
- Moq
- TypeMock
- Appendix C: Useful Links and Open Source Projects Providing Additional Features
- Information portals
- ASP.NET/MVC
- Aspdotnetmvc.com
- DotNetKicks.com: Articles tagged with ASP.NET MVC
- Blogs
- Open source projects providing additional features for the ASP.NET MVC framework
- ASP.NET MVC Design Gallery
- MVC Contrib
- xVal validation framework
- ASP.NET MVC Membership Starter Kit
- XForms
- jQuery for ASP.NET MVC
- Simple ASP.NET MVC controls
- Alternative view engines
- Spark view engine
- NHaml view engine
- NVelocity view engine
- Example ASP.NET MVC applications
- MVC storefront
- FlickrExplorer
- Yonkly
- Kigg
- CarTrackr
- Information portals



