OWIN 101: An Introduction to the Open Web Interface for .NET
For the past few years, web developers working with ASP.NET may have noticed a new name popping up: OWIN. Some tech gurus are touting it as “the hot new thing” and claiming it is the answer to open-source compatibility with .NET. But what is OWIN, where did it come from, and how exactly does it work?
ASP.NET: A History
In 2002, Microsoft released ASP.NET, the successor to its Active Server Page (ASP) technology that had enjoyed considerable popularity in web development up to that point. At the time, Microsoft was moving all of its development environments into the the then-new .NET framework, and ASP.NET was the product targeted at web application developers.
ASP.NET has enjoyed an ever-growing user base, and is now on version 4.5; version 5, or ASP.NET vNext, is expected to drop any month now. Developers around the world have over a decade of experience using ASP.NET to develop their applications, and a considerable amount of cutting-edge technologies of the past ten years have been built on ASP.NET’s platform.
Open Source Joins the Party
Over the years, the .NET Framework and ASP.NET have evolved to allow a progressively more open development process. Today, an ambitious developer can even download the .NET Core libraries straight from GitHub. With the success of Ximian’s (now Xamarin’s) Mono project, which brought the .NET framework to non-Microsoft platforms, ASP.NET has begun seeing more and more use as a language that allows developers to build for any operating system or vendor without having to massively retrain or contract developers. The practical upshot has been that more and more developers were writing ASP.NET applications that ran on Apache Web Server on Linux, or nginx, or any of a host of purpose-built web servers, either in addition to or instead of Microsoft’s IIS.
Of course, with decentralization comes destabilization. Opening the field to different web servers allowed for a more versatile method of application development, but integration problems arose because each server had different ways of interacting with ASP.NET applications, and frequently code changes were required to get any given web application to work on a particular technology stack. There was no standard interface for running ASP.NET applications across all web servers and it made for some rather annoying and pervasive incompatibilities.
OWIN: Bridging the Gap
Enter the Open Web Interface for .NET, or OWIN. OWIN is a standard written by the OWIN working group, who released version 1.0.0 in 2012. Rather than being a library or framework in and of itself, OWIN is a protocol that provides a formal technical definition for how web servers and applications should communicate. Ideally, it means that once a web server supports the OWIN standard, any OWIN application written for any .NET-capable platform can be run on it.
From an application deployment perspective, this makes a huge difference for firms that are developing web applications for primarily on-premises deployments. Instead of limiting your client pool to a group of companies that support the technology stack your application is developed for (e.g., only Microsoft shops, only Linux shops, etc.), suddenly the field is open for you to approach any lead with an application you can be confident will work with their existing infrastructure.
The Future of OWIN
Whether OWIN is going to really live up to its potential to provide a clean plane for deployments across myriad web server stacks, or if the technology will fizzle, is yet to be seen. The primary implementation of OWIN is Microsoft’s Katana project, which still has some considerable problems running on Mono-based .NET environments. Even so, Microsoft is firmly commited to the standard, and has promised to embrace it as one of the foundational technology of ASP.NET vNext. With any luck, OWIN will prove to be as adaptive and efficient as the developers for which it was created.
Talk about it:
- Have you used the OWIN interface in your application development?
- How does OWIN help or hinder your attempts at open source deployment?
- Do you think there might be a better way to standardize communication between servers and applications?