Chapter 4. Controller basics
This chapter covers
- Understanding the controller anatomy
- Storyboarding an application
- Mapping the presentation model
- Using input from the browser
- Passing view metadata
- Testing the controller
The focus of the Model-View-Controller pattern is the controller. With this pattern, every request is handled by a controller and rendered by a view. Without the controller, presentation and business logic would move to the view, as we’ve seen with Web Forms.
With the ASP.NET MVC Framework, every request routes to a controller, which is simply a class that implements the IController interface. Microsoft provides the base class System.Web.Mvc.Controller to make creating a controller easy. Which controller base class you ...