OWIN and Katana, why decouple the application from the server?

后端 未结 2 1297
清歌不尽
清歌不尽 2021-02-02 07:09

I dont quite get this.. sure its cool to be able to self-host an application and it might be nice since if the IIS goes down for any reason... then all your sites goes down.. bu

相关标签:
2条回答
  • 2021-02-02 07:30

    A OWIN and Katana overview from MS provides -- historical background and reasoning behind both projects can be found here:

    http://www.asp.net/aspnet/overview/owin-and-katana/an-overview-of-project-katana

    To summarize from the article:

    OWIN: Its goal is not to be the next Web framework, but rather a specification for how Web frameworks and Web servers interact.

    Project Katana: The Katana project represents the set of OWIN components that, while still open source, are built and released by Microsoft. These components include both infrastructure components, such as hosts and servers, as well as functional components, such as authentication components and bindings to frameworks such as SignalR and ASP.NET Web API. Katana brings many of the benefits of Node.js (and frameworks like it) -- the simplicity with which one could author and run a Web server -- without forcing the developer to throw out everything she knows about developing ASP.NET Web applications.

    0 讨论(0)
  • 2021-02-02 07:32

    Your question is valid.

    You are probably mostly thinking of web facing web servers. Serving HTML (or json or websockets) can be used for so much more.

    I use Nancy instead of IIS because I have a small application that I only want to reach from the inside while IIS is outward facing. Also - if a machine doesn't have IIS I don't have to install it.

    Say you run OSX or *nix. Then you can have a very good language and ditto editor and run a simple web server on Mono.

    Say you are using a micro controller like Netduino - IIS doesn't fit on it. I doubt Nancy runs there either - but you get the idea; not everything needs a 24 wheeler to haul data.

    Say you are automating your house with a Win machine as heart and center. Now, do you really want to install IIS which does godsknowwhat or does it suffice with as little as possible?
    If the automated house above is your pet F/OSS project and you are heavy on automated testing. Nancy is well known for that.

    Another example take from the near-reality of mine. I have a snow flake server running an outdated Umbraco CMS. I put my soft gloves on before I touch this machine and only so gently.
    If I need another web or json server on it Nancy would do the least possible imprint.

    The OWIN argument is stale though as Microsoft seems to have Katana more or less out the door.

    HTH

    0 讨论(0)
提交回复
热议问题