Chapter 13. ASP.NET MVC

Availability: Framework 3.5 SP1 Onward

ASP.NET MVC is Microsoft's implementation of a tried and tested architectural pattern. MVC separates an application's user interface, logic, and data, and it makes it easier to test, extend, and maintain. MVC stands for Model View Controller. If you were to map these terms to a traditional ASP.NET/database application (and they don't map exactly), you might consider the following:

  • Model would be the database.

  • View would be the pages and controls.

  • Controller would manage the interaction between the pages/controls (view) and the database (model).

So, is MVC a replacement for web forms that you know and mostly love? Although some people will argue that ASP.NET MVC will replace the web forms model, I don't think this is true or is Microsoft's intention. Both web forms and MVC have their own advantages, and judging by the enhancements made to ASP.NET in this release, web forms are still going to be around for the foreseeable future. So at the moment, MVC is another way, not the way, of creating web applications on the Microsoft .NET platform.

I would argue that ASP.NET MVC is a bad choice for some types of applications. If you are designing an application with a rich and complex user interface, development with web forms is much easier with built-in handling of state and events. Of course, you could develop such an application with ASP.NET MVC, but I expect it would take longer.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.137.223.190