the next step from microsoft - vnext (srdjan poznic)

44
PARTNERSHIP The next step from Microsoft - vNext October, 2014 Srdjan Poznic

Upload: geekstone

Post on 13-Jan-2017

34 views

Category:

Software


2 download

TRANSCRIPT

Page 1: The next step from Microsoft - Vnext (Srdjan Poznic)

PARTNERSHIP

The next step from Microsoft - vNext

October, 2014

Srdjan Poznic

Page 2: The next step from Microsoft - Vnext (Srdjan Poznic)

History of ASP.NET

- Released in 2002 with VisualStudio.NET

- ASP.NET Ajax (2007)

- ASP.NET Dynamic Data (2008)

- ASP.NET MVC added (2009)

- WebAPI added (2012)

- OWIN and SignalR introduced (2013)

Page 3: The next step from Microsoft - Vnext (Srdjan Poznic)

Current state of ASP.NET

- MVC

- WebAPI

- WebPages, WebForms

- Entity Framework

Mature enough?

Page 4: The next step from Microsoft - Vnext (Srdjan Poznic)

Idea?

- What we can do to make .NET better on the cloud?

- What we can do to make .NET better on the hosted environment?

- How to improve development cycle?

- …

Page 5: The next step from Microsoft - Vnext (Srdjan Poznic)

What customers say?

- We want open-source!

- We need to deliver much faster

- We need cross-device development strategy

- My customer can’t update to new version of framework.

- …

Page 6: The next step from Microsoft - Vnext (Srdjan Poznic)

ASP.NET vNext

- Latest: ASP.NET vNext alpha4(October, 6th)

- Visual Studio 14 CTP 4(Community Technology Preview)

- .NET Framework v4.5.3

Page 7: The next step from Microsoft - Vnext (Srdjan Poznic)

New approach

- .NET InnovationInnovation on the core of existing and future applications

- Flexibility and agile deliveryContinuous modular releases

- OpennessTransparent, open and community driven

Page 8: The next step from Microsoft - Vnext (Srdjan Poznic)

Goal

- Fast

- Open-source

- Modular

- Cross-platform support

- Choose editors/tools

- Faster development cycleNew builds and inside the tools

(Use pieces that you what to use)

Page 9: The next step from Microsoft - Vnext (Srdjan Poznic)

What is new?

- All about NuGet

- New run-time engine called „K“

- Roslyn compiler

- New project system

- New configuration system

- Cloud optimized .NET (CoreCLR) takes ~11MB

Page 10: The next step from Microsoft - Vnext (Srdjan Poznic)

Demo

Page 11: The next step from Microsoft - Vnext (Srdjan Poznic)

New features

- Side-by-side deployment- Exact same code is running on both machines- no GAC

- Open source

- Cross-platform (Windows, Mac, Linux)

Page 12: The next step from Microsoft - Vnext (Srdjan Poznic)

What is new in asp.net?

- MVC, WebAPI, WebPages 6, SignalR 3, EF 7

- MVC, Web API & Web Pages have been merged into one

- Cloud-optimized versions of MVC, WebAPI, Web Pages, SignalR, and EF

- Host agnostic – runs not only under IIS

Page 13: The next step from Microsoft - Vnext (Srdjan Poznic)

What is new in asp.net?

- Removing System.Web- Moving to OWIN middleware- e.g. Error screen replacement- HttpContext (minimum info in object graph)

- The result is a leaner framework, with faster startup time and lower memory consumption.

Page 14: The next step from Microsoft - Vnext (Srdjan Poznic)

What is new in asp.net?

- No Web.Config anymore

- No Global.asax

- No packages.xml file

- No DLLs anymoreAspNet.Loader.dll

Page 15: The next step from Microsoft - Vnext (Srdjan Poznic)

Runtime performances

- Old HttpContext removed (~30K)

- New HttpContext (~2K)

- GC

- Faster startup time

- Lower memory

- REST vs Line Business Apps (historical reasons)

Page 16: The next step from Microsoft - Vnext (Srdjan Poznic)

Faster development

- Change the file > Save > Refresh the browser

- Faster development (dynamic compiling)

- Cloud optimized

- Develop in cloud editors

Page 17: The next step from Microsoft - Vnext (Srdjan Poznic)

Cloud- Seamless transition to cloud

(Same code is running)

- Configuration

- Session(SessionState to SessionStateProvider)

Page 18: The next step from Microsoft - Vnext (Srdjan Poznic)

Cloud- Cache

Azure Redis Cache / Asp.net cache

- Run/Debug in Cloud Visual Studio Online “Monaco”

- Tracing/Logging without re-deploy

Page 19: The next step from Microsoft - Vnext (Srdjan Poznic)

Extending application types

- Knockout

- AngularJS

- Ember

- Backbone

- …

Page 20: The next step from Microsoft - Vnext (Srdjan Poznic)

Common improvements

- DI everywhere

- Tracing and Diagnostics

- Consistency

Page 21: The next step from Microsoft - Vnext (Srdjan Poznic)

Dependency Injection

- Scoped/Transient/Instance/Singleton

