O'Reilly logo

ASP.NET MVC 2 in Action by Matthew Hinze, Eric Hexter, Jimmy Bogard, Ben Scheirman, Jeffrey Palermo

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required