AG • Focus on – Mobile & web-based application architectures – Interoperability, cross-device – Pragmatic end-to-end solutions • Microsoft MVP for ASP.NET (Architecture) ASP.NET Web API / vNext Advisory Board Member ASPInsider, AzureInsider • Google GDE for AngularJS • http://blogs.thinktecture.com/cweyer [email protected] @christianweyer 2
Linux strong in server landscape/hosting – Licenses & costs – Lower system footprint – Microsoft Azure offers Linux out-of-the-box • Virtualization environments are going to rule – VMs – Docker • Developing applications on Windows, Linux or MacOSX 5
Stack: JavaScript in Browser, node.js in Backend • .NET – Stable, mature – especially on the server – No fragmentation like on the client-side • .NET vNext & ASP.NET vNext enable the next step 6
is a service-based architecture – Services != SOA J • Often deployed as a distributed application architecture – Online vs. Offline – Light-weight communication 11
ApiController • Implement actions – Actions map to HTTP methods – Prefix method name with desired HTTP method – e.g. PostComment – Or use [HttpGet/Post/Put/Delete] • Several hosting options, e.g. – ASP.NET Web Application (IIS) – Self-host server (console application, Windows service, etc.) 16
official pattern – Observer pattern, anyone? • Model a service that – accepts incoming connections from callers – is able to push data down to callers – abstracts from communication nitty-gritty details • Realize Publish-Subscribe semantics – Based on standard web technologies with reach in mind – With maximum reach into any device, platform Push Service Consumer Send data External event (Database) External event (Message queue) External event (Other actor) Notify [data] 17
services – Set of client libraries to make push service communication easy to use on any platform – Optimized for asynchronous processing • Abstracts from the different techniques to implement pushing data – Mental model is a persistent connection – Volatile, non-durable • Negotiation of transport: WebSockets, SSE, Forever Frame, Long Polling 18
on interfaces & DI • Two programming models – Persistent connections – Hubs • Hubs offer a pre-defined application-level protocol in an RPC-ish style – Easy-to-get-going way for 80/20 situations 19
API 2 & SignalR 2 run on Mono – Windows, MacOSX & Linux – Tested with 3.12;; issues in 4.0.x;; works in 4.2 Alpha • Self-Hosted – Web-Hosted has issues • Limitations in 3.12 – OWIN & IPrincipal behavior – CORS 20
.NET Compiler Platform (Roslyn) Languages innovation .NET Framework 4.6 .NET Core 5 Fully-featured and integrated .NET libraries and runtime for Windows Modular and optimized .NET libraries and runtimes Base class libraries NuGet packages Libraries
version 5 • Runs on .NET 4.6, Mono or CoreCLR • MVC‘s next release is named ‚6‘ • Web API is gone (no longer a framework on its own) – Integrated with MVC – Common routing, controllers etc. • SignalR still a separate thing 23
Services – One view onto the world of HTTP • Entirely new pipeline implementation – Based on the ideas of OWIN • Deriving from base controller no longer necessary – Useful helpers can be reached via base class • Quite straight forward to port over from Web API 2 25
Windows, Linux, MacOS X • Strong in classic SQL tasks • Supports document-based NoSQL since version 9.3 – JSON and JSONB • npgsql driver for .NET – With ADO.NET API – Support for Entity Framework 30
deployment/licensing decision • ASP.NET Web API & SignalR work reliably (enough) on Mono & Linux today • Mono may converge with .NET Core as its underpinnings • Maybe you do not need to move to ASP.NET 5 (yet) – At least not migrate or port existing applications 31