.NET vNext e lo sviluppo web cross-platform Alessandro Bigi, Gianluca Bertelli - Microsoft
Agenda .NET vNext ASP.NET 5 .NET Framework 4.6 .NET Core 5 Demo Console App ASP.NET 5 Introduzione PipeLine SideBySide Selfhosting Demo ASP.NET 5 Agenda
.NET vNext Gianluca Bertelli gianlucb@microsoft.com
.NET Framework 4.6 .NET Framework 4.6 In-place upgrade 100% compatibile con base esistente WPF per applicazioni Desktop ASP.NET 5 è supportato Nuovo compilatore (ROSLYN), Nuovo Jit (RYUJIT) Innovazioni del Linguaggio C# 6 Evolution in time .NET Framework 4.5.2 .NET Framework 4.5.1 .NET Framework 4.5
+ IL Compiler - ROSLYN Code Roslyn IL BCL Compilatore cross-platfom Open-Source Estendibile / VS Api Code (my.cs) + IL References (Modular, NuGet) BCL App Model Roslyn https://github.com/dotnet/roslyn
JIT Compiler - RyuJIT IL Compilatore JIT 64-Bit (altre piattaforme nel futuro) Compilazione 30% piú veloce Minore consumo di memoria Cross-platform Machine code 01010101010101 IL my.dll RyuJIT http://blogs.msdn.com/b/dotnet/archive/2013/09/30/ryujit-the-next-generation-jit-compiler.aspx Maggiore boot time Base framework A runtime
.NET Native tool chain IL Compilazione nativa con link statico delle dipendenze Runtime differente, NON utilizza il framework installato Maggiore ottimizzazione del codice macchina prodotto Sotto insieme di funzionalita’ .NET Windows Store App only Dipendenze IL my.dll .NET native runtime A compile time .NET Native 01 Solo UWP and ASP.NET 5 Passagigo intermedio, viene prodotta la normale DLL + MSIL, successivamente trasformata in codice macchina Boot time e tempo di serializzazione nettamente superiori, in quanto non deve piú compilare (no JIT)
.NET Framework 4.6 Shared WPF Windows Forms ASP.NET (4 & 5) Fully-featured and integrated .NET libraries and runtime for Windows Modular and optimized .NET libraries and runtimes Qui vediamo una panoramica tutta assieme Shared RyuJIT + SIMD Garbage Collector Runtime components Base class libraries NuGet packages Libraries Compilers .NET Compiler Platform (Roslyn) Languages innovation
Base Class Library (CoreFX) .NET Core (5 ?) My APP Base Class Library (CoreFX) API surface CoreClr CoreClr CoreClr .NET Core Windows Linux Mac OS X CoreCLR = runtime cross-platform per .NET Core CoreFX = insieme di librerie cross-platform
Project.json (ex app.config) ... "dependencies": { }, "commands": { "MyClass": "MyClass x y z" }, "frameworks": { "dnx451": { }, "dnxcore50": { } } … ??
.NET Core - Runtimes DNX = Ambiente di esecuzione (es: dnx.exe) C# Code DNX CoreClr Installato nella macchina Mac OS X Windows Linux Clr Mono Mono Win10 DNX = Ambiente di esecuzione (es: dnx.exe)
.NET Core - Frameworks Ogni progetto puo’ specificare uno o piu Framework Clr - 32-bit - 64-bit CoreClr Mono dnx451 dnx452 dnx46 dnxcore5 Specificato nel file project.json Come PCL, ma non intersezione
Demo Hands-on .NET vNext
.NET Core - Recap Runtime e Framework cross-platform XCOPY Project.json Gestione automatica dipendeze, NuGet L’ applicazione viene lanciata all’interno di un ambiente esecuzione (DNX) Bootstrap dell’applicazione, caricamento Framework Gestione delle dipendenze (NuGet) By default non vengono prodotti binari Dnvm list Dnx ProjectName Dnu publish
.NET Native .NET Framework 4.6 Console App WPF Windows Forms ASP.NET (4 & 5) ASP.NET 5 Universal Windows Apps .NET Core 5 CoreCLR .NET Native .NET Framework 4.6 Fully-featured and integrated .NET libraries and runtime for Windows Modular and optimized .NET libraries and runtimes Qui vediamo una panoramica tutta assieme Shared RyuJIT + SIMD Garbage Collector Runtime components Base class libraries NuGet packages Libraries Compilers .NET Compiler Platform (Roslyn) Languages innovation
ASP.NET 5 Alessandro Bigi albigi@microsoft.com
ASP.NET 5: principali novità HTTP Pipeline Side by side deployment Self hosting MVC 6 ASP.NET 5: principali novità Rifare slide, Focus su pipeline, side by side dev, self hosting Menzionare MVC
ASP.NET 5: HTTP pipeline ASP.NET 4 ASP.NET 5 HTTP Module HTTP Module IIS ASP.NET 4 ASP.NET 5: HTTP pipeline HTTP Module HTTP Module HTTP Handler IHttpModule + IHttpHandler Request Response HttpContext DNX ASP.NET 5 Request App Middleware 1 App Middleware 2 App Middleware 3 Request delegates Response HttpContext
Exception Handler IIS Plat Handler Static Files Identity MVC
Side by side deployment install? Side by side deployment Update domain Web App 1 ASP.NET 2.0 AJAX Control Toolkit x86 Web App 2 ASP.NET 3.5 Windows Identity Framework x64 Web App 3 ASP.NET 4.5.2 WS-Federated Authentication IIS Deployment domain deploy GAC applicationHost.config ASP.NET global config ASP.NET 4
Web App 1 Web App 2 Web App 3 ASP.NET 5 install deploy DNX 1.0.0-beta8 clr x86 Web App 2 DNX 1.0.0-rc1 coreclr x64 Web App 3 DNX 1.0.0-rc2 install Deployment & update domain Web Server deploy ASP.NET 5
Self hosting ASP.NET Legacy IIS ASP.NET vNext DNX Runtime Listener .NET Framework Listener HTTP.sys ASP.NET vNext DNX .NET vNext Request provider Kestrel Web Listener ??? Self hosting Application Hosting Environment
Nuovo design Moderno Versatile ASP.NET 5: recap Veloce Agile Snello Modulare Flessibile Nuovo design On-premises & Cloud Supporto nativo NuGet Web UI & Web API Open source Moderno Retrocompatibile (System.Web) C# e VB* Self-hosting Xplat da subito! (.NET Core) Versatile Veloce Agile ASP.NET 5: recap * Supporto VB in successive release
Bibliografia Roslyn - https://github.com/dotnet/roslyn DotNet Vnext - https://github.com/dotnet CoreCLR home - https://github.com/dotnet/coreclr ASP.Net 5 home - https://github.com/aspnet/home ASP.Net 5 announcements - https://github.com/aspnet/Announcements ASP.NET docs - http://docs.asp.net/en/latest/ Daniel Roth twitter - @danroth27
Thank You! Alessandro Bigi albigi@microsoft.com Gianluca Bertelli gianlucb@microsoft.com