ASP. NET 5 overview (ASP. NET 5 Overview)

Source: Internet
Author: User
Tags hosting http 2

Http://www.asp.net/vnext/overview/aspnet-vnext/aspnet-5-overview

ASP. 5 Overview ( ASP 5 Overview )

Original: Tom Fitzmacken (2014/11/12)

Translator: MIS2000 Lab. (www.dotblogs.com.tw/mis2000lab/)

ASP. 5 Introduction

The ASP. NET 5 is a refined one. NET stack (lean. NET Stock) is used to build modern web applications. We build from the bottom up, and provide an optimized development architecture for a variety of applications, you can build applications in the cloud or run both on this computer. The. NET Framework contains modular components for a variety of minimum energy consumption (minimal overhead) gives you the flexibility to build all kinds of solutions.

ASP. NET 5 contains the following features:

• New, flexible and cross-platform operation (runtime).

L New, modular HTTP request pipeline (pipeline).

L real-time available cloud environment settings.

L Consistent design module with MVC, Web API and Web pages (translator annotations: This is a Web program written using the razor syntax, not the same as the ASP. NET Web Form).

L can see the difference between the previous and the previous versions without rebuilding the project.

L Complete correspondence (side-by-side). NET Framework versions.

L can operate on IIS or a self-built host (self-host).

L New tools for Visual Studio 2015.

• Open source code (source) on GitHub.

The changes we make to ASP. NET 5 are derived from customer requests and feedback. These changes are designed to make Web application development, host deployment (hosting, hosting) and maintenance easier.

Your legacy application can operate on new versions of ASP without any need for a different action. However, to use the benefits of the new ASP. NET 5 feature, you will need to transfer the existing program code to the new schema. You will find a lot of similarities between ASP. NET 5 and previous versions of ASP. So the program code transfer only needs to fix some specific issues instead of having to rewrite the application completely.

Download Visual Studio Preview

