The application of MVC in Web framework

Source: Internet
Author: User

The three main parts of MVC are defined as follows:

Model: A model is a class that describes a problem domain that is of interest to the program designer, which typically encapsulates the data stored in the database, as well as the code that operates the data and executes the business logic of the particular domain.

in ASP. NET MVC, the model is like a data access layer with a tool that includes the Entity Framework or the

Custom code for specific domain logic is combined with nhibernate.

View: A template that dynamically generates HTML pages

Controller: A special class that coordinates the relationship between a view and a model. It responds to user input, talks to the model, and decides which view (if any) to render. in ASP. NET MVC,

This class file is usually represented later by the prefix controller

Attention

It is important to keep in mind that MVC is a high-level architectural pattern, and its use depends on the specific application environment. The context of the ASP. NET MVC is the problem domain (a stateless web environment)

and host System (ASP).

Many of the core policies that ASP. NET MVC relies on are the same as those used by other MVC platforms, plus the benefits of the compiled and managed code it provides, and the new features that take advantage of the language, such as

Lambda expressions, dynamic, and anonymous types make them a powerful development framework. However, in essence, ASP. NET incorporates some of the basic principles used by most MVC-based web frameworks:

A, contract better than configuration (conversion over config)

b, no repetition (aka dry principle)

C, try to keep pluggable (pluggability)

D, to help developers as much as possible, but allow developers to freely play when necessary

The application of MVC in Web framework

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.