ASP.NET MVC5 Web Development Framework
Author/XinLi Wu [Issue Date: 2015/8/5]
Microsoft proposed the Web development concept named ASP.NET Web Form, which caused a web development revolution. Gradually it became the industry mainstream. Now Code Behind has replaced the previous Web development framework. Now the ASP Code separates the program code and page design, thereby giving us the option for a division of labor between artists and programmers and paving the way for further breakthroughs in web development technology.
To give users more choices in the development of web technology, Microsoft proposed MVC ASP.NET 1 in 2009. MVC is the abbreviation standing for Model, View, and Controller. A very important point here is the separation of concerns. This allows developers to focus on just the things that need their attention thus making the web development simpler.
What is MVC?
MVC was first proposed by Reenskaug Trygve in 1978. It is a software design pattern which was invented at the Xerox PARC Laboratory for the programming language Smalltalk. Its application is divided into three parts: View, Controller, and Model, and which is based on this three tier architecture. In addition to following these development principles, developers can expand into more layers, such as Service, Repository and others.
Separation of Concerns
As long as developers adhere to the three-tier architecture principles when they are developing they will easily understand and benefit from the principle of separation of concerns. The principle of separation of concerns is to separate the Model, View and Controller, solving their complex logic individually and reducing complexity dramatically. Thus developers can focus on some things that need their attention and easily to maintain the program and its quality.
Convention over Configuration
A large project is usually developed by a team. Teams usually formulate a standards that team members must comply with when developing the software, like specifications and standards for programming habits and naming methods. This helps facilitate maintenance and modification later. MVC is using this idea to replace the software design specifications that have been established and making all developers follow one specification for writing their programs. A View name corresponding to a Controller name must be placed in the Views directory; the Controller name must be added to the end of Controller when writing the program. So once the developer uses this specification to write programs, they can quickly understand other MVC projects.
The Difference Between MVC and Form Web
The Superiority of Web Form
Event Model: Event-driven model of Web Form provides a large number of available events to developers which are convenient for writing programs.
State Management: Via the From Web's view state and server control, it can reduce the complexity of managing states.
Web-based Architecture: Integrated to the Web with the source code of Code Behind by using Web Form, convenient for making general working pages.
Rich Controls: ASP.NET association provides a large number of server control and subassembly, to help developers reduce their development time.
The Superiority of MVC
Separation of Concerns: By using the principle of separation of concerns, ASP.NET MVC divides programs into several parts which are not continuous and loose, such as Model, Controller, and Viewt, making the program easier to maintain.
More control for HTML: MVC ASP.NET clearly increases control for HTML which is in front-end.
Moving to test-oriented development: It can build projects and test projects by using ASP.NET MVC. The developer can create unit tests for each action within a program, making testing easier.
There is a very big difference between ASP. NET MVC and ASP.NET Web Form, but these two web develop models are built based on the same ASP.NET Framework, so existing Web Formfunction can be used to develop MVC programs and experience with Web Form can be applied to MVC development. For example, member qualification, validation, roles, configuration, and many other functions operation in the same way in MVC and in Web Form programs.
MVC ASP.NET does not use the view state to maintain state information, therefore functions that rely on view status cannot be used, such as GridView, Repeater, DataList and other controls. These cannot run on MVC. MVC also lacks a page life cycle and event driver.
Key version's date table
MVC's Life Cycle
MVC's Life Cycle
ASP.NET MVC provides a new choice for web developers. During the past few years, most companies have choosen MVC to develop web pages. MVC releases a new version annually. MVC doesn't necessarially replace the Form Web technology, rather both have their advantages and disadvantages. Developers must assess those advantages and disadvantages then make their own choice.
2. Dark Thread
3. ASP.NET's key report
4. The aesthetics of ASP.net MVC5's Web development—Mr Zhu, Chuan Xing Chen, YuMin Wang