ASP.NET Tutoria...login
ASP.NET Tutorial
author:php.cn  update time:2022-04-11 14:18:18

Introduction to MVC


ASP.NET MVC Tutorial


ASP.NET is a tool for creating web pages and websites using HTML, CSS, JavaScript and server scripts development framework.

ASP.NET supports three different development modes:
Web Pages (Web pages), MVC (Model View Controller model-view-controller), and Web Forms (Web Forms).

This tutorial introduces MVC.

# #Web Forms
Web Pages
MVC


MVC Programming Pattern

MVC is one of the three ASP.NET programming patterns.

MVC is a pattern for creating Web applications using MVC (Model View Controller model-view-controller) design:

  • Model (model) represents the application Core (such as a database record list).

  • View displays data (database records).

  • Controller handles input (writes database records).

The MVC pattern provides full control over HTML, CSS, and JavaScript simultaneously.


##MVC pattern defines a web application

Model (Model) is the part of the application that handles application data logic.
Usually the model object is responsible for accessing data in the database.

View (View) is the part of the application that handles data display.
Usually views are created based on model data.

Controller is the part of the application that handles user interaction.
Usually the controller is responsible for reading data from the view, controlling user input, and sending data to the model.

MVC layering helps manage complex applications because you can focus exclusively on one aspect at a time. For example, you can focus on view design without relying on business logic. It also makes application testing easier.

MVC layering also simplifies group development. Different developers can develop views, controller logic, and business logic simultaneously.


Web Forms vs. MVC

The MVC programming pattern is a lightweight alternative to traditional ASP.NET (Web Forms). It is a lightweight, highly testable framework that integrates all existing ASP.NET features, such as master pages, security, and authentication.


Visual Studio Express 2012/2010

Visual Studio Express is the free version of Microsoft Visual Studio.

Visual Studio Express is a development tool tailored for MVC (and Web Forms).

Visual Studio Express includes:

  • MVC and Web Forms

  • Drag and Drop Web Controls and Web Components

  • Web server language (Razor uses VB or C#)

  • Web server (IIS Express)

  • Database server (SQL Server Compact)

  • Complete Web Development Framework (ASP.NET)

If you have Visual Studio Express installed, you will Learn more from this tutorial.

If you want to install Visual Studio Express, please click one of the following links:

Visual Web Developer 2012 (Windows 7 or Windows 8)

Visual Web Developer 2010 ( Windows Vista or XP)


27.jpg with three logical layers:



Business layer (model logic)

Display layer (view logic)

Input control (controller logic)

##After you install Visual Studio Express for the first time, you can Install patches and service packs by running the installer again and simply click on the link again.
lamp.gif


ASP.NET MVC Reference Manual

At the end of this tutorial, we provide the complete ASP.NET MVC Reference Manual For your review.