By: Ahmed Marzouk OWIN & KATANA. Agenda A Brief History What is OWIN and Why? What is KATANA? OWIN Specifications OWIN/KATANA Goals.

Slides:



Advertisements
Similar presentations
Web Service Ahmed Gamal Ahmed Nile University Bioinformatics Group
Advertisements

Zoiner Tejada Hershey Technologies. About Zoiner Tejada.
Introduction to.NET Technology Marcello Benati Software Engineer.NET Architect.
Kashif Jalal CA-240 (072) Web Development Using ASP.NET CA – 240 Kashif Jalal Welcome to week – 2 of…
Week 2 IBS 685. Static Page Architecture The user requests the page by typing a URL in a browser The Browser requests the page from the Web Server The.
Computer Science 101 Web Access to Databases Overview of Web Access to Databases.
Using Microsoft SharePoint to Develop Workflow and Business Process Automation Ted Perrotte National Practice Manager, Quilogy, Microsoft Office SharePoint.
Windows.Net Programming Series Preview. Course Schedule CourseDate Microsoft.Net Fundamentals 01/13/2014 Microsoft Windows/Web Fundamentals 01/20/2014.
DYNAMICS CRM AS AN xRM DEVELOPMENT PLATFORM Jim Novak Solution Architect Celedon Partners, LLC
ASP.NET vNEXT & development tools Marco De
ESB Guidance 2.0 Kevin Gock
FALL 2005CSI 4118 – UNIVERSITY OF OTTAWA1 Part 4 Web technologies: HTTP, CGI, PHP,Java applets)
Architecture Of ASP.NET. What is ASP?  Server-side scripting technology.  Files containing HTML and scripting code.  Access via HTTP requests.  Scripting.
Lesley Bross, August 29, 2010 ArcGIS 10 add-in glossary.
Codeigniter is an open source web application. It occupies a very small amount of space in the memory and is most useful for developers who aim to develop.
Universiti Utara Malaysia Chapter 3 Introduction to ASP.NET 3.5.
Lecturer: Prof. Piero Fraternali, Teaching Assistant: Alessandro Bozzon, Advanced Web Technologies: Struts–
XML Web Services Architecture Siddharth Ruchandani CS 6362 – SW Architecture & Design Summer /11/05.
1 Geospatial and Business Intelligence Jean-Sébastien Turcotte Executive VP San Francisco - April 2007 Streamlining web mapping applications.
Getting started with ASP.NET MVC Dhananjay
CSI 3125, Preliminaries, page 1 SERVLET. CSI 3125, Preliminaries, page 2 SERVLET A servlet is a server-side software program, written in Java code, that.
ASP-2-1 SERVER AND CLIENT SIDE SCRITPING Colorado Technical University IT420 Tim Peterson.
APACHE STRUTS ASHISH SINGH TOMAR ast2124. OUTLINE Introduction The Model-View-Controller Design Pattern Struts’ implementation of the MVC Pattern Additional.
Northwest Arkansas.Net User Group Jay Smith Tyson Foods, Inc. Unit Testing nUnit, nUnitAsp, nUnitForms.
National College of Science & Information Technology.
Migrating to ASP.NET Core Challenges & Opportunities
Windows Communication Foundation and Web Services
The Post Windows Operating System
Introduction ITEC 420.
Introducing the Microsoft® .NET Framework
Build and Learn ASP.NET Workshop.
Tiny http client and server
Introduction to .NET Florin Olariu
z/Ware 2.0 Technical Overview
Automate Custom Solutions Deployment on Office 365 and Azure
Data Virtualization Tutorial… CORS and CIS
Introduction to Redux Header Eric W. Greene Microsoft Virtual Academy
ASP.NET Core* 1.0 The Future of Web Apps Shahed Chowdhuri
Distribution and components
Did your feature got in, out or planned?
Lean .NET stack for building modern web apps
Windows Communication Foundation and Web Services
CO6025 Advanced Programming
PHP / MySQL Introduction
Ch > 28.4.
MVC in ASP.NET Core: The new kid on the block
Explore web development with Microsoft ASP.NET Core 1.0
WEB API.
Dive deep into ASP.NET Core 1.0
Web Development Using ASP .NET
Welcome to GDC’05 Riyadh, Saudi Arabia
Model-View-Controller Patterns and Frameworks
Should I Transition to .NET Core? Will it hurt?
ApplinX Rod Carlson Senior Technical Lead.
Lecture 1: Multi-tier Architecture Overview
The Model Layer What is Model?
Building event-driven, long-running apps with Windows workflow
What’s new in ASP.NET Core and Entity Framework 2.2 (Preview 3)
Introduction to AppInventor
WEB SERVICES From Chapter 19, Distributed Systems
An Introduction to JavaScript
Louis DeJardin | Software Developer, Microsoft
Dot Net Application PROF. S. LAKSHMANAN, DEPT. OF B. VOC. (SD & SA),
Strategic Sponsors Sponsors and Partners Gold Sponsors Silver Sponsors.
The Future is Now with ASP.NET Core 3.0
#01# ASP.NET Core Overview Design by: TEDU Trainer: Bach Ngoc Toan
Running C# in the browser
Blazor A new framework for browser-based .NET apps Ryan Nowak
Concepts in ASP.NET Core App
ASP.NET Core Middleware Fundamentals
Presentation transcript:

