Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to explain Katana and OWIN in simple words and uses?

I have read many articles about the OWIN and Katana projects, but I could not get the whole picture of it.

For a normal web developer who uses ASP.NET:

  1. What exactly is OWIN and what problems does it solve (in simple words). What is its relation to IIS?
  2. Does OWIN replace IIS? if not, in what situations does OWIN best fit?
  3. How could OWIN help me in my daily work projects?
  4. How could OWIN help me in a self-improvement projects?
like image 556
ebram khalil Avatar asked Dec 11 '13 16:12

ebram khalil


People also ask

What is OWIN and Katana?

Katana is a flexible set of components for building and hosting Open Web Interface for . NET (OWIN)-based web apps. New development should use ASP.NET Core. The Microsoft.

What is the use of OWIN?

OWIN allows web apps to be decoupled from web servers. It defines a standard way for middleware to be used in a pipeline to handle requests and associated responses.

What does OWIN stand for?

Open Web Interface for . NET (OWIN) defines an abstraction between . NET web servers and web applications.

What is OWIN and what problem does it solve?

What is OWIN? The goal of OWIN is to decouple a web application from a web server so that we don't have to worry about how the application will be deployed; instead, we just focus on solution to our problems. OWIN provides an abstraction layer between a web server and a web application.

What is OWIN katana?

Katana is project name to implement OWIN in Microsoft. What exactly is OWIN and what problems does it solve (in simple words). What is its relation to IIS? OWIN (Open Web Interface for .NET) is a standard (OWIN Specification) and Katana is .NET library, you can get nuget from here. OWIN and Katana became somewhat synonymous on the web.

What frameworks does katana run on Windows?

At the moment, Katana has successfully adapted the following ASP.NET frameworks to OWIN: Web API Signal R ASP.NET MVC and Web Forms are still running exclusively via System.Web, and in the long run there is a plan to decouple those as well.

What is OWIN and how does it work?

The goal of OWIN is to decouple web applications from the web server by introducing an abstraction layer. Such an abstraction enables you to run the same application on all the web servers that support OWIN.

What is ASP NET katana?

Katana on the other hand, is a fully developed framework made to make a bridge between current ASP.NET frameworks and OWIN specification. At the moment, Katana has successfully adapted the following ASP.NET frameworks to OWIN: Web API Signal R


2 Answers

Regarding the comment above, OWIN is not a framework. OWIN is a specification on how web servers and web applications should be built in order to decouple them and allow movement of ASP.NET applications to environments which were not supported before.

Prior to OWIN, when building ASP.NET application, you were inherently bound to IIS due to the heavy dependency on System.Web assembly.

System.Web is something that has existed ever since ASP (non .NET version) and internally contains many things that you might not even need (such as Web Forms or URL Authorization), which by default all run on every request, thus consuming resources and making ASP.NET applications in general lot slower than its counterparts such as Node.js for example.

OWIN itself does not have any tools, libraries or anything else. It is just a specification.

Katana on the other hand, is a fully developed framework made to make a bridge between current ASP.NET frameworks and OWIN specification. At the moment, Katana has successfully adapted the following ASP.NET frameworks to OWIN:

  • Web API
  • Signal R

ASP.NET MVC and Web Forms are still running exclusively via System.Web, and in the long run there is a plan to decouple those as well.

On the other hand, IIS is a good, resourceful host for web servers. Entire ASP.NET performance issues using IIS has deep roots in System.Web only. Up until the recent time, when deciding how will you host your web server, you had two options:

  • IIS
  • Self-Host

So if you wanted a performance, you'd go for a self-host option. If you wanted a lot of out-of-the-box features that IIS provides, you'd go for IIS but you'd lose on performance.

Now, there is a 3rd option, a Microsoft library named Helios (current codename) which intends to remove System.Web out of the way, and allow you to use IIS on more "cleaner" way, without any unnecessary libraries or modules. Helios is now in pre-release version, and is waiting for more community feedback in order to make it fully supported Microsoft product.

Hope this explanation clarifies things better for you.

EDIT (Sep 2014):

With ASP.NET vNext being in development, Katana is slowly getting retired. Version 3.0 will most likely be last major release of Katana as a standalone framework.

However, all the concepts introduced with Katana are being integrated into ASP.NET vNext, meaning that programming model will be pretty much the same. Quote from forum post made by David Fowler (Architect of ASP.NET vNext):

vNext is the successor to Katana (which is why they look so similar). Katana was the beginning of the break away from System.Web and to more modular components for the web stack. You can see vNext as a continuation of that work but going much further (new CLR, new Project System, new http abstractions).

Everything that exists today in Katana will make it's way into vNext.

EDIT (Feb 2015):

ASP.NET vNext is now known as ASP.NET 5 and will be built on top of .NET Core 5. .NET Core 5 is lightweight factored version of .NET Framework, designed to support goals of ASP.NET 5 and .NET Native. However, ASP.NET 5 will be supported by .NET Framework 4.6 as well, that should become available together with .NET Core 5. Both ASP.NET 5 and .NET Core 5 will be licensed under MIT and will accept community contributions.

EDIT (May 2015):

Additionally, ASP.NET Web API brand will be discontinued, however it's technology will be base for new ASP.NET MVC 6. Previous ASP.NET MVC versions were built by implementing IHttpHandler, an interface defined in System.Web. ASP.NET MVC 6 removes that dependency, making it portable to various platforms and web servers.

EDIT (May 2016):

ASP.NET 5 will officially be renamed to ASP.NET Core starting with Release Candidate 2 that is scheduled to be released soon. Same will apply for Entity Framework 7 which will be renamed to Entity Framework Core. More information about official announcement and reasons behind it can be found on Scott Hanselman's blog post: ASP.NET 5 is dead - Introducing ASP.NET Core 1.0 and .NET Core 1.0

EDIT (May 2016):

With the release of Release Candidate 2, ASP.NET Core has been modified so that future web apps are actually just .NET Core console apps setup to process incoming HTTP requests. This concept makes ASP.NET Core even more aligned with approach Microsoft has taken with microservices architecture support and its implementation through Azure Service Fabric. More information on can be found on official blog post: Announcing ASP.NET Core RC2

like image 95
Admir Tuzović Avatar answered Sep 20 '22 14:09

Admir Tuzović


If I have to define OWIN for myself, that would be: "The best ideas from the Ruby and Node.js web dev communities, coming to .NET"

But this would not help any ASP.NET developer. My own definition would be something along the lines of:

OWIN defines a standard interface between .NET web servers and web applications. The goal of the OWIN interface is to decouple server and application If I have to answer the questions you've posed, then here it is:

  1. OWIN is an interface specification. It decouples a web applications from IIS.

  2. If you are using ready-made components (which is what Katana is), then some parts of the application functionality are much easier to implement compared compared to old ASP.NET. Authentication with third-party identity providers (Facebook, Twitter) is one example of this.

  3. OWIN is essentially a collection of best practices, which have been proven in web development communities. It shows a way to implement web apps which is very open to extensibility. As each web developer should constantly be on the cutting edge of new technologies, this is one way to stay up to date with the whole web development community and not just .NET. If you learn OWIN, it would be much easier to learn other web development frameworks like Express for node.js or Rack for Ruby, because the practices they use are similar.
like image 26
Slavo Avatar answered Sep 18 '22 14:09

Slavo