4. What is OWIN
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,
and, by being an open standard, stimulate the open source
ecosystem of .NET web development tools.
http://owin.org
5. What is OWIN
The design of OWIN is inspired by node.js, Rack (Ruby)
and WSGI (Phyton).
In spite of everything there are important differences between
Node and OWIN.
OWIN specification mentions a web server like something that is
running on the server, answer to the http requests and forward
them to our middleware. Differently Node.Js is the web server that
runs under your code, so you have totally the control of it.
6. IIS and OS
It is released with the OS
It means you have to wait the new release of Windows to
have new features (i.e.: WebSockets are available only on
the latest version of Windows)
There aren’t update for webserver;
Ask to your sysadmin “I need the latest version of Windows
because of Web Sockets“
7. System.Web
I was 23 year old (now I’m 36) when System.Web was born!
It’s not so cool (in fact it’s missing in all new FW)
Testing problems
2.5 MB for a single dll
Performance
12. OWIN Specs: Layers
• Startup, initialization and process management
Host
• Listens to socket
• Calls the first middleware
Server
• Pass-through components
Middleware
• That’s your code
Application
14. Why Katana
ASP.NET made to please ASP Classic (HTTP req/res object
model) and WinForm devs (Event handlers): on fits all
approach, monolithic (2001)
Web evolves faster then the FW: first OOB release of
ASP.NET MVC (2008)
Trying to isolate from System.Web and IIS with Web API
(2011)
OWIN and Katana fits perfectly with the evolution, removing
dependency on IIS
15. Katana pillars
It’s Portable
Components should be able to be easily substituted for new
components as they become available
This includes all types of components, from the framework to the
server and host
16. Katana pillars
It’s Modular/flexible
Unlike many frameworks which include a myriad of features that
are turned on by default, Katana project components should be
small and focused, giving control over to the application
developer in determining which components to use in her
application.
17. Katana pillars
It’s Lightweight/performant/scalable
Fewer computing resources;
As the requirements of the application demand more features
from the underlying infrastructure, those can be added to the
OWIN pipeline, but that should be an explicit decision on the part
of the application developer
30. Real World Katana: WebAPI
public void Configuration(IAppBuilder app)
{
HttpConfiguration config = new HttpConfiguration();
config.Routes.MapHttpRoute("default", "api/{controller");
app.UseWebApi(config);
}
39. Project K and ASP.NET vNext
Owin/Katana is the first stone of the new ASP.NET
Project K where the K is Katana
Microsoft is rewriting from scratch
vNext will be fully OSS (https://github.com/aspnet);
MVC, WEB API and SignalR will be merged (MVC6)
It uses Roslyn for compilation (build on fly)
It runs also on *nix, OSx
Cloud and server-optimized
POCO Controllers