Getting Started with OWIN and Katana

Firstly, lets start by trying to identify what the specification is. The following text is taken from pecification is. The following text is taken from

OWIN defines a standard interface between .NET web servers and web applications. The goal of the OWIN interface is to decouple server and application, encourage the development of simple modules for .NET web development

Or in other words; Katana, the Microsoft implementation of OWIN, is basically an answer to node.js just like the ASP.NET MVC framework was the answer to Ruby on Rails**

This is evident when we compare the two hello world web server implementations;

1. Node Web server initiation

2. Katana self hosting web server

Now this is evidently a high level comparison between the 2 but it suggests my point.

Katana, is a collection of projects for supporting and implementing the OWIN specification. The value here is that it creates an abstraction between the web server and application. Meaning it completely decouples server dependencies away from our application. This then introduces the concept of, use what we need and nothing more.

Significantly it includes OWIN support for System.Web and System.Net.HttpListener.

This is an obvious benefit when you review a typical .NET application and notice the dependent reference System.Web.dll; which is over 2.5MB and includes over 10 years of retrofitted development.

Where node uses Node Package Manager, Microsoft uses NuGet to manage these modules.

For this blog post, this is where the comparison stops between these two technologies. I dont want to dwel upon it, however for further readings checkout this performance comparison article; NB. At the time of this blog publication the article was over a year old so the result will no doubt vary.

MSFT's decision to open source their forthcoming ONE ASP.NET platform has meant the open source community has supported the Katana implementation well. Significant support that you can pull down today includes;

I've used a couple of these projects on a basic hello world application. Its a self hosted project running from a console app. But a follow up post will include a Linux host. This is available on GitHub for downloading, forking, or contributing.

View on GitHub