Short-Training asp.net vNext

betclicTech 1,794 views 21 slides Dec 11, 2014
Slide 1
Slide 1 of 21
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13
Slide 14
14
Slide 15
15
Slide 16
16
Slide 17
17
Slide 18
18
Slide 19
19
Slide 20
20
Slide 21
21

About This Presentation

asp.net vNext is the next major version on .net on the server. It’s a completely new way to work with awesome possibilities ; It contains a new flexible and cross-platform runtime, new modular HTTP request pipeline, Cloud-ready CLR, an unified programming model that combines MVC, Web API, and Web ...


Slide Content

Maxime Lemaitre – 11 /12/2014 asp.net vNext The future of the Server

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… b uild & publish the project… edit source code… add some configuration … add a web api … p lay with bower/gulp/grunt … a sp.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 p roject.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 … 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 . No-compile developer experience !

Let’s add some configuration … No more . config file ! But a new lightweight model Configuartion that works everywhere ( Core & Full CLR) C onfiguration can be instantiated and initialized by the application Tip : ConfigR may help… Program.cs Project.json Config.ini Config.xml Config.json Supports also command line arguments & environement variables !

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

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 Asp.net vNext Features 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 !