By: Ahmed Marzouk OWIN & KATANA

Agenda A Brief History What is OWIN and Why? What is KATANA? OWIN Specifications OWIN/KATANA Goals KATANA Implementation Demo 2

A Brief History History of ASP 1996 – ASP (Active Server Pages) 2002 – ASP.NET Web Forms 2008 – ASP.NET MVC 2010 – ASP.NET Web Pages 2012 – ASP.NET WebAPI, SignalR 2014 – ASP.NET vNext 2015 – vNext > ASP.NET ASP.NET 5 > ASP.NET Core 1.0 3

Why OWIN? ASP.NET net result was a mature, feature-rich runtime and developer programming model. Challenges raised by the historical model Different features in one big DLL: System.Web.dll assembly (for example, the core HTTP objects with the Web forms framework). ASP.NET was included as a part of the larger.NET Framework, which meant that the time between releases was on the order of years. System.Web.dll itself was coupled in a few different ways to a specific Web hosting option: Internet Information Services (IIS). 4

Why OWIN? Two evolutionary steps: ASP.NET MVC and ASP.NET Web API Web applications were increasingly being developed as a series of small, focused components rather than large frameworks. ASP.NET MVC was released as an independent download. This gave the engineering team the flexibility to deliver updates much more frequently than had been previously possible. ASP.NET WebAPI Another major shift in Web application development due to the shift from dynamic, server-generated to static initial markup using AJAX Nugget so frequently updates No dependencies on System. Web so can hosted outside IIS 5

Why OWIN? So Why OWIN? What was needed was a single hosting abstraction that would enable a developer to compose an application from a variety of different components and frameworks, and then run that application on a supporting host. Why not hosting on IIS only? Use small, lightweight web server Avoid IIS performance overhead IIS might not be available… 6

What is OWIN? stands for: The Open Web Interface for.NET Inspired by Rack in the Ruby communityRack It creates an abstraction between Web servers and framework components It’s an open standardopen standard Authored by 2 MS guys: Benjamin Vanderveen and Louis DejardinBenjamin Vanderveen Louis Dejardin 7

What is KATANA? Katana is « just » Microsoft implementation of OWIN rules! So OWIN itself does not have any tools, libraries or anything else. It is just a specification. Whereas both the OWIN specification and Owin.dll are community owned and community run open source efforts, the Katana project represents the set of OWIN components that, while still open source, are built and released by Microsoft.OWINKatana These components include both infrastructure components, such as hosts and servers, as well as functional components, such as authentication components and bindings to frameworks such as SignalR and ASP.NET Web API.SignalRASP.NET Web API 8

OWIN/KATANA Goals OWIN Goals: creates an abstraction between Web servers and framework components KATANA Goals: Portable Components Modular Components Lightweight Components 9

OWIN Specifications Specifications on: Specifications main parts: Definition of Software Actors Request execution Application Delegate Environment Request data, Response data, Other data Application Startup URI and Paths Error Handling Versioning 10

