Currently, ASP. The two main ways to develop in NET are: ASP. WebForm and ASP.
How to develop WebForm
• Server-side controls
• General Handler +html static page +ajax
• General Handler +html template
WebForm model
WebForm Advantages
1, support event model development. Thanks to the rich server-side components, webfrom development can quickly build Web applications
2, easy to use, easier to get started
3. Rich Control
Webfrom Disadvantages
1, the package is too strong, a lot of bottom things let us beginners do not understand
2, easy to get started, improve difficult
3. Complex life cycle models are not easy to learn.
4, control is not flexible
5, ViewState processing
How ASP. NET MVC is developed
• Release of the first open source project in 2009
• More concise, closer to the original "request-process-response"
• More development, more new features, community activity
• Does not replace WebForm
• The bottom is the same as the WebForm. Different treatments on the pipe.
MVC is Microsoft 2009 's first open source presentation layer framework, which is Microsoft's first open source project
MVC is not intended to replace Webfrom development, but is another option for web development
Why do you want to learn ASP.
30 years after the inception of the MVC architecture pattern, it has been re-launched in the development community because of its good loose coupling, ease of expansion, and high maintainability. As Microsoft's new framework for Web site development, ASP. NET MVC provides a new development model that perfectly supports the classic MVC architecture model. Provides a completely different development experience for. NET Engineers.
A growing number of companies and developers are starting to join the MVC development model, bringing him into a state of rapid development, and now that MVC has become a common development model under ASP. It allows you to learn a completely different architecture, so this is a development skill that we have reason and need to master.
ASP. NET MVC Learning route
The basics of C #, ADO, HTML, JavaScript, ASP. WebForm
Introduction to MVC
MVC pattern two kinds of comprehension: one is the expression pattern, the other is the schema pattern. Here I mainly understand it as a manifestation pattern.
It divides the application into three main components, namely: View Controller (model)
M:model is primarily a component that stores or processes data, and is actually implementing the business logic layer to the corresponding database operations of the entity class, such as:
CRUD (C:create/r:read/u:update/d:delete). It includes application information such as data, validation rules, data access, and business logic. ViewModel: View model
V:view is a user interface layer component. The main focus is to show the data in the model to the user. ASPX and ascx files are used to handle the responsibilities of the view.
C:controller handles user interaction, obtains data from the model and passes the data to the specified view
Expression pattern (ui/presentation pattern) three characters
Model: The component used to store data
View: Components for content presentation based on model data
Controller: Accept and process user instructions (Operation model), select a view and output content
MVC Request Model
MVC Benefits
1, it is easy to divide the complex application into M, V, c three component models. Effective simplification of complex architectures through model, view, and Controller, which embodies a good isolation principle
2, because no server-based forms are used. So we programmer control more flexible, page clean
3, you can control the generation of custom URLs. For SEO-friendly URLs is a cinch
4, strong type view implementation, more secure, more reliable, more efficient.
5, let Web development can focus on a certain layer. More conducive to the division of cooperation for large-scale architecture development
6, many enterprises have used MVC as a project development framework, recruitment clearly requires familiarity with the MVC development model, I am now doing project architecture is mvc+ef+wcf+ ...
MVC code and pages are completely detached, webform:codebehind technology does not completely separate the code and the foreground page
Personal feeling: Since I contacted MVC, I don't want to drag the controls anymore ...
ASP. MVC4 Getting Started 1-asp. NET two ways to develop