asp.net vnext development Using Visual Studio 2014 CTP1

Source: Internet
Author: User
Tags config json port number

Vnext, also known as MVC 6.0, is no longer dependent on system.web, and the memory footprint is significantly reduced (the system.web itself consumes 31KB of memory, no matter how simple a request is).

You can run in Self-host mode, and the site no longer needs to rely on IIS to run, so you can quickly demonstrate development progress to customers and better support true Cross-platform (Linux, Mac, Unix).

The Web Api, Web pages, and MVC are completely integrated, collectively known as MVC 6.0. In the past, output JSON could use either MVC's own return JSON or the Web API, so that the divide-and-conquer scene had an adverse effect on the entire community (JSON is just one example, many others are the same), and now the Web API Fully integrated into the vnext, the repetition of the wheel here finally came to an end.

Support Poco form of controller, code cleaner.

Cloud optimization technology, that is, in the development phase, the system does not actually load a component, but rather at runtime to query the appropriate version of the components, the benefit is that the Azure cloud host, mono host and Windows host can rely on the most suitable for the current environment of a component DLL.

Built-in Dependency Injection framework

Using the Roslyn compiler, the generated code is more efficient

The difference with 1~5.x:

1:project.json replaced the former web.config:

The dependencies of the project package are defined in the Dependencies node.

The configurations node holds the project settings information.

The Commands node holds the Self-host configuration parameters, such as the local bound port number.

Custom nodes, such as customizing a data node, and then defining a defaultconnectionstring in its scope to record the database connection string.

2:startup.cs replaced Global.asax.

Special Web.config is no longer required in the 3:views folder

When you add a reference (such as the entity Framework), you need to load the network in real time, so if you encounter a "No such library" error, don't worry, just a moment later. However, it is possible in some auspicious auspicious days, you no matter how long it is useless, because we are in the celestial, you understand.

================================================

The basic concept of MVC is unchanged, still is the former routetable, Controller, View, Action, Razor, Model

The following tutorial involves loading packages, and the version number of each package, such as "0.1-alpha-build-0403", perhaps when you see this article, the version number already does not apply, the simplest solution is to create a ready-made asp.net vnext Web Application (note is not an empty item), it loads the currently available packages and contrasts the version number of the corresponding packages inside.

If you need to output static files, such as. html,. jpg, you need to load specialized processing processes that are stored in Microsoft.AspNet.StaticFiles.

Here we start building a Vnext site :

Create a asp.net vnext empty project

The resulting directory structure is much simpler than it used to be:

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.