ATL ALT.NET

A community in Atlanta dedicated to helping each other learn and apply the best of .NET technologies...
ALT.NET

MVC

Modified: 2008/09/21 02:50 by jsgough - Categorized as: MVC
MVC stands for Model-View-Controller. This is a design pattern described in the Gang-of-Four book Design Patterns.

In terms of .NET development, Scott Guthrie has been blogging about the ASP.NET MVC Framework for quite some time now as of July, 2008. The framework is part of the ASP.NET 3.5 extensions.

To look at some real-world examples of how people are using the ASP.NET MVC framework already, see this InfoQ story:

http://www.infoq.com/news/2008/05/following-mvc

This links to Rob Conery's MVC Storefront series, in which he is both educating and learning about MVC applications and TDD:

http://blog.wekeroad.com/mvc-storefront/

Edit

Notes

The following excerpt from http://quickstarts.asp.net/3-5-extensions/mvc/MVCOverview.aspx describes the precise pain point that ASP.NET MVC addresses, as compared to ASP.NET Web Forms:

"In addition to managing complexity, the MVC pattern makes it easier to test applications than it is to test a Web Forms-based ASP.NET Web application. For example, in a Web Forms-based ASP.NET Web application, a single class is used both to display output and to respond to user input. Writing automated tests for Web Forms-based ASP.NET applications can be complex, because to test an individual page, you must instantiate the page class, all its child controls, and additional dependent classes in the application. Because so many classes are instantiated to run the page, it can be hard to write tests that focus exclusively on individual parts of the application. Tests for Web Forms-based ASP.NET applications can therefore be more difficult to implement than tests in an MVC application. Moreover, tests in a Web Forms-based ASP.NET application require a Web server. The MVC framework decouples the components and makes heavy use of interfaces, which makes it possible to test individual components in isolation from the rest of the framework.

The loose coupling between the three main components of an MVC application also promotes parallel development. For instance, one developer can work on the view, a second developer can work on the controller logic, and a third developer can focus on the business logic in the model."

Edit

Key Resources

http://en.wikipedia.org/wiki/Model-view-controller Wikipedia entry about MVC and its historical context

Edit

Additional Resources

ScrewTurn Wiki version 2.0.31. Some of the icons created by FamFamFam.