Getting Started with ASP MVC5

Source: Internet
Author: User

Reference "ASP. MVC5 Advanced Programming" version 5th

1th. Introduction to the introductory 1.1 ASP. NET MVC

ASP. NET MVC is a framework for building Web applications that applies the general MVC (Model-view-controller) pattern to the ASP.

MVC is a powerful and concise way of separating application concerns (for example, separating data access logic from display logic).

MVC divides the user interface of the application into three main parts: Interface,ui.

    • Model: A set of classes that describe the data to be processed and the business rules that modify and manipulate the data.
    • Views: Defines how the application user interface is displayed.
    • Controller: A set of classes used to handle communication from the user, the entire application flow, and the specific application logic.

In ASP. Three major parts of MVC are defined in the following general words:

    • Models: typically encapsulate data stored in a database, as well as code that operates on that data and executes specific domain business logic.
    • View: Dynamically generate templates for HTML pages
    • Controller: A special class between the Reconcile view and the model. It responds to user input, talks to the model, and decides which view (if any) to render. in ASP. NET MVC, this class is typically represented later by the prefix controller.

The context of ASP. NET MVC is the problem domain and the hosting system.

ASP. NET MVC Development history

    • March 2009, ASP. NET MVC 1 released
    • In March 2010, ASP. NET MVC 2 was released with the new API features: Support for partitioning large applications into domains
    • The main features of ASP. 3 are: Support Razor view, support. NET4 data Annotations, Global action filter supported
1.1.1 ASP. MVC4 Overview

The purpose of designing ASP. NET MVC is to create a Web site, so the entire platform is designed with a clear goal: responding to browser requests and returning HTML

The main features of ASP. NET MVC 4 include the Web API

1.Web API Features:
    • Routing: It maps HTTP verbs to controller operations as agreed. This makes the code easy to read and encourages restful service design.
    • Model binding and validation: the same process as MVC simplifies mapping input values (form fields, Cookies,url parameters) to model values, and the Web API automatically maps request values to models. The binding system has good extensibility.
    • Filter: Adds behavior to the action.
    • Scaffolding: You can quickly add a Web API controller based on the entity class framework model.
    • Simple single-no-test: This is like MVC, where Web APIs are built on the concept of dependency injection and avoiding global state use.

Some new concepts and models:

    • HTTP programming Model: Provides a strongly-typed HTTP object model, HTTP status code, and easy-to-access headers.
    • Action scheduling based on HTTP verbs
    • Content negotiation
    • Code-based configuration
2. Display mode

Displays requests based on the browser, using the agreed method to select different views

3. Bundle code and Tiny frames

Reduce the number of requests sent to a site by merging several requests into one request through a merge script reference.

It also takes a variety of techniques to compress packet sizes, such as shortening variable names, deleting spaces and annotations, etc.

1.2 ASP. MVC5 Overview

The main features of ASP: MVC5

    • One ASP
    • ASP. NET Identity
    • Attribute Routing
    • Filter: Adds behavior to the action.
    • Asp. NET Base frame
    • ID Card Filter
    • Filter Overrides

Reference "ASP. MVC5 Advanced Programming"

Getting Started with ASP MVC5

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.