. Net Core Learning (1)-ASP.

Source: Internet
Author: User
Tags hosting

    1. What is ASP. 1.0
      1. Open source - GitHub
      2. Cross -platform- support for Windows, Mac, Linux
      3. Optimized from the bottom - using modular components with minimal overhead - gives developers a lot of flexibility
  1. Why use the asp . NET Core
    1. Lightweight modular HTTP request Pipeline - past frameworks are too bloated, and the ASP. NET 5 is more compact ( modular ), such as : no longer based on System.Web.dll is developed , but decomposed into a series of NuGet packages , you only need to install a few (pay-for-what-you-use);
    2. Framework Unification -WebUI, web APIs and even client network frameworks are unified
    3. Cloud-based development with built -in Dependency injection support based on environment configuration
        1. Cloud-based development - All packages managed through NuGet
        2. Environment-based configuration - use different configurations depending on the platform , or configure using IIS hosting , self- hosting , OWIN hosting, etc.
        3. Built-in Dependency injection - internal integration of AUTOFAC and Ninject
    4. Support for cross-platform development tools
        1. Visual Studio (non-cross-platform): provides a new, flexible project system
        2. Other development tools (cross-platform support) : provides a complete command-line interface that allows you to choose the tools you like to develop
    5. Supports cross-platform operation
    6. Fully open source , community support
    7. Support for side-by-side application versioning - just the parts you need to upgrade
  2. Application Profiling
      1. ASP . NET Core 1.0 is running on top of. Execution Environment (DNX)
      2. Startup.cs

public class Startup
{
      Public void configureservices(iservicecollection services) {}

public void Configure(iapplicationbuilder app) {}

public static void Main (string[] args) = webapplication.run<startup> (args);

}

        1. Configureservices: defining the services used
        2. Configure: defining the middleware used in the request pipeline
    1. What is a service

Services are common components that are used throughout the application and are obtained through dependency injection , with three types of services in ASP. NET Core 1.0:

      1. Singleton: The entire application uses this one at any time
      2. Scoped: If not in the specified scope , create one , and the default container domain is to create one per request
      3. Transient: Each use of the service will create a
    1. What is middleware

Middleware is used to compose your application request pipeline , and ASP. NET Core 1.0 uses asynchronous logic over HttpContext , which can choose to execute the next middleware in the sequence or terminate the request directly :

      1. Static file Processing
      2. Routing
      3. Diagnosis
      4. Identity verification
    1. What is server Servers
      1. For listening to request requests
        1. Iis
        2. Self-hosting: In your own process , in Windows , You can use the weblistener service
        3. Kestrel: cross-platform WebServer
    1. What is webroot
      1. http The root of the request processing ()
    2. How to configure the application -configuration
      1. formerly : using System.configurationweb.config
      2. now : new configuration module handles simple key-value pair settings supports multiple formats (XML, JSON, INI)
      1. integration of other client frameworks -AngularJS, Knockoutjs, Bootstrap ...

. Net Core Learning (1)-ASP.

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.