Understanding OWIN and Katana

Open-source web stacks are rapidly evolving, thanks to a wide range of features being introduced on a daily basis. Microsoft, on the other hand, is constantly updating its web application stack and has published a slew of new framework components.

Despite the fact that Microsoft’s Asp.Net is a mature framework, it lacked some essential properties such as portability, modularity, and scalability that Open Source web stacks provided. This resulted in the creation of OWIN, a definition for how an Asp.Net application and hosting server should be created so that they are independent of one another and need the fewest runtime packages possible.

Asp.Net can become more modular, have higher scalability, and be easily migrated to multiple environments by implementing the OWIN specification, making it competitive with its open-source alternatives. It also aims to encourage participation in the .net open source community for framework and tooling support. So, let us quickly begin with the article.

Table of contents

What is OWIN?

The Open Web Interface (OWIN) for .Net is a community-owned standard that serves as a common interface between.NET online servers and web applications. The purpose of OWIN is to decouple the server and the application, to be an open standard, and to promote the open-source.NET web development tool ecosystem. A delegate structure is used to define OWIN.

Components of abstraction

OWIN was motivated by the gains realized by Rack in the Ruby community, according to the ASP.NET website. Group of.NET developers set out to provide a layer of abstraction between Web servers and framework components. An illustration of the components of abstraction is as follows:

The components of this abstraction include:

The resulting abstraction is made up of two main components. The first is an IDictionary-based environment dictionary. This data structure stores all of the states required to perform an HTTP request and response, as well as any relevant server state. The application delegate is OWIN’s second major component. This is the primary interface between all components in an OWIN program, and it is represented by a function signature:

What is Katana?

Katana was created to be a lightweight webserver similar to Node.js, and it offers many of the same features as Node.js and other frameworks. If you know Node.js, you can hop right into Katana because it is influenced by Node.js in nature. Katana is a set of components for creating and hosting web apps that use the Open Web Interface for.NET (OWIN) framework.

Why Katana?

It’s crucial to understand the underlying motivations for producing a product, whether it’s a developer framework or an end-user product, and that includes knowing who the product was designed for. ASP.NET was designed with two types of users in mind -

Traditional ASP developers: As their size and complexity expanded, conventional ASP applications became difficult to administer. This was largely owing to scripting environments’ lack of organization, as well as code duplication caused by code and markup interleaving. ASP.NET took advantage of the code organization offered by the OOP languages of the.NET Framework. At the same time, it also preserved the server-side programming model to which classic ASP developers had grown accustomed to. This helped to capitalize on the strengths of classic ASP while addressing some of its challenges.

Windows business application developers: Unlike traditional ASP developers, who were used to creating HTML markup and the code to generate more HTML markup, WinForms developers (and VB6 developers before them) were used to a design-time experience that included a canvas and a large number of user interface controls. The first version of ASP.NET, also known as “Web Forms,” offered a similar design-time experience, as well as a server-side event model for user interface components. It also had a set of infrastructure features (such as ViewState) to provide a seamless developer experience between client and server-side programming. WebnForms used a stateful event architecture to effectively hide the Web’s stateless nature.

Three High-Level Goals of Katana

Unlike the OWIN standard and Owin.dll, which are both community-owned and open-source projects, the Katana project represents a set of OWIN components that are produced and delivered by Microsoft. Infrastructure components like hosts and servers are included. Along with it, you also have functional components like authentication components and connectors to frameworks like SignalR and ASP.NET Web API. The project’s three high-level objectives are as follows:

Conclusion

The Katana project’s purpose has never been to create another Web framework and force developers to learn it. Rather, the idea was to design an abstraction that would give.NET Web application developers more options than they had before. The Katana project allows components throughout the stack to improve at whatever rate makes sense for them by splitting out the logical layers of a typical Web application stack into a set of interchangeable components. Katana enables frameworks and the applications built on top of them to be portable across a range of servers and hosts by basing all components on the simple OWIN abstraction.

Originally published at https://www.partech.nl.

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Human Digital

The people first agency. Digitale oplossingen, professionals en trainingen waarin de mens altijd voorop staat | humandigital.nl