OWIN Overview

1.Owin defined

Owin is Open Web Interface For .NET. That is, the open source .Net web interface

2.Owin purpose

In the past, IIS as .NET developers is the most commonly used Web Server (no one), from a tightly coupled relationship between Microsoft product, we had to Website, Web Application, Web API, etc. deployed on IIS, in fact in 2010, there is nothing wrong, but with the Web's development in recent years, especially the rapid development of mobile Internet, IIS Web Server has exposed him as a shortage of. Mainly reflected in two aspects, ASP.NET (System.Web) tightly coupled IIS, IIS tightly coupled OS, which means that we must be deployed on the Web Microsoft's operating system, it is difficult to cross-platform, and many new features have to update and other OS.

It is because of the relationship between Microsoft's product is tightly coupled, that has caused the lack of cross-platform, which is being criticized. So we need to decouple OWIN, based on this standard, to encourage developers to develop simple, flexible modules, thus promoting the development of .NET Web Development open source ecosystem.

3.Owin role

OWIN defines four layers:

Host: primarily responsible for application configuration and start the process, including the initialization OWIN Pipeline, running Server.

Server: this is the actual Http Server, binding the socket and listens to HTTP requests then the Request and Response Body, Header encapsulated into line Owin standard dictionary sent OWIN Middleware Pipeline, and finally filling the Data Response Application of appropriate the field output.

Middleware: called middleware, assembly, and positioned between Server Application, for processing the request sent to the Pipeline, such components can be simple or complex Logger Web Framework such as Web API, SignalR, as long as the connection Sever success, middleware middleware components can be realized in any application delegate.

Application: This is a specific application code, may on Web Framework. For Web API, SignalR such Web Framework middleware, we just changed the way they managed, not replace ASP.NET WEB API, SignalR the original application development. So how to develop on how to develop, but we will register them in the OWIN Pipeline to handle HTTP requests, OWIN become part of the pipeline, so here Application program code that is being processed in the sense.

Guess you like

Origin www.cnblogs.com/zkb9604/p/11529106.html