Build and Learn ASP.NET Workshop
Agenda Current state What’s new Required Tools The Project
Little bit of History OWIN MVC ASP Classic Core Web API Web Forms Lets try to understand motivations Classic – just a templating lang Webforms – apps will be big monolithic integrated systems RoR came, MVC become popular SPA and JS heavy apps were getting traction Owin – simplification and community based re-architecture of web stack Core – MS started with owin effort, went x-plat, bought xamarin Web Forms
The Language 1.0 released 2002 2.0 – generics 3.0 – lambda, LINQ 4.0 – dynamic, concurrency 5.0 – async 6.0 – Roslyn, avoid boilerplate 7.0 (2017) – pattern matching, records, … Language evolved greatly Leading trends with linq, async and integration of func features into oop PS, but F# is better …
ASP.NET 5 Frameworks Web Pages MVC Web API Razor HTML Helpers Controllers Controllers Actions Actions Multiple efforts, not so well connected Evolved over the years Different abstractions and base classes, not sharable between fx Filters Filters Model binding Model binding DI DI
Motivation - Nodejs showed how projects can be simple, people liked that
OWIN HOST OWIN SERVER Request Response Middleware Middleware Application Community proposed new model Pipeline, line onion. Chain of responsibility pattern Response
OWIN specs using AppFunc = Func< IDictionary<string, object>, // Context Task>; // Promise
Core in a Nutshell .NET Framework .NET Core Web Forms MVC Web API ASP.NET Core MVC ASP.NET 4.6 (System.Web) ASP.NET Core 1.0 (Microsoft.AspNetCore) .NET Framework .NET Core Full .NET Framework for any scenario and library support on Windows Modular libraries & runtime optimized for server and cloud workloads
Web Pages + MVC + Web API = ASP.NET Core MVC
Changes Hosting Kestrel Unified framework DI Tag Helpers CLI-first Added Removed Changed Hosting Kestrel Unified framework DI Tag Helpers CLI-first Web UI controls (WebForms) System.Web HTTP Handlers and Modules WCF/Asmx Global.asax Web.config CORS JsonPatch Logging Localization Performance EF
.NET Standard Next generation of PCL Describes API surface Independent of platform and lineary versioned, compared to PCL METAPACKAGE – set of packages that are meaningful together Netcore is a metapackage – netstandard + console app model
Tools
Tools Runtime IDE Optional http://get.asp.net (Linux or Windows SDK) Visual Studio 2015 with latest Update 5 (win only) Visual Studio Core with C# extension (cross platform) JetBrains Rider (still in alpha, EAP available, cross platform) Optional NPM Yeoman & generator-aspnet
Hosting Win vs Linux © https://twitter.com/secretGeek/status/781774139489030144
Hello World with .NET Core Demo
The Project Idea – lets pick one Voting Feature breakdown Has all technical components (UI, business domain, database) Is useful Not too complex Can be done in time Open sourced, deployed to public Voting Feature breakdown Group work (source control)
Thank you! Proposed dates for next workshops: New location November 10th November 24th December 8th New location Bring your laptop! Install Visual Studio Full or Code, and Git