During the years that classic ASP and ASP.NET have existed, developers have learned to build applications based on web forms, session state, and server-side controls. But, the ability to dynamically route web server calls, create applications that separate logic from the user interface, and be easy to unit test are harder to build.
For these reasons, Microsoft is preparing an alternative to "traditional" ASP.NET development. This new technique is called ASP.NET MVC, short for the well-known model-view-controller pattern. Currently, ASP.NET MVC is in the public beta stage, with Beta 1 from October 2008 being the latest available version.
When designing ASP.NET MVC, Microsoft has focused on four main areas:
- Clear separation of concerns
- Support for Test-Driven Development (TDD)
- Fine-grained control over HTML and JavaScript
- Intuitive URLs
Before showing you ASP.NET MVC, let me provide a word of caution. The code listings in this article are based on Beta 1. So, they might not directly work once the final version comes out.
Separating Logic from the Representation
The MVC pattern was designed to help developers write applications that have the user interface (the representation, or the view) separated from the logic of the application. In the MVC pattern's case, the logic lives in the controller, which in turn can access data stored in the model. The model is a representation of a data object, such as a class holding information about a customer. Commonly, the model's data is read from a database.
Read the Rest of this Article at Developer.com