- Scoped (per request scope):

Page 22: The next step from Microsoft - Vnext (Srdjan Poznic)

To me, as a developer, this means

- I get all the advantages of the .NET platform (performance, stability, security, comprehensive API)

- The development experience of C# and Visual Studio... with the simplicity, portability, quick development refresh cycle and flexibility of an interpreted web framework.

Page 23: The next step from Microsoft - Vnext (Srdjan Poznic)

Demo

Page 24: The next step from Microsoft - Vnext (Srdjan Poznic)

K Runtime

Page 25: The next step from Microsoft - Vnext (Srdjan Poznic)

K Runtime

Page 26: The next step from Microsoft - Vnext (Srdjan Poznic)

• Find and call the CLR Native host• Pass in arguments given to the process to the native host

Layer 0Native processs

• Boot the CLR• Calling the Managed Entry Point, Layer 2

Layer 1CLR Native Host

• Create the LoaderContainer that will contain the required Iloaders• Provide the root ILoader that will load assemblies, and satisfy dependencies• Call the main entry point of the provided program

Layer 2Managed Entry point

• Walks the dependencies in the project and builds up the closure of dependencies• Adds ILoader => LoaderContainer that can load assemblies from various sources• Calls the entry point of assembly name given as the next argument given to KLR.exe

Layer 3Application Host

• Developer’s application code when running on the application hostLayer 4

Application

K Runtime Layering

Page 27: The next step from Microsoft - Vnext (Srdjan Poznic)

K tools

- KVM (K runtime version manager)

- Switch between versions

- Switch between .NET runtimes

- Upgrade K Runtime

Page 28: The next step from Microsoft - Vnext (Srdjan Poznic)

K tools

- KPM (K runtime package manager)

- Downloads or restores packages for application

- Runs from command-line

- Uses project file to detect required packages

kpm listkpm usekpm upgradekpm pack (-- runtime)

Page 29: The next step from Microsoft - Vnext (Srdjan Poznic)

Roslyn

- (.NET) Compiler as a Platform

- Mission?

- Opportunities for:

- meta-programming- code generation and transformation- interactive use of the C# and VB languages

Page 30: The next step from Microsoft - Vnext (Srdjan Poznic)

Roslyn

Page 31: The next step from Microsoft - Vnext (Srdjan Poznic)

Roslyn

Page 32: The next step from Microsoft - Vnext (Srdjan Poznic)

- API and Pipeline

Roslyn

Page 33: The next step from Microsoft - Vnext (Srdjan Poznic)

- WebForms, MVC5, WebAPI 2, WebPages 3, SignalR 2, EF 6

- fully supported by Roslyn

Roslyn

Page 34: The next step from Microsoft - Vnext (Srdjan Poznic)

Tools

- Nuget Package Explorerhttps://npe.codeplex.com/

- Process Explorer

- API Portability Analyzer – Alphahttp://www.microsoft.com/en-us/download/details.aspx?id=42678

- MyGethttps://www.myget.org/

- Sublime editorhttp://www.sublimetext.com/

Page 35: The next step from Microsoft - Vnext (Srdjan Poznic)

More..

- .NET Native

- .NET Native compiles C# to native machine code that performs like C++

- Popular Windows Store apps start up to 60% faster and use 15-20% less memory when compiled with .NET Native.

- C++ updates

- Command line scaffolding

Page 36: The next step from Microsoft - Vnext (Srdjan Poznic)

- RyuJIT: The next-generation JIT compiler for .NET

Future of the core

Page 37: The next step from Microsoft - Vnext (Srdjan Poznic)

- Why not nugget/MSBuild?

- Gulp

- Grunt

- Bower

Future of the front end build process

Page 38: The next step from Microsoft - Vnext (Srdjan Poznic)

Known issues:

- Browser linkFix: Disable Browser Link http://blogs.msdn.com/b/webdev/archive/2013/06/28/browser-link-feature-in-visual-studio-preview-2013.aspx

- Missing ASP.NET Loader IIS assemblyFix?

- Opening project.json as a project may lead to the wrong output typeFix: Change output type

Page 39: The next step from Microsoft - Vnext (Srdjan Poznic)

Known issues:

- After creating new vNext project, empty project folder is created under the solution folder

- New project not under “src”

- KVM installation

Page 40: The next step from Microsoft - Vnext (Srdjan Poznic)

WARNING!

- This shows what the ASP.NET team is working on

- DO NOT use it in Production

- DO NOT run it on your development machine

Page 41: The next step from Microsoft - Vnext (Srdjan Poznic)

Links

- WebDev blog: http://blogs.msdn.com/b/webdev

- Asp.net: www.asp.net/vnext

- Asp.net Github: https://github.com/aspnet

- Scott’s blog: http://www.hanselman.com/

Page 43: The next step from Microsoft - Vnext (Srdjan Poznic)

O autoru…

- Mail: [email protected] twitter: @srdjanpoznic- Linked in: http://goo.gl/bXA7Av

Page 44: The next step from Microsoft - Vnext (Srdjan Poznic)

T H A N K Y O U