Understanding and practice of Owin (i) – decoupling, collaboration and openness

Source: Internet
Author: User

Original: Understanding and practice of Owin (i) – decoupling, collaboration and openness

Overview

The full name of Owin is open Web Interface for. Net, which is a new concept introduced by Ms during VS2013, and there's a lot of information about it on the Internet, and here I'll talk about my own understanding:

    • OWIN is a norm and a standard, does not represent a specific technology . Some of the newest new technologies, such as Kanata, Identity, and SignalR, are based on different implementations of Owin, which are discussed further in later chapters.
    • OWIN The core philosophy is decoupling, collaboration and openness ---this is quite different from the previous style of MS, and deserves attention.
    • OWIN is Ms Future Web development of the direction , want to follow the MS route to continue to develop Web applications, Owin is the trend.
4-storey concept

When it comes to decoupling, a clearer idea is, Owin. A Web application solution is decoupled to layer 4:

    • Host: Host
    • Server: Servers
    • Middleware: Middleware
    • Application: Application Specific

Here is a more brief illustration:

If we put aside all the heavyweight, enterprise-level needs, we are returning to basics, we can understand this 4-tier:

    • Host: The main process of the application, primarily responsible for booting, shutting down the server, loading various middleware components for the server, and, of course, loading application.
    • Server: In general, our web application is developed based on the HTTP protocol, where the server is essentially an empty shell HTTP server, listening port, receiving HTTP Request, returning HTTP Response, but If there is no middleware involved, we should assume that the server will only return an empty response to the requestor.
    • Middleware: Loading middleware in Server provides a variety of functions, processes the request, and then returns reponses in some way. Of course, some middleware can also not return any response, And just do the internal processing, such as the realization of the session middleware.
    • Application: The business system content that developers really care about, the provider of real business content in reponses.
Meaning and Vision

The following is a review of the changes that Owin will bring to our future web development to help us understand the implications of this specification:

    • The Owin rules allow the layers to be decoupled, and we can simply give host, Server, middleware, and application to different developers to complete the integration.
    • As long as it is based on the same Owin standards, the collaboration between the different tiers is more convenient, for example, in addition to the application layer must be self-developed, host we can choose IIS, or any process, including the other operating systems under the mono support process; Server currently has Ms Kanata, Linux on the Jexus; While middleware has a wider choice, MS has provided the WEBAPI, Identity, SIGNALR are already based on the Owin standard middleware implementation, you can expect a large number of third-party implementations in the future.
    • The implementation of the whole system is more open, most of the Owin implementations are independent and open source, the development team can develop or retrofit host, server or middleware according to the needs and technical characteristics of their own projects. And in some unimportant or not good occasions to choose the implementation of third-party provided.

For now, the overall solution based on Owin has not been fully developed, and MS will eventually improve the implementation of the Owin system in the next generation of the ASP. Vnext version.

However, the Kanata Project, based on the Owin standard, has now reached 3.0.1, which has been to host-hosting, Server–httplistener, static file system-static files, logs-Logging, security and permissions System-Security, error tracking –diagnostics has a considerable scale of implementation, and everyone familiar with the WEBAPI components early to and old friends system.web decoupling, joined the Owin camp. In addition, under the Owin framework, developers can fully develop and build their own components to meet the actual needs, so that the Owin solution is actually embryonic.

So, based on these techniques, I'll take a closer look at some of the specific implementations of host, Server, middleware, application, to help you understand and think about Owin more deeply.

Understanding and practice of Owin (i) – decoupling, collaboration and openness

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.