Demo This bullet list is preset with animations Check Open source KATANA packages

OWIN Specifications Definition of Software Actors: Host: The process that hosts the other parts( IIS, Windows service, Console application) It is responsible for starting every thing up. Server: Responsible for binding to a TCP port, constructing the environment dictionary and processing requests through an OWIN pipeline. In IIS: Host == Server Middleware: Is just a piece of code that the request passes on the way to and from the application They can be used to inspect & modify both the incoming requests & outgoing responses. 12

OWIN Specifications Definition of Software Actors – Cont. : Pipeline of middlewares: As the server passes the request to the app using AppFunc, it send it through a pipeline of middlewares. Application: Is the part that responsible for generating the actual response. Technically, no difference between application and middleware except the fact that the application short circuit the pipeline by generating a response but the middleware alter the pass the request or response. Web Framework: Not part of actors but it’s a set of middleware that plug into the pipeline and expose their own set of APIs for developers to interact with. 13

OWIN Specifications Definition of Software Actors – Cont. : 14 Application Host Server Middleware

OWIN Specifications Application Delegate (AppFunc): The primary interface in OWIN is called the application delegate or AppFunc. An application delegate takes the IDictionary environment and returns a Task when it has finished processing. The application MUST eventually complete the returned Task, or throw an exception. Returning Task tell server to non block any process waiting request to finish. 15

Demo This bullet list is preset with animations Check MVC template with individual user account.

Demo This bullet list is preset with animations Simplest OWIN Middleware with IIS

OWIN Specifications Environment: The Environment dictionary stores information about the request, the response, and any relevant server state. Server is responsible for initiating it, but the application is responsible for response data and response body. The environment dictionary MUST be non-null, mutable and MUST contain the keys listed as required in the specifications. 18

OWIN Specifications 19

OWIN Specifications Application Startup: When the host process starts there are a number of steps it goes through to set up the application: 1.The host creates a Properties IDictionary and populates any startup data or capabilities provided by the host. 2.The host selects which server will be used and provides it with the Properties collection so it can similarly announce any capabilities. 3.The host locates the application setup code and invokes it with the Properties collection. 4.The application reads and/or sets configuration in the Properties collection, constructs the desired request processing pipeline, and returns the resulting application delegate. 5.The host invokes the server startup code with the given application delegate and the Properties dictionary. The server finishes configuring itself, starts accepting requests, and invokes the application delegate to process those requests. 20

OWIN Specifications The Flow after startup: 1.Client send Http request. 2.Server take separate it into pieces, and put them in an corresponding Environment dictionary items. 3.Server passes Environment Dictionary to the first middleware in the pipeline using AppFunc. 4.After middleware done it’s processing send it to the next one and etc. 5.Application generate a response and send the dictionary back to the last middleware in the pipeline till the first one. 6.When the dictionary arrive to the first middleware in the pipeline and this middleware finished processing, response will be send then connection will be close. Note: Application sets any response headers that it has to set before writing the response stream and send it to the client. 21

KATANA Implementation KATANA Startup class detection: 1.App.config or Web.config: 2.OwinStartup Attribute: 3.Put Startup class in the main project namespace. 22

KATANA Implementation KATANA Startup class detection – Cont. Note: There are another way (explicit way) when there are a project that have entry point t like console application: 23

KATANA Implementation IAppBuilder Include some methods that allow me to configure application behavior. With adding more KATANA components IAppBuilder will have additional extension methods that do specific functionalities related to the new components. 24

Demo This bullet list is preset with animations Simplest self-host app using OWIN

Demo This bullet list is preset with animations app.Run() app.Use() app.UseWelcomePage()

Demo This bullet list is preset with animations Low-level middleware

Demo This bullet list is preset with animations Middlewares pipeline Request / Response

Demo This bullet list is preset with animations Self-hosted WebAPI

Demo This bullet list is preset with animations Migrating from Global.ascx to Startup class

Demo This bullet list is preset with animations MVC side by side with OWIN pipeline

Demo This bullet list is preset with animations Migrating from self-hosted WebApi to IIS From IIS to Self-hosted WebAPI Debugging middleware with options

Thank You