owin katana en

18
Hrvoje Hudoletnjak Software developer New ASP .NET

Upload: hrvoje-hudoletnjak

Post on 12-Jul-2015

197 views

Category:

Software


0 download

TRANSCRIPT

Hrvoje HudoletnjakSoftware developer

New ASP.NET

AGENDA

MotivationWhy now?

What future brings

SpecsWhat is OWIN

Katana and Helios

Architecture

DemoCreate most basic OWIN app

Create some middleware

Hook up WebAPI and NancyFx middlewares

MOTIVATION

System.Web 12+ years old

WebForms framework

Regression bugs

„We fix one bug and open new ones”

Monolith architecture

Slow release cycle

Different types of apps today

MOTIVATION

PerformanceIIS stays

„IIS is the fastest web server, as long you don’t load System.Web”

Evolutionary steps: MVC, WebAPI

Released out of band

Transition from big server apps to small client and device centric apps with Javascript/HTML/CSS and microservicearchitecture

MOTIVATION

NodeJS simplicity:

start simple and add just what you need

OWIN: what's that really

OWIN

Open Web Interface for dot Net

Defines interface between server and apps components

One goal is to decouple server and host from an app

Simple modules

Open standard

Not revolution but evolution

ARCHITECTURE

OWIN SERVER

OWIN SPEC

using AppFunc = Func<

IDictionary<string, object>, // Environment

Task>; // Done

KATANA

Microsoftovs implementation of OWIN

So we can run OWIN stuff on System.Web

Several hosts and servers

IIS or self-host

Helper classes

OwinContext, OwinRequest, OwinResponse, ...

Middleware components

Auth, static content, CORS

Katana hosts and servers

IIS

• SystemWeb

• Helios

Non-IIS

• OwinHost

• Self-host

OWIN

Servers and hosts

o Katana

o Nowin

o Helios

o Kestrel

Frameworks

o WebAPI

o SignalR

o ASP.NET Identity

o Nancy

o Simple.Web

HELIOS

System.Web problems

auth mixing, 401 -> 302, req. validation...

Need for agile framework

pay-for-play model

Goal: speed, agility, out-of-band, simplicity

Not goal: 100% backward compatibility

Nuget: Microsoft.Owin.Host.IIS

Mem consumption: 30kb/req vs 1kb/req

Inspirirani ljudima.

Pitanja i odgovori.