Thursday, January 31, 2013


ASP.Net MVC provides an alternative to Web Forms for building web applications on the .Net platform. As an alternative to Web Forms, ASP.Net MVC takes a different approach when it comes to structuring web applications. This means user won't deals with ASPX pages and controls, postbacks or view state, or complicated event lifecycles. Instead, user has to define controllers, actions, and views.
Benefits of ASP.Net MVC
  • Closer to the protocol
    While ASP.Net Web Forms attempts to completely hide the stateless nature of HTTP, ASP.Net MVC doesn't. The model is also drastically simplified - gone are the complex page lifecycle events of Web Forms, and the abstractions over HTTP are minimal.
  • Separation of concerns
    While ASP.Net Web Forms tightly coupltes the user interface to its code-behind, ASP.Net MVC encourages a design where the user interface (the view) is kept seperate from the code that derives it (the controller).
  • Testability
    By separating applicaiton logic from the user interface, ASP.Net MVC makes it easier to test individual components in isolation. Unlike Web Forms, MVC controllers do not have a direct dependency on the infamously untestable HttpContext class and instead rely on an abstraction, which makes it far easier to write automated unit tests.
Whats new in ASP.Net MVC 3/4
MVC 3 and 4 comes with many improvements and several new features in addition to the new dependency on .Net 4. These new features include
  • The Razor view engine
  • Package management with NuGet
  • Improved extensibility
  • Global action filters
  • Dynamic language features
  • Partial page output caching
  • Ajax improvements
  • Enhancements to the validation infrastructure
  • Mobile templates
  • Web API

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.