Moving forward with ASP.NET Core

39
Moving forward with ASP.NET Core Gabriel Enea IT Consultant & Trainer – Strongbytes Microsoft MVP @dotnet18 #CodecampIasi #CodecampCluj #Spring2016

Transcript of Moving forward with ASP.NET Core

Page 1: Moving forward with ASP.NET Core

Moving forward with ASP.NET CoreGabriel EneaIT Consultant & Trainer – StrongbytesMicrosoft MVP@dotnet18

#CodecampIasi #CodecampCluj #Spring2016

Page 2: Moving forward with ASP.NET Core

To be discussedASP.NET Framework

Performance

Tooling

Deploying apps

What’s going on?

What’s new about this?

Can I move away from Visual Studio?

Are there any other options?

Page 3: Moving forward with ASP.NET Core

A bit of context..

Page 4: Moving forward with ASP.NET Core

2013, OWIN + Project K Open Web Interface for .NET (OWIN) Katana Portable Modular/flexible Lightweight/performance/scalable

Open Source

Say goodbye to System.Web!

Page 5: Moving forward with ASP.NET Core

2014, Introducing ASP.NET vNext

.NETvNext Web and services

Device optimized Native compilation Small footprint, side-by-side Cross-device enabled

Cloud optimized High throughput Small footprint, side-by-side Cross-platform enabled

Windows Store, WPF, Windows Forms, Console apps and related libraries.

ASP.NET vNext: Web Forms, MVC, Web Pages, Web API, SignalRWCF

Client apps

Next gen JIT (“RyuJIT”)SIMD (Data Parallelization)

Runtime

Compilers.NET Compiler Platform (“Roslyn”)

Languages innovationBCL and PCLEntity Framework

Libraries

Common

Openness

Multi-purpose

Specialized

Page 6: Moving forward with ASP.NET Core

2015

Page 7: Moving forward with ASP.NET Core

ASP.NET 5 in a NutshellMVC 6

ASP.NET 5

.NET Execution Environment (DNX)

ASP.NET 4.6(System.Web)

MVC Web API

WebForms

.NET Framework .NET Core Full .NET Framework for any scenario and

library support on WindowsModular libraries & runtime optimized

for server and cloud workloads

Page 8: Moving forward with ASP.NET Core

2016, JanuaryHanselman: ASP.NET 5 is dead

Page 9: Moving forward with ASP.NET Core

2016 - .Net Framework

Source: http://www.hanselman.com/blog/AnUpdateOnASPNETCore10RC2.aspx

Page 10: Moving forward with ASP.NET Core

(ASP).NET Framework - What’s going on?

Page 11: Moving forward with ASP.NET Core

"There are only two hard things in Computer Science:

cache invalidation and naming things.“

-- Phil Karlton

Page 12: Moving forward with ASP.NET Core

The .NET Platform Standard

Page 13: Moving forward with ASP.NET Core

Mapping the .NET Platform Standard to platforms

Target Platform Name Alias.NET Platform Standard

netstandard 1.0 1.1 1.2 1.3 1.4 1.5

.NET Core netcoreapp → → → → → 1.0

.NET Framework net → → → → → 4.6.2

→ → → → 4.6.1

→ → → 4.6→ → 4.5.

2→ → 4.5.

1→ 4.5

Universal Windows Platform uap → → → → 10.0Windows win → → 8.1

→ 8.0Windows Phone wpa → → 8.1Windows Phone Silverlight wp 8.1

8.0Mono/Xamarin Platforms → → → → → *Mono → → *

Page 14: Moving forward with ASP.NET Core

ASP.NET Core

Page 15: Moving forward with ASP.NET Core

ASP.NET Core in a Nutshell

.NET Framework .NET Core

Full .NET Framework for any scenario and library support on Windows

Modular libraries & runtime optimized for server and cloud workloads

ASP.NET 4.6(System.Web)

MVC ASP.NET Core MVC

ASP.NET Core 1.0(Microsoft.AspNetCore)

Web API

WebForms

Page 16: Moving forward with ASP.NET Core

ASP.NET frameworks - similar, but different

MVC Web APIWeb Pages

Razor

HTML Helpers HTML Helpers

Controllers Controllers

Actions Actions

Filters Filters

Model binding Model binding

DI DI

Page 17: Moving forward with ASP.NET Core

MVC + Web API + Web Pages

=ASP.NET Core MVC

Page 18: Moving forward with ASP.NET Core

ASP.NET Core featuresHostingKestrel, StartupMiddlewareRouting, authentication, static files, diagnostics, error handling, session, CORS, localization, customDependency InjectionConfigurationLoggingApplication frameworksMVC, Identiy, SignalR (future)

Page 19: Moving forward with ASP.NET Core

ASP.NET Project StructureMultiple frameworksproject.jsonglobal.jsonwwwroot folder

Page 20: Moving forward with ASP.NET Core

Middlewares

Page 21: Moving forward with ASP.NET Core

ASP.NET Core Performance

Page 22: Moving forward with ASP.NET Core
Page 23: Moving forward with ASP.NET Core

Benchmarks for ASP.NET 5

http://web.ageofascent.com/asp-net-core-exeeds-1-15-million-requests-12-6-gbps/

2300% More Requests Served Per Second

Page 24: Moving forward with ASP.NET Core

Benchmarks for ASP.NET Core @Build2016

3.4 million Requests Per Second

Page 25: Moving forward with ASP.NET Core

ASP.NET Core Tooling

Page 26: Moving forward with ASP.NET Core

Tooling

Page 27: Moving forward with ASP.NET Core

Command Prompt

.NET CLI https://github.com/dotnet/cli

dotnet new

dotnet restore

dotnet build

dotnet run

Page 28: Moving forward with ASP.NET Core

Yeoman - generator-aspnet

The web's scaffolding tool for modern webapps

npm install -g yo

npm install -g generator-aspnet

yo aspnet

Page 29: Moving forward with ASP.NET Core

Yeoman - generator-aspnet

Page 30: Moving forward with ASP.NET Core

Visual Studio Code 1.0 Any language, any OS

Optimized for modern web

Extensions

Open Source

Source: https://www.visualstudio.com/products/code-vs

Page 31: Moving forward with ASP.NET Core

Deploying ASP.NET Core Apps

Page 32: Moving forward with ASP.NET Core

Hosting options

Page 33: Moving forward with ASP.NET Core

Deploying in production

Internet

Kestrel

Proxy Kestrel

Kestrel

Page 34: Moving forward with ASP.NET Core

“Talk is cheap. Show me the code.” -

Linus Torvalds

Page 35: Moving forward with ASP.NET Core

It’s time to move forward..

Page 36: Moving forward with ASP.NET Core

It’s time to move forward.. dotnet.github.io github.com/dotnet/cli github.com/aspnet github.com/aspnet/cli-samples

Page 37: Moving forward with ASP.NET Core

Thank you!

Page 38: Moving forward with ASP.NET Core
Page 39: Moving forward with ASP.NET Core

Moving forward with ASP.NET CoreGabriel EneaIT Consultant & Trainer – StrongbytesMicrosoft MVP@dotnet18

#CodecampCluj #Spring2016

#TheEnd