The Advantages of ASP.NET MVC

 

In October 2007 Microsoft announced its new technology Asp.Net MVC( Asp.Net Model-View-Controller) which is based on MVC architecture. MVC pattern is not new pattern, it is there from 1978 itself. Microsoft developed Asp.Net MVC platform based MVC pattern. You can find Asp.Net MVC as part of Microsoft Visual Studio Framework.

 

Asp.Net MVC has many advantages as compared with traditional Web forms technologies like Asp.Net. Today we discuss about Asp.Net MVC advantages as compared with traditional Asp.Net.

 

  • As we know in traditional Asp.Net web application, every server control renders as HTML control in UI. But it is very difficult to get required HTML output based on our requirements, because of this it is very difficult to apply CSS styles. Through Asp.Net MVC we have full control on single bit of HTML, so we can apply CSS easily. Asp.Net MVC provides clean Separation Of Concern(SOC).

 

  • Traditional Asp.Net uses the View State between every request to maintain the state, so every request carries bulk of View Sate which is in Kilo of bytes and more between client and server. Asp.Net MVC does not have any View State, it is stateless platform. So developer is responsible to maintain state between requests.

 

  • Asp.Net MVC does not have Post back every time it is new requirement.

 

  • Traditional Asp.Net does not have clean URLS, it contains page name .aspx for every page. If you want clean URL's you have to define your own URL rewriting functionality. Asp.Net MVC contains clean URL's by default.

 

  • Asp.Net MVC supports Test Driven Development(TDD) where as in normal Asp.Net it is very difficult to write Unit Test Cases.

 

  • Asp.Net MVC is light weight platform because it does not have View State concept, so it is very powerful in performance wise.

 

  • Asp.Net MVC divides into three parts, those are Model, View and Controller. Whenever Asp.Net MVC application receives the request, first it passed to Controller and Controller contacts Model and renders View. Controller handles all business functionality, Model handles all data request(means Model connects the database for data) and View renders the data in UI. So Asp.Net MVC has clear separation between layers, because of this maintaining the Asp.Net MVC application very easy as compared with traditional Asp.Net.

 

  • Asp.Net MVC supports all required features of Asp.Net.

 

  • Asp.Net MVC supports easy integration with Javascript frameworks.