the next step from microsoft - vnext (srdjan poznic)
TRANSCRIPT
PARTNERSHIP
The next step from Microsoft - vNext
October, 2014
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)
Current state of ASP.NET
- MVC
- WebAPI
- WebPages, WebForms
- Entity Framework
Mature enough?
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?
- …
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.
- …
ASP.NET vNext
- Latest: ASP.NET vNext alpha4(October, 6th)
- Visual Studio 14 CTP 4(Community Technology Preview)
- .NET Framework v4.5.3
New approach
- .NET InnovationInnovation on the core of existing and future applications
- Flexibility and agile deliveryContinuous modular releases
- OpennessTransparent, open and community driven
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)
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
Demo
New features
- Side-by-side deployment- Exact same code is running on both machines- no GAC
- Open source
- Cross-platform (Windows, Mac, Linux)
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
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.
What is new in asp.net?
- No Web.Config anymore
- No Global.asax
- No packages.xml file
- No DLLs anymoreAspNet.Loader.dll
Runtime performances
- Old HttpContext removed (~30K)
- New HttpContext (~2K)
- GC
- Faster startup time
- Lower memory
- REST vs Line Business Apps (historical reasons)
Faster development
- Change the file > Save > Refresh the browser
- Faster development (dynamic compiling)
- Cloud optimized
- Develop in cloud editors
Cloud- Seamless transition to cloud
(Same code is running)
- Configuration
- Session(SessionState to SessionStateProvider)
Cloud- Cache
Azure Redis Cache / Asp.net cache
- Run/Debug in Cloud Visual Studio Online “Monaco”
- Tracing/Logging without re-deploy
Extending application types
- Knockout
- AngularJS
- Ember
- Backbone
- …
Common improvements
- DI everywhere
- Tracing and Diagnostics
- Consistency
Dependency Injection
- Scoped/Transient/Instance/Singleton
- Scoped (per request scope):
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.
Demo
K Runtime
K Runtime
• 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
K tools
- KVM (K runtime version manager)
- Switch between versions
- Switch between .NET runtimes
- Upgrade K Runtime
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)
Roslyn
- (.NET) Compiler as a Platform
- Mission?
- Opportunities for:
- meta-programming- code generation and transformation- interactive use of the C# and VB languages
Roslyn
Roslyn
- API and Pipeline
Roslyn
- WebForms, MVC5, WebAPI 2, WebPages 3, SignalR 2, EF 6
- fully supported by Roslyn
Roslyn
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/
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
- RyuJIT: The next-generation JIT compiler for .NET
Future of the core
- Why not nugget/MSBuild?
- Gulp
- Grunt
- Bower
Future of the front end build process
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
Known issues:
- After creating new vNext project, empty project folder is created under the solution folder
- New project not under “src”
- KVM installation
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
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/
http://www.meetup.com/NET-User-Group-Novi-Sad/
O autoru…
- Mail: [email protected] twitter: @srdjanpoznic- Linked in: http://goo.gl/bXA7Av
T H A N K Y O U