Ce diaporama a bien été signalé.
Nous utilisons votre profil LinkedIn et vos données d’activité pour vous proposer des publicités personnalisées et pertinentes. Vous pouvez changer vos préférences de publicités à tout moment.

Short-Training asp.net vNext

1 441 vues

Publié le

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 Pages, a no-compilation dev experience, ability to self-host or host on IIS, …
Best of all : it’s Open source in GitHub (https://github.com/aspnet/Home)

Publié dans : Logiciels
  • Soyez le premier à commenter

  • Soyez le premier à aimer ceci

Short-Training asp.net vNext

  1. 1. asp.net vNext The future of the Server MAXIME LEMAITRE – 11/12/2014
  2. 2. 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
  3. 3. Based on latest asp.net vNext version (Nov. 2014)
  4. 4. 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
  5. 5. 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)
  6. 6. 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
  7. 7. Let’s add a nuget package …
  8. 8. 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 • …
  9. 9. 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
  10. 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. 11. 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.
  12. 12. 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
  13. 13. 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
  14. 14. 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
  15. 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. 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. 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. 18. Questions
  19. 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. 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. 21. 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 !

×