please download Visual Studio Preview (http://www.visualstudio.com/en-us/downloads/ Visual-studio-2015-downloads-vs Download vs 2015 preview), new features on vs 2015 can be found in http://www.visualstudio.com/en-us/news/ Vs2015-preview-vs

Why redesign ASP ?

Requires a more flexible, cross-platform operation

In the past, the. NET framework was a single, inclusive (all-encompassing) Full installation. With. NET each version of the evolution, the functionality is only new but rarely deleted, so the capacity of the architecture is soaring. This approach ensures installation. NET each of the Windows hosts can support all types of. NET applications, but it also means that each application inherits many of the features it has never used.

If a. NET technology requires significant updates, even if you do not directly use this part of. NET, you will also receive a notification that advises you to update. You have to decide whether you want to install this update, you may tolerate an outage of the server, or you ignore this update, and hopefully the part you ignore happens to be useless.

The ASP. NET 5 gives you greater flexibility to perform in the following three operating scenarios:

    1. 1. the complete . NET CLR

The complete. NET CLR is a project that is scheduled to work in Visual Studio. It provides the entire set of APIs and is the best choice for backwards compatibility with various versions.

    1. 2. Core CLR(cloud-optimized runtime)

The core (kernel) CLR is a refined, fully modular operation (runtime) that is used on the 5 projects of ASP. This CLR has been redesigned as a component so that you can elastically include the parts you need inside the application. You can add components through NuGet. When you're done, your app uses only the functionality you need (without having to package hill Haiti into full functionality). By re-factoring the runtime into its own separate components, because each component's updates can have its own time, we can provide some components that need to be improved more quickly (translator Note: Individual updates, which do not need to wait until all improvements have been made). As a result, the core kernel CLR is very thin and only 11MB in size, not the full 200MB. NET CLR. The core CLR can be deployed with your application, and the core CLR of different versions can work side-by-side (both of these benefits are described in more detail below).

    1. 3. Cross-platform CLR

In the future, we will release the cross-platform runtime on Linux and Mac OS X operating systems. When released in the future, these versions of runtime will develop and run. NET applications on Mac and Linux devices. We will work closely with the mono community on these cross-platform CLR issues. When it is published, you will be able to use the mono CLR as a cross-platform development. For more information, see the ASP. NET Vnext app on the development Mac.

In the default scenario, the new Visual Studio project uses the full. NET CLR. You can also define the core CLR within the set properties of the project (for example).

the ubiquitous Host

ASP. NET 5 allows you to subordinate your application to IIS or to its own host (self-host). When you lock (confirm) The Core CLR, you can bind your own software suite for each application you are about to deploy. Therefore, your application and the suite it relies on are completely independent (self-sufficient, self-contained) and no longer depend on the system (pre-installed). NET version. In the near future, any type of device or host platform will be able to execute your application.

This new feature gives you more freedom. We still recommend that IIS be the best choice for hosts, but in some cases you may need to use a different host platform. Now, you only need to deploy your project to that host. Your host properties are no longer tied to the developed schema, and vice versa.

If you want more examples, you can see the Create a Web API in MVC 6.

Complete Correspondence ( Side-by-side ) different versions of . NET Framework

When an application on a server relies on a single, fully installed. NET Framework, all applications must perform the same version. NET is fine. Consider whether you want to upgrade to the new version of the. NET framework, which can cause your discomfort. Perhaps, you want some applications to use the latest. NET version, but you cannot determine whether all legacy applications can be followed by a new one. NET works together.

Fortunately, ASP. NET 5 solves this problem. You can define dependencies within the "deployed software suite" yourself, so you can define what it needs for each application. NET version. You get the benefits of the latest version of the app, and you can easily get some applications to run with older versions. A variety of different versions. NET can run Side-by-side and without any problems. To run different versions, you must lock the core CLR.

Simplify Correlation ( Simplify dependency Management )

ASP. NET 5 introduces a new, lightweight way to manage project Dependencies (dependency). You no longer need to "add assembly references" in your project, instead you only need to be able to manage these plug-in components through NuGet. You can use the NuGet software suite added by the NuGet Package Manager, or you can edit a JSON file (such as Project.json) to control the NuGet software suite and version used in the project. To add additional plug-in kits, simply enter the NuGet suite name and version number into the Project.json file (e.g.).

In Visual Studio 2015, the Intelligent Word selection system (IntelliSense) can also find the keywords for the NuGet software suite, such as.

The aforementioned Project.json file contains only the NuGet packages that you want to join in the project. If you add NuGet suites that are dependent on each other (related to each other), these related packages will also be loaded, but not listed in the Project.json file. This approach makes your Project.json files simpler and easier to manage. If you remove a few nuget packages from Project.json, their associated suites will also be deleted, provided that they are not referenced by other packages.

Even if you don't have visual Studio installed, the JSON format will make it easier for you to manage dependencies between software suites (plug-ins). You can open the Project.json file and modify it in any kind of text editor; such as updating applications deployed to the cloud, their software suite dependencies.

Eliminate MVC , Web API with the Web Pages the repetition between

The past MVC, Web API, and Web pages have many overlapping features, but the implementation of these features is separate (the translator annotations: Web pages are Web pages that are written using the razor syntax and are not the same as the ASP. NET Web Form). For example, MVC and the Web API both provide routing (routing) functionality, but the class of MVC routing is placed in the System.Web.Mvc.Routing namespace, while the Web The API is placed in the System.Web.Http.Routing namespace. Or, both Web pages and MVC use razor syntax, but some nuget suites are compatible only (MVC or Web pages).

The ASP. NET 5,mvc, Web API, and Web pages will be merged into one. Single schema, called MVC 6. This consolidation eliminates duplicate schemas, making it easier for you to develop applications that use these program architecture frameworks. You don't need to write similar program code in the Mvc,web API or Web pages contextual relationship.

In the VS 2015 preview, MVC and the Web API are already unified in MVC 6. Web pages will be added to the next release of MVC 6.

Improved HTTP Performance

ASP. NET 5 introduces a new HTTP request pipeline (pipeline) that is streamlined and fast. This pipeline is modular, so you can just add the components you need. By reducing the cost of piping, your application will experience better throughput (throughput). The new pipeline also supports Owin.

Instantly available in the cloud

When you create a new ASP. NET 5 project, the innate structure of this project is to deploy to the cloud environment. Visual Studio 2015 provides a new environment-setting system that replaces the existing Web. config files. The new system allows you to request (request) a named value from a variety of sources, such as json,xml, or environment variables. The values you specify for each environment, or when you deploy them, allow your application to read only the correct values.

We also offer diagnostic and tracing tools to make it easier for you to discover application issues in the cloud.

Integration Dependency Injection

Dependency Injection (DI) is also a feature built into ASP. NET 5, and you can use the Inversionof Control (IoC) container to register these dependencies. Dependency Injection (DI) is conducive to providing the right services to the environment. For more information, see Dependency Injection in ASP. VNext.

Open source and transparent

All of the program code for ASP. NET 5 is on GitHub. Not only is the program code available, but GitHub repositories is also incorporated into our development. You can see clearly. NET changes, after each change, you can download the program code and submit the revised results.

With the development of ASP. NET 5 on GitHub, we make it easier for you to understand the program code, understand our expected direction, and help enhance and build the ASP.

A more flexible development environment

Visual Studio 2015 provides a lightweight developer experience for your ASP. All you need to do is change your program code, save it, and then refresh the browser screen (for example). You can see the results of the changes in the Web browser without having to re-build (re-build) the project.

For example, if the program code you are changing is in a Web project or in a category library referenced in your project. You still have to execute the (CTRL + F5) project instead of seeing these dynamic changes in debug mode.

Visual Studio started this dynamic compilation by using the Rosslyn (Roslyn) compiler. You still have the structure and power of all the build architectures, but development experience feels more like a literal translation (interpreted) language.

Each feature in the Visual Studio user interface (UI) can correspond to a command line (command-line) operation. You can easily convert between user interfaces and writing command-line script.

Finally, you can use the other program code Editor to complete your ASP. NET 5 project.

Web Form What's the matter?

You can continue to develop Web Form applications and have confidence that Web form is an important part of the Web development platform for. NET. We will continue to focus on adding new features to the Web form to improve the development experience and keep up-to-date with the technology of network practice.

Web Form 4.6 includes the following new features of WebForm:

L HTTP 2

L Asynchronous Step Model binding (async. Model Binding)

L Rosslyn (Roslyn) CodeDom compilation program

Your existing Web Form application will continue to work without changing it in. NET 4.6 In the case of IIS. However, you cannot use the Web Form application on the cloud-optimized (optimized for the cloud) runtime.

For Web Form 4.6 for the new feature, see Web Forms 4.6. For information about recent changes to Web Forms in Visual Studio Update2, see Improvements to ASP.

What about the previous application?

You may be concerned that as the version number of the ASP. NET 5 changes, you need to rewrite all the applications. Don't worry! The ASP. NET application that you established in an earlier version will continue to work with the new. If you do not need to use the new features of ASP. NET 5, you do not need to update or re-deploy (install) these applications.

For example, your application, which currently uses Web Form, MVC 5, Web API 2, SignalR 2, Web Pages 3, or entity Framework 6, can get full access to new schema support without modification at all. However, you will most likely need to use "full. NET clr" to execute these older versions of the application, because only this (full version) of the CLR provides full compatibility with earlier versions.

The cloud-optimized (optimized for the cloud) runtime provides an interface for many restrictive APIs. When using cloud-optimized runtime, the application must only use this runtime-specific type and member.

Want to know if your application can be executed at cloud-optimized runtime? Please use the API Portability Analyzer tool to detect. This tool tells you which platform the application can have to target and avoid the dependencies that the application will have when it moves to another platform. It can help you understand what needs to be changed and propose new types or members instead of software suites that are not already supported.

MVC 6 and SIGNALR 3 applications use the new HTTP pipeline, so they are not compatible with applications that use system.web. To upgrade an existing application to MVC 6 or SIGNALR 3, you must create a new project through Visual Studio 2015 and then migrate your program code into the new project. When you move to a new version, you may need to modify some program code that is not already supported.

After reading this article, you can continue to see the following:

Next steps
    • Create a Web API in MVC 6
    • View components and Inject in ASP 6
    • Develop ASP. VNext applications on a MAC
    • Entity Framework 7
    • Visual Studio Preview Release notes
    • Announcing ASP. Features in Visual Studio Preview and VS2013 Update 4

The following videos (film introduction) describe the latest enhancements:

    • ASP. 5
    • ASP 5 for. NET Framework and. NET Core
    • Web Forms 4.6
    • ASP. Tooling in VS 2015
    • Responsive Web Design
    • Modern Web Tooling

Http://www.asp.net/vnext/overview/aspnet-vnext/aspnet-5-overview

ASP. 5 Overview ( ASP 5 Overview )

Original: Tom Fitzmacken (2014/11/12)

Translator: MIS2000 Lab. (www.dotblogs.com.tw/mis2000lab/)

ASP. NET 5 overview (ASP. NET 5 Overview)

Related Article

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.