asp.net vNext 
The future of the Server 
MAXIME LEMAITRE – 11/12/2014
Agenda 
• Before to start 
• Let’s 
– create a new MVC project.. 
– open the project file … 
– add a reference … 
– add a nuget package … 
– build a class library… 
– build & publish the project… 
– edit source code… 
– add some configuration … 
– add a web api … 
– play with bower/gulp/grunt … 
• asp.net core & project K 
• Questions
Based on latest asp.net 
vNext version (Nov. 2014)
Let’s create a new MVC project … 
What’s different ? 
• New sections 
– wwwroot 
– Dependencies 
• New Solution structure 
– Src, artefacts, … 
• New files 
– project.json 
– global.json 
– (package.json) 
– (grunfile.js) 
– (bower.json) 
• Missing files/folders 
– MVC Content/Scripts/AppStart 
– Web.config 
– global.asax
Let’s open the project file … 
What’s different ? 
• K Project file is smaller 
– Where are references ? 
– Where are source code files ? 
– Where are X & Y ? 
• A new project.json file 
– Project settings 
– Dependencies & Frameworks 
– Commands 
– (but still no files)
Let’s add a reference … 
What’s different ? 
• No more direct dependencies 
• No more GAC dependencies 
• NuGet everything, even the 
runtime itself. 
Dependencies are now defined in project.json
Let’s add a nuget package …
Let’s add a nuget package … 
• Brand New UI 
• Version Selection 
• Combined Installed/Online/Updates 
Workflows 
• Version Consolidation 
• Operation Previews 
• Installation Options (Dep behavior & 
conflict action) 
• Infinite Scrolling 
• …
Let’s build a class library … 
• New project type 
• Nuget packages “All the way” 
• Cross compiling (net40, net45, 
aspnet, aspnetcore, …) 
• Can be built via command line 
or VS
Let’s build & publish the project … 
• What about the deployable package ? 
– the assemblies never exist on the disk 
– the compiler do all the work in memory 
Tip : > SET KRE_TRACE=1 
• Same experience 
between command 
prompt and VS 
• Cross-platform
Let’s edit source code … 
No-compile 
developer 
experience ! 
vNext uses the Rosyln compiler to compile code dynamically. You will be able to edit a code file, refresh 
the browser, and see the changes without rebuilding the project.
Let’s add some configuration … 
• No more .config file ! But a new lightweight model 
– Configuartion that works everywhere (Core & Full CLR) 
– Configuration can be instantiated and initialized by the 
application 
Project.json 
Config.json Config.xml 
Config.ini 
Supports also command 
line arguments & 
environement variables ! 
Tip : ConfigR may help… Program.cs
Let’s add a web api … 
• MVC, Web API, and Web Pages will 
be merged into one framework, 
called MVC 6 
– removes a lot of overlap between 
the existing MVC and Web API 
frameworks 
– uses a common set of abstractions 
for routing, action selection, filters, 
model binding, and so on 
– use the framework to create both UI 
(HTML) and web APIs. 
• No dependency to System.Web 
– leaner framework, with faster 
startup time and lower memory 
consumption
Let’s play with bower/gulp/grunt … 
• VS 2015 Preview has built-in support for popular 
package managers 
– Bower. Described as a “package manager for the 
web,” Bower lets you install and restore client-side 
packages, include JavaScript and CSS libraries. 
– Grunt and Gulp. Grunt and Gulp are JavaScript-based 
task runners. 
– npm : npm is a package manager that was originally 
created for Node.js. Bower, Grunt, and Gulp all use 
npm. 
• wwwroot folder 
– All of the static files (generated or not) in your 
project go into this folder
Microsoft’s Special K 
• KRE – K Runtime Environment is the 
code required to bootstrap and run an 
ASP.NET vNext application. This 
includes things like the compilation 
system, SDK tools, and the native CLR 
hosts. 
• KVM – K Version Manager is for 
updating and installing different 
versions of KRE. KVM is also used to 
set default KRE version. 
• KPM – K Package Manager manages 
packages needed by applications to 
run. Packages in this context are 
NuGet packages. 
Read more here
Levels of abstractions 
• The host application – in the past this 
was ALWAYS Microsoft Internet 
Information Server (IIS). This could be 
IIS, IIS with Helios, Katana, or some 
other OWIN capable host. 
• The CLR framework – previously you 
would choose which version of the 
Microsoft.NET framework you wanted 
to use. This may be .NET 4.5.2, K 
runtime, or Mono. 
• The Application Host – previously, this 
would be the W3C executable. Now, 
this can be a host for the Visual Studio 
designer, or the new 
Microsoft.Host.Runtime. 
• Your Application – Your application 
now loads the former ASP.NET 
frameworks (MVC, WebAPI, or SignalR) 
as part of its dependencies. 
Read more here
Asp.net vNext Features 
• New flexible and cross-platform runtime 
• New modular HTTP request pipeline 
• Cloud-ready environment configuration 
• Unified programming model that combines MVC, Web API, 
and Web Pages 
• Ability to see changes without re-building the project 
• Side-by-side versioning of the .NET Framework 
• Ability to self-host or host on IIS 
• New tools in Visual Studio 2015 
• Open source in GitHub 
Read more here
Questions
Continue reading … 
• http://www.asp.net/vnext/overview/aspnet-vnext 
• http://channel9.msdn.com/Events/Visual-Studio/Connect-event-2014/011 
• http://www.tugberkugurlu.com/archive/exciting-things-about-asp-net-vnext-series- 
the-ultimate-guide 
• https://github.com/aspnet/Home/wiki 
• https://github.com/aspnet/Home/wiki/KRuntime-structure 
• http://www.hanselman.com/blog/IntroducingASPNETVNext.aspx 
• http://stackoverflow.com/questions/25431750/asp-net-vnext-is-host-agnostic-what- 
does-it-deeply-mean 
• http://channel9.msdn.com/Events/dotnetConf/2014/ASP-NET-vNext-101 
• http://channel9.msdn.com/Events/Visual-Studio/Connect-event-2014/023 
• http://jeremydmiller.com/2014/12/02/some-thoughts-on-the-new-net/? 
utm_source=twitterfeed&utm_medium=twitter 
• http://gunnarpeipman.com/aspnet/ 
• http://www.omnisharp.net/
About Us 
• Betclic Everest Group, one of the world leaders in online 
gaming, has a unique portfolio comprising various 
complementary international brands: Betclic, Everest 
Poker/Casino, Bet-at-home, Expekt, Imperial Casino, Monte- 
Carlo Casino… 
• Through our brands, Betclic Everest Group places expertise, 
technological know-how and security at the heart of our 
strategy to deliver an on-line gaming offer attuned to the 
passion of our players. We want our brands to be easy to use 
for every gamer around the world. We’re building our 
company to make that happen. 
• Active in 100 countries with more than 12 million customers 
worldwide, the Group is committed to promoting secure and 
responsible gaming and is a member of several international 
professional associations including the EGBA (European 
Gaming and Betting Association) and the ESSA (European 
Sports Security Association).
We want our Sports betting, Poker, Horse racing and 
Casino & Games brands to be easy to use for every 
gamer around the world. Code with us to make that 
happen. 
Look at all the challenges we offer HERE 
Check our Employer Page 
Follow us on LinkedIn 
WE’RE HIRING !

