Chapter 11. The Model-View-Controller Pattern

The Model-View-Presenter pattern is fine for small client applications or for migrating older Web Form applications into a new, testable platform. However, MVP falls short of providing developers a solid framework for cogent separation of concerns. To this end, the Model-View-Controller (MVC) pattern is an ideal framework for delivering a structured, testable UI model. In Chapter 9 we reviewed the evolution of MVC, beginning with the initial design by Small Talk, and exploring its most recent incarnation within the Ruby on Rails framework. This chapter explores the web MVC designed Microsoft applications, focusing on the March 2009 release for ASP.NET.

In this chapter, we will:

  • Discuss the merits of web MVC and how it compares to other models

  • Begin exploring the ASP.NET MVC framework

  • Build a UI front end for a mortgage loan application using ASP.NET MVC

Back to Basics

Let's face it, if you've had the opportunity to examine a few different MVP programs, you've likely found that they can be unpredictable. That's because MVP is a pattern, not really a framework. The Model-View-Presenter pattern is popular as much for its flexibility as it is for its testability. However, flexibility has its costs. Since each developer makes their own decisions about how and where their entities should be developed, you inevitably find that each MVP-driven program has its own flavor and its own quirks. What the user interface world really needs is a less flexible ...

Get Professional Enterprise .NET now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.