Why Asp.net MVC?
Together with the introduction of asp.net 3.5 is asp.net MVC. MVC stands for Model – View – Controller. Asp.net MVC introduces a totally new way for asp.net web application development over the traditional way of using web forms.
One crucial difference between the two approaches is web forms use web server controls while asp.net MVC does not. While web forms help developers hiding away from html writing tasks, asp.net MVC gives developers the capability to totally control over html code. Asp.net MVC applications don’t have all the additional stuff such as html element ids, view state, and let developers decide exactly what html tags to be render on web pages.
By separate the code into Model, View, and Controller, Asp.net MVC gives the application the capability to follow Separation of concerns (SoC) model, which is a crucial aspect in object oriented programming.
By avoiding the use of web forms and web server controls, a MVC application can follow test driven development (TDD) technique that give it the capability to be testable for early error elimination.
Traditional web form applications make developers difficult to get the exactly html element names and ids created by web server controls. By totally controlling the html out put of web pages, including those names and ids, asp.net MVC applications are more easily used with client-side script.
By default, Asp.net MVC applications use clean, extensionless URLs which could well serve SEO purposes. When programming with web forms, extensionless URLs only can be achieved through an additional step of URL rewriting, which requires extra work of creating and handling errors.
Asp.net MVC doesn’t use ViewState, which can be quite large on applications using web forms. As a result, web pages become much lighter and load faster.
MVC model is not something new. It has been applied by many other programming languages. Programming web applications by using web forms with help of server controls is certainly an advantage. How ever, both web form and Asp.net MVC have good points and bad points. When exist together, they contribute to the comprehensive of .net framework, give more options to develop web applications to the best.
Tags:asp.netmodel – view – controllerseparation of concerns