Short-Training asp.net vNext

  • 1.
    asp.net vNext Thefuture of the Server MAXIME LEMAITRE – 11/12/2014
  • 2.
    Agenda • Beforeto start • Let’s – create a new MVC project.. – open the project file … – add a reference … – add a nuget package … – build a class library… – build & publish the project… – edit source code… – add some configuration … – add a web api … – play with bower/gulp/grunt … • asp.net core & project K • Questions
  • 3.
    Based on latestasp.net vNext version (Nov. 2014)
  • 4.
    Let’s create anew MVC project … What’s different ? • New sections – wwwroot – Dependencies • New Solution structure – Src, artefacts, … • New files – project.json – global.json – (package.json) – (grunfile.js) – (bower.json) • Missing files/folders – MVC Content/Scripts/AppStart – Web.config – global.asax
  • 5.
    Let’s open theproject file … What’s different ? • K Project file is smaller – Where are references ? – Where are source code files ? – Where are X & Y ? • A new project.json file – Project settings – Dependencies & Frameworks – Commands – (but still no files)
  • 6.
    Let’s add areference … What’s different ? • No more direct dependencies • No more GAC dependencies • NuGet everything, even the runtime itself. Dependencies are now defined in project.json
  • 7.
    Let’s add anuget package …
  • 8.
    Let’s add anuget package … • Brand New UI • Version Selection • Combined Installed/Online/Updates Workflows • Version Consolidation • Operation Previews • Installation Options (Dep behavior & conflict action) • Infinite Scrolling • …
  • 9.
    Let’s build aclass library … • New project type • Nuget packages “All the way” • Cross compiling (net40, net45, aspnet, aspnetcore, …) • Can be built via command line or VS
  • 10.
    Let’s build &publish the project … • What about the deployable package ? – the assemblies never exist on the disk – the compiler do all the work in memory Tip : > SET KRE_TRACE=1 • Same experience between command prompt and VS • Cross-platform
  • 11.
    Let’s edit sourcecode … No-compile developer experience ! vNext uses the Rosyln compiler to compile code dynamically. You will be able to edit a code file, refresh the browser, and see the changes without rebuilding the project.
  • 12.
    Let’s add someconfiguration … • No more .config file ! But a new lightweight model – Configuartion that works everywhere (Core & Full CLR) – Configuration can be instantiated and initialized by the application Project.json Config.json Config.xml Config.ini Supports also command line arguments & environement variables ! Tip : ConfigR may help… Program.cs
  • 13.
    Let’s add aweb api … • MVC, Web API, and Web Pages will be merged into one framework, called MVC 6 – removes a lot of overlap between the existing MVC and Web API frameworks – uses a common set of abstractions for routing, action selection, filters, model binding, and so on – use the framework to create both UI (HTML) and web APIs. • No dependency to System.Web – leaner framework, with faster startup time and lower memory consumption
  • 14.
    Let’s play withbower/gulp/grunt … • VS 2015 Preview has built-in support for popular package managers – Bower. Described as a “package manager for the web,” Bower lets you install and restore client-side packages, include JavaScript and CSS libraries. – Grunt and Gulp. Grunt and Gulp are JavaScript-based task runners. – npm : npm is a package manager that was originally created for Node.js. Bower, Grunt, and Gulp all use npm. • wwwroot folder – All of the static files (generated or not) in your project go into this folder
  • 15.
    Microsoft’s Special K • KRE – K Runtime Environment is the code required to bootstrap and run an ASP.NET vNext application. This includes things like the compilation system, SDK tools, and the native CLR hosts. • KVM – K Version Manager is for updating and installing different versions of KRE. KVM is also used to set default KRE version. • KPM – K Package Manager manages packages needed by applications to run. Packages in this context are NuGet packages. Read more here
  • 16.
    Levels of abstractions • The host application – in the past this was ALWAYS Microsoft Internet Information Server (IIS). This could be IIS, IIS with Helios, Katana, or some other OWIN capable host. • The CLR framework – previously you would choose which version of the Microsoft.NET framework you wanted to use. This may be .NET 4.5.2, K runtime, or Mono. • The Application Host – previously, this would be the W3C executable. Now, this can be a host for the Visual Studio designer, or the new Microsoft.Host.Runtime. • Your Application – Your application now loads the former ASP.NET frameworks (MVC, WebAPI, or SignalR) as part of its dependencies. Read more here
  • 17.
    Asp.net vNext Features • New flexible and cross-platform runtime • New modular HTTP request pipeline • Cloud-ready environment configuration • Unified programming model that combines MVC, Web API, and Web Pages • Ability to see changes without re-building the project • Side-by-side versioning of the .NET Framework • Ability to self-host or host on IIS • New tools in Visual Studio 2015 • Open source in GitHub Read more here
  • 18.
  • 19.
    Continue reading … • http://www.asp.net/vnext/overview/aspnet-vnext • http://channel9.msdn.com/Events/Visual-Studio/Connect-event-2014/011 • http://www.tugberkugurlu.com/archive/exciting-things-about-asp-net-vnext-series- the-ultimate-guide • https://github.com/aspnet/Home/wiki • https://github.com/aspnet/Home/wiki/KRuntime-structure • http://www.hanselman.com/blog/IntroducingASPNETVNext.aspx • http://stackoverflow.com/questions/25431750/asp-net-vnext-is-host-agnostic-what- does-it-deeply-mean • http://channel9.msdn.com/Events/dotnetConf/2014/ASP-NET-vNext-101 • http://channel9.msdn.com/Events/Visual-Studio/Connect-event-2014/023 • http://jeremydmiller.com/2014/12/02/some-thoughts-on-the-new-net/? utm_source=twitterfeed&utm_medium=twitter • http://gunnarpeipman.com/aspnet/ • http://www.omnisharp.net/
  • 20.
    About Us •Betclic Everest Group, one of the world leaders in online gaming, has a unique portfolio comprising various complementary international brands: Betclic, Everest Poker/Casino, Bet-at-home, Expekt, Imperial Casino, Monte- Carlo Casino… • Through our brands, Betclic Everest Group places expertise, technological know-how and security at the heart of our strategy to deliver an on-line gaming offer attuned to the passion of our players. We want our brands to be easy to use for every gamer around the world. We’re building our company to make that happen. • Active in 100 countries with more than 12 million customers worldwide, the Group is committed to promoting secure and responsible gaming and is a member of several international professional associations including the EGBA (European Gaming and Betting Association) and the ESSA (European Sports Security Association).
  • 21.
    We want ourSports betting, Poker, Horse racing and Casino & Games brands to be easy to use for every gamer around the world. Code with us to make that happen. Look at all the challenges we offer HERE Check our Employer Page Follow us on LinkedIn WE’RE HIRING !