001.MVC Basic Overview

Source: Internet
Author: User

The basic concept of MVC

Scenarios (methods) for developing Web applications under a. NET Platform

Scenario A:
ASP. WebForm
1.web form: bloated (FAT) low performance advantages: There are many Web controls available that can be easily interacted with the server (database)
What to do: see PPT5

2.html: Clean (thin) high performance disadvantage: You can only use HTML elements [client control] ajax+ custom handlers

3.razor pages Clean (thin) high performance benefits: Using HTML client controls
Original: Razor! Convenient and server-side interaction: HTML helper Methods do not support attempted state

Scenario b:ajax+ Custom Handler (Front Controller scenario)
What to do: see PPT5

Add:
Website performance: The page itself has a big impact so big
Pages: different templates for pages


Scheme c:asp.net mvc[standard MVC Microsoft Official MVC]
What to do: see PPT5

Scenario D: Custom mvc[diverse, mixed]


Problem:
What are the scenarios for developing Web applications under the 1..net platform?
2. How each scenario is implemented (how to do) performance development efficiency
3. What are the pros and cons, prevalence, trends
Scenario 1:webform (1-3) (early)
Scenario 2:ajax+ Custom Handler (3-1) (interim)
Scheme 3:asp.net mvc[standard MVC Microsoft Official MVC] (2.5-2.5) (current)
Scenario 4: Custom mvc[diverse, mixed]????

Model-view-controller (MVC)

Advantages of MVC:
MVC facilitates parallel development, facilitates code reuse and maintenance
-MVC, it's a good implementation.
1. Separation of the presentation layer from the data layer
2. Separation of the presentation layer from the logical layer
3.MVC applications These three builds are loosely coupled

The drawbacks of MVC:
Early design trouble, relatively low performance [non-layered, non-partitioned components]
MVC is not suitable for small or medium-sized applications, and is ideal for Web applications supported by large developer teams and for web designers who require extreme control over application behavior.

Where to use:
Suitable for large projects in medium-and large-scale projects that require extreme (all-round) control of the project
Not suitable for small, medium and medium sized projects

Habitual indicators:
Time, code volume, difficulty: 1 People 5 years 5 people 1 years

How to use:
MVC is a software architecture model, a conceptual architecture, a theoretical guide, and abstract success!
Specific: MVC's concrete implementation, there are many
ASP. NET MVC is a concrete implementation of MVC's concrete success!

ASP. NET MVC and ASP. NET Web comparison:
Both ASP. NET MVC and ASP. NET Web Forms are building Web applications
Their underlying platform is the same, all of it. NET Framework (Platform)
ASP. NET MVC does not support view state (Web control is not available, Web control events are not available)->web forms are special Web controls

How MVC works:
Note: URLs in ASP. NET MVC
Special: Form http//....../Controller name/method name
Default:
1.URL request comes directly into controller
2.Controller fetching data from model (model may go to database)
3.Controller Select the appropriate view to client based on business logic
4.View Back to Client


MVC includes the following components:
1. Model: (Model class, entity class, Entity model Class)
Typically contains model classes and data access classes (data contexts)
2. View: User interface
Input submission, output display
3. Controller: Get input from view, process,
will take the output to the view or feedback to the model store

001.MVC Basic Overview

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.