- What is ASP. 1.0
- Open source - GitHub
- Cross -platform- support for Windows, Mac, Linux
- Optimized from the bottom - using modular components with minimal overhead - gives developers a lot of flexibility
- Why use the asp . NET Core
- 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);
- Framework Unification -WebUI, web APIs and even client network frameworks are unified
- Cloud-based development with built -in Dependency injection support based on environment configuration
- Cloud-based development - All packages managed through NuGet
- Environment-based configuration - use different configurations depending on the platform , or configure using IIS hosting , self- hosting , OWIN hosting, etc.
- Built-in Dependency injection - internal integration of AUTOFAC and Ninject
- Support for cross-platform development tools
- Visual Studio (non-cross-platform): provides a new, flexible project system
- Other development tools (cross-platform support) : provides a complete command-line interface that allows you to choose the tools you like to develop
- Supports cross-platform operation
- Fully open source , community support
- Support for side-by-side application versioning - just the parts you need to upgrade
- Application Profiling
- ASP . NET Core 1.0 is running on top of. Execution Environment (DNX)
- 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);
}
-
-
- Configureservices: defining the services used
- Configure: defining the middleware used in the request pipeline
- 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:
-
- Singleton: The entire application uses this one at any time
- Scoped: If not in the specified scope , create one , and the default container domain is to create one per request
- Transient: Each use of the service will create a
- 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 :
-
- Static file Processing
- Routing
- Diagnosis
- Identity verification
- What is server Servers
- For listening to request requests
- Iis
- Self-hosting: In your own process , in Windows , You can use the weblistener service
- Kestrel: cross-platform WebServer
- What is webroot
- http The root of the request processing ()
- How to configure the application -configuration
- formerly : using System.configurationweb.config
- now : new configuration module handles simple key-value pair settings supports multiple formats (XML, JSON, INI)
- integration of other client frameworks -AngularJS, Knockoutjs, Bootstrap ...
. Net Core Learning (1)-ASP.