. Net Core learning (1),. netcore Learning
- What is ASP. NET 1.0?
- Open source-GitHub
- Cross-platform support for Windows, Mac, and Linux
- Optimized from the underlying layer-modular components with minimum overhead-gives developers great flexibility
- Why ASP. NET Core?
- Lightweight, modular HTTP request pipeline-the past framework was too bloated, ASP. NET 5 is more small (modular), such as: no longer based on System. web. dll development, but is divided into a series of NuGet packages, you only need to install a few (pay-for-what-you-use );
- Big unification of frameworks-WebUI, Web APIs, and even client network frameworks are all unified
- Provides built-in dependency injection support based on cloud development and environment configuration.
- Cloud-based development-all packages are managed through NuGet
- Environment-use different configurations based on different platforms. You can also use IIS hosting, self-hosting, and OWIN hosting.
- Built-in dependency injection-internal integration of Autofac and Ninject
- Supports cross-platform development tools
- Visual Studio (non-cross-platform): provides a new and flexible project system.
- Other development tools (cross-platform support): provides a complete command line interface, so that you can choose your preferred tools for development.
- Supports cross-platform running
- Fully open-source, community support
- Supports Version Control for the side-by-side application. You only need to upgrade the required version.
- Application profiling
- ASP. NET Core 1.0 runs on. NET 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 );
}
- What is a service?
A service is a public component used in the entire application. It is obtained through dependency injection. There are three types of services in ASP. NET Core 1.0:
- What is middleware?
Middleware is used to form your application request pipeline. ASP. NET Core 1.0 adopts the asynchronous logic above HttpContext. It can choose to execute the next middleware in the sequence or directly terminate the request:
- What is server Servers?
- Used to listen for Request requests
- IIS
- Self-hosting: In your own process, you can use the WebListener service in Windows.
- Kestrel: cross-platform WebServer
- What is WebRoot?
- Root directory for processing Http requests (for example, processing static files)
- How to configure application-Configuration
- Previously: using System. Configuration and Web. config
- Now: the new configuration module processes simple key-Value Pair settings and supports multiple formats (XML, JSON, INI)
- Integration of other client frameworks-AngularJS, KnockoutJS, Bootstrap...