1. Prerequisites

Source: Internet
Author: User

Part 1 quick development platform

If you have never been familiar with ASP. netmvc and need to understand every concept independently before using them comprehensively, start from the first part. No matter whether you have learned some tutorials on your website (http://www.asp.net/mvc), you will find that each chapter in the first section is very easy to understand. But never think that the first part is just for beginners. We will quickly learn how to create the first Asp.net
MVC project, and a deep understanding of all the core concepts of Asp.net MVC.

Before you start to learn the first part, you need to install ASP. NET mvc4 and Visual Studio 2012. (Or earlier Visual Studio 2010 ).

Chapter 1. As a beginner, we will learn the basic concepts of the MVC model and the implementation of ASP. net mvc. Chapter 2 will show you how to implement a classic hello
World. Next, Chapter 1 describes the view basics in MVC, including creating a strong view model and some features of the razor view template. Chapter 2 introduces the basic concepts of controller: request processing, form submission, and data transmission to views.

Once you have mastered the basic concepts of ASP. netmvc, you can start learning Part 1 with confidence and learn more comprehensive knowledge points in Part 2.

Chapter 2 Introduction to ASP. NET MVC

 

Content summary

  • Asp.net Development History
  • MVC mode description
  • New Features of Asp.net mvc3/4

 

ASP. net mvc is a web development framework based on the Microsoft. NET platform. It can help developers build well-structured web applications. In addition to ASP. NET
In addition to web form Technology, Microsoft introduces another alternative technology. Since the first preview version was released in 2007, it has been growing rapidly. Today, many large web applications are implemented using ASP. net mvc.

Although Microsoft has been committed to improving web development tools and frameworks for a long time, Asp. in terms of code cleanliness, separation of concerns, and testability, net MVC has greatly improved on the basis of previous improvements.

In this chapter, we will briefly learn the development history of the Microsoft Web development platform and the MVC design pattern. Finally, we will introduce some new ASP. net mvc features. If you have used a previous version of Asp.net
MVC, you can jump to Chapter 1 to learn.

Well, now let's take a brief look at the development history of Microsoft's Web Development Technology Based on the. NET platform.

1.1 Preparation Content

When developing Web applications on the Microsoft platform, you may experience more or less the following pain points, depending on when you start developing web applications. In the 1990s S, developers used executable programs running on servers to develop interactive websites. These programs (CGI (Common
Getaway interface (Common Gateway Interface) is a common technology at the time. It receives Web requests and creates HTML responses. Templates are specially customized, making it very difficult to develop, debug, and test programs. In the late 1990s S, Microsoft released ASP (Active
Serverpage), ASP introduces a template for Web applications. The server page is a mixture of HTML scripts and dynamic scripts. Although this is a great improvement, the server page is very bloated, and this mixed encoding method reduces the readability of the program.

In 2002, Microsoft released the first. NET Framework version. Compared with traditional ASP development, it was a great change.

1.1.1. NET platform

. NET is an improvement for programmers who are familiar with ASP development using dynamic scripts .. NET introduces several programming languages that can be compiled into intermediate languages and run on CLR. In the beginning, these languages include C #, visual
Basic. NET and J #. All are strongly typed languages.

These languages are also changing. In. NET Framework 4.0, the following languages are available:

  • C #4
  • VB. NET 10
  • F #

In addition to these languages,. Net 4 introduces a new dynamic Language Runtime (DLR) that allows dynamic languages to run on CLR. These languages include ironruby and ironpython (open-source implementation of Ruby and Python programming languages .) Some Characteristics of DLR are also applicable to traditional static language, such as C #. Figure 1.1 shows the relationship between different languages on the. NET platform.

Figure 1.1. Net Language and CLR relationship

In addition to programming languages ,. net Framework also released the framework class library (FCL), which contains a large number of types developed in various fields and ASP. net class library is only a part of this set.

1.1.2 ASP. NET web form)

ASP. NET web forms are the first web development framework built on the core Asp.net class library. Compared with the previous ASP development technology, ASP. NET is very different.

Web forms are built around the event-driven page lifecycle. Different events are triggered during page rendering. Developers can write code at different times of the page lifecycle (corresponding to different events. User interface elements are defined as controls. Each control is self-rendered and has its own events. If you use VB6 or Windows
Programmers of form development must be familiar with this development method. However, it is difficult for traditional Web developers to accept it at the beginning, it encapsulates HTTP details and tries to force a stateful model on Stateless web.

At the beginning of the web form release, the server-side event lifecycle made newsgroups often pay attention to these activities: Confused developers how to find "unpredictable" events and add a small amount of code to these events, to drive the page work. Viewstate is introduced in the web form at the same time, making you feel that the entire model is stateful (actually stateless ).

This sounds good. viewstate reduces the complexity of software development. However, the page starts to grow (up to several hundred KB), because the status of the entire application must be stored in the output of each page. The best development method is ignored because it is similar to visual
Studio is a development tool that encourages data access logic (If SQL queries) to be embedded in the page background code. Perhaps the biggest evil of the web form framework is that everything is tightly coupled in the system. Web namespace. You cannot perform unit tests in the background code file. We can see that some legacy web forms applications, the code in the page_load method may exceed the length of several pages. Although earlier versions of the web form model have some disadvantages, ASP. NET and. NET are becoming more and more powerful. net
Framework still occupies a large market share, and many websites are developed using ASP. NET. It has been proved that when ASP. NET and IIS run on windows, they can easily support many complex web applications in big data centers.

The publication of the ASP. net mvc framework keeps ASP. NET technology leading the web application development field.

 

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.