SlideShare a Scribd company logo
vNext
THE FUTURE OF ASP.NET
Where we go?
ASP : Summary
New structure + Demo
OWIN
Grunt
Bower
Dependancy Injection + Demo
Kruntime + Demo
OmniSharp & YO
ASP : Summary (1/2)
ASP.NET = 2002 :
◦ Webform, (ViewState)
◦ System.Web (releases sync with releases of the framework)
◦ HttpContext (designed for webform)
More than 30Ko of server’s memory each request (HttpContext)
◦ Even for REST API’s !
ASP : Summary (2/2)
ASP .NET MVC = 2007
◦ MVC, WebAPI, SignalR, Razor are all Nuget packages
WebAPI = 2012
ASP.NET vNext = 2015
◦ OWIN (Open Web Interface for .NET - Katana)
◦ CIAO system.Web!
◦ Modular framework in packages
◦ Cloud optimized (200 -> 10MB for the framework)
◦ Official support of Mono (mono in integration build)
◦ Grunt and Bower integration
◦ Kruntime: deal framework packages thanks to KVM & KPM
◦ Dependancy injection built-in
◦ EF7 (Wphone , Mono Azure & SQLite(?) compliant)
◦ Identity 3
◦ …
New structure! (1/2)
Solution items
◦ Global.json : information about solution
Src : contains projects, source files (not unit test)
Wwwroot : static files (scripts, css, pictures, font,…)
Config.json: new config file
Project.json : contains all packages used and dependancies (ex: asp.net MVC), file for NuGet
Startup.js (entry point for OWIN (before: global.asax)) :
◦ Startup : Setup configuration
◦ ConfigureServices : called by the runtime: loads EF, Identity, MVC, Singleton for DI
◦ Configure : called after after ConfigureServices : loads and configure
◦ HTTP request pipeline, identity, error handling, routing, …
New structure (2/2)
Global information on the project
◦ WebRoot: web server root (public folder)
◦ Metadata as version, authors, description
◦ Things to exclude for compilation
Dependencies section lists :
◦ all the dependencies of your application
Target frameworks that will be built, and dependencies
that are specific to the configuration.
Demo
Launch of starter
The new compiler Roslyn is there! (control+F5 in order to use the AOT compilation : build is done
when you save, VS just do semantic check)
OWIN
Open Web Interface for .NET runs MVC applications on a very thin Katana server, or on a Project
Helios managed IIS instance.
Interaction between webhost and web app that allow to be ran on different platforms (Linux, OSX,
Windows) thanks to their 4 layers:
Grunt
Grunt = JS Task-Runner
◦ Automate everything !
◦ CSS concat
◦ JS minifier
◦ Picture optimization
◦ …
◦ Package.json ->
◦ GruntFile.js
Bower
Client-side package manager (dependency mgmt tool)
Configuration in bower.json
Dependancy Injection (1/5)
Dependency Injection" is a 25-dollar term for a 5-cent concept. [...]
Dependency injection is basically providing the objects that an object needs (its dependencies)
instead of having it construct them itself. It's a very useful technique for testing, since it allows
dependencies to be mocked or stubbed out.
Dependency injection == giving an object its instance variables.
Dependancy Injection (2/5)
Example application that shows TODO items
The demo front-end just show the items but there are some backend methods as example.
Dependancy Injection (3/5)
TodoRepository that implements ITodoRepository
Dependancy Injection (4/5)
Controller
Dependancy Injection (5/5)
ConfigureServices is the global place where dependencies are registered that can be used
through the whole application stack.
AddSingleton method register the Interface and the specific implementation of the global
DI container.
Demo !
Let’s launch that beautiful app ( sorry, no more pictures  )
K* (1/2)
KRE = K Runtime Engine : code to bootstrap apd run ASP.NET vNext (Compilation system, SDK, tools,
CLR hosts, …). KRE = packages !
KVM : K Version Manager : to manage install different version of KRE present on the machine. Used
to set default KRE version (powershell script)
KLR = K Language Runtime: used to launch one self hosted app. When used, KLR find and launch CLR
native host of the app
KPM : K Package Manager : to manage NuGet packages and dependancies needed to run the app
K* (2/2)
Kvm help !!!
kvm list : list all versions of the framework and the one that is selected (the one with a *). When
there is a « C », it’s cloud optimized!
Kvm alias default 1.0.xxx (and restart VS) : put alias default to 1.0.xxx
Kvm use 1.0.xxx : set active version for machine
Kvm use default : set active version for machine but by specifying that one that is default
k run: execute the application on CLI & K web: for webapplication
K web --server.urls=http://localhost:5001 in order to specify url if not specified in config file
Demo
Test project with commands!
◦ Console
◦ Web
◦ Web with different version of runtime
OmniSharp
Tool To enable great .NET development in lots of editors:
◦ Atom
◦ Sublime text 3
◦ Brackets
◦ VIM
◦ Emacs
◦ CLI
YO !
Yeoman : tool to generate code : a scaffolding too for aspnet from the CLI:
Question?
Sources
http://en.wikipedia.org/wiki/ASP.NET_MVC_Framework
http://developer.telerik.com/featured/microsofts-special-k-an-introduction-to-asp-net-vnext/
http://gruntjs.com/
http://gunnarpeipman.com/2014/10/asp-net-5-new-structure-of-solutions-and-projects/
http://www.omnisharp.net/
https://robinsedlaczek.wordpress.com/2014/11/22/dependency-injection-in-asp-net-vnext/
http://fiscammc.com/wordpress/category/owin/
www.owin.com
www.yeoman.io
www.omnisharp.com

More Related Content

What's hot (20)

PPTX
SQL Sever on Docker: Database Containers 3 Ways
Elton Stoneman
 
PDF
RUNNING AWS LOCALLY
AWSCOMSUM
 
PDF
Docker Compose by Aanand Prasad
Docker, Inc.
 
PPTX
.Net Core Fall update
MSDEVMTL
 
PPTX
Docker, OSS and Azure
Elton Stoneman
 
PPTX
Deep Dive Azure Functions - Global Azure Bootcamp 2019
Andrea Tosato
 
PDF
Chris Omland - AWS Code Deploy - BSDC 2016
roblund
 
PDF
Continuous delivery with Jenkins, Docker and Mesos/Marathon - jbcnconf
Julia Mateo
 
PDF
Rapid Development With Docker Compose
Justin Crown
 
PPTX
Introduction to .NET Core & ASP.NET Core MVC
Saineshwar bageri
 
PPTX
Docker session I: Continuous integration, delivery and deployment
Degendra Sivakoti
 
PDF
Short journey into the serverless world
Scott van Kalken
 
PDF
.NET Core in the Real World
Nate Barbettini
 
PDF
ITB2019 Scaling with CommandBox in Production! - Brad Wood
Ortus Solutions, Corp
 
PDF
Scale your PHP application with Elastic Beanstalk - CloudParty Genova
Corley S.r.l.
 
PDF
Adventures in docker compose
LinkMe Srl
 
PDF
Docker compose
Felipe Ruhland
 
PPTX
Containerize development
Daniel Foo
 
PDF
Packer by HashiCorp
Łukasz Cieśluk
 
PDF
Docker 進階實務班
Philip Zheng
 
SQL Sever on Docker: Database Containers 3 Ways
Elton Stoneman
 
RUNNING AWS LOCALLY
AWSCOMSUM
 
Docker Compose by Aanand Prasad
Docker, Inc.
 
.Net Core Fall update
MSDEVMTL
 
Docker, OSS and Azure
Elton Stoneman
 
Deep Dive Azure Functions - Global Azure Bootcamp 2019
Andrea Tosato
 
Chris Omland - AWS Code Deploy - BSDC 2016
roblund
 
Continuous delivery with Jenkins, Docker and Mesos/Marathon - jbcnconf
Julia Mateo
 
Rapid Development With Docker Compose
Justin Crown
 
Introduction to .NET Core & ASP.NET Core MVC
Saineshwar bageri
 
Docker session I: Continuous integration, delivery and deployment
Degendra Sivakoti
 
Short journey into the serverless world
Scott van Kalken
 
.NET Core in the Real World
Nate Barbettini
 
ITB2019 Scaling with CommandBox in Production! - Brad Wood
Ortus Solutions, Corp
 
Scale your PHP application with Elastic Beanstalk - CloudParty Genova
Corley S.r.l.
 
Adventures in docker compose
LinkMe Srl
 
Docker compose
Felipe Ruhland
 
Containerize development
Daniel Foo
 
Packer by HashiCorp
Łukasz Cieśluk
 
Docker 進階實務班
Philip Zheng
 

Viewers also liked (19)

PDF
Ntic ead
rosemary_borges
 
PPTX
Nosql public
SourajitBasak
 
DOCX
6 set 7 keajaiban dunia
namiraz
 
PPT
Drupal presentation
Clément Hallet
 
PPTX
Hamka permata nusantara
Nabihah Zulhairi
 
PPTX
Modulo 9- Unidad 1- Presentación 1
Mara Amerio
 
PDF
Cellular neuralnetworks theory
Venkat RAGHAVENDRA REDDY
 
PDF
fundamentals of speech recognition
Venkat RAGHAVENDRA REDDY
 
PPTX
Psyber Technologies - YouTube Marketing
Antriksh Shah
 
PDF
Cellular neuralnetworks theory
Venkat RAGHAVENDRA REDDY
 
PPT
55 역삼 827 69
상숙 문상숙
 
PPTX
Solar car Presentation
Venkat RAGHAVENDRA REDDY
 
PPTX
Custom ERP or Off-the-Shelf ERP – A Comparison to Stay
SPEC INDIA
 
PDF
gesture-recognition
Venkat RAGHAVENDRA REDDY
 
PPTX
Cloud Application Development – The Future is now
SPEC INDIA
 
PPTX
influence of media on the society
varmaprudhvi97
 
PDF
E bomb seminar report
Venkat RAGHAVENDRA REDDY
 
PPTX
Turkey presentation II
craentretierras
 
PPTX
Solar Car Presentation
Venkat RAGHAVENDRA REDDY
 
Ntic ead
rosemary_borges
 
Nosql public
SourajitBasak
 
6 set 7 keajaiban dunia
namiraz
 
Drupal presentation
Clément Hallet
 
Hamka permata nusantara
Nabihah Zulhairi
 
Modulo 9- Unidad 1- Presentación 1
Mara Amerio
 
Cellular neuralnetworks theory
Venkat RAGHAVENDRA REDDY
 
fundamentals of speech recognition
Venkat RAGHAVENDRA REDDY
 
Psyber Technologies - YouTube Marketing
Antriksh Shah
 
Cellular neuralnetworks theory
Venkat RAGHAVENDRA REDDY
 
55 역삼 827 69
상숙 문상숙
 
Solar car Presentation
Venkat RAGHAVENDRA REDDY
 
Custom ERP or Off-the-Shelf ERP – A Comparison to Stay
SPEC INDIA
 
gesture-recognition
Venkat RAGHAVENDRA REDDY
 
Cloud Application Development – The Future is now
SPEC INDIA
 
influence of media on the society
varmaprudhvi97
 
E bomb seminar report
Venkat RAGHAVENDRA REDDY
 
Turkey presentation II
craentretierras
 
Solar Car Presentation
Venkat RAGHAVENDRA REDDY
 
Ad

Similar to ASP.NET vNext the future of ASP (20)

PPTX
Introduction to ASP.NET 5
mbaric
 
PPTX
Short-Training asp.net vNext
Betclic Everest Group Tech Team
 
PPTX
The next step from Microsoft - Vnext (Srdjan Poznic)
Geekstone
 
PPTX
ASP.NET vNext
Alex Thissen
 
PPTX
Learning ASP.NET 5 and MVC 6
Ido Flatow
 
PPTX
Angular on ASP.NET MVC 6
Noam Kfir
 
PPTX
Get acquainted with the new ASP.Net 5
Suyati Technologies
 
PPTX
ASP.NET vNext ANUG 20140817
Christian Horsdal
 
PPTX
The future of ASP.NET / CodeCamp/Iasi 25 Oct 2014
Enea Gabriel
 
PPTX
Intro to.net core 20170111
Christian Horsdal
 
PPTX
Project K, Vnext and Owin
Hrvoje Hudoletnjak
 
PPTX
.NET Core: a new .NET Platform
Alex Thissen
 
PPTX
ASP.NET Core - Phillosophies, Processes and Tooling
💻 Spencer Schneidenbach
 
PPTX
ASP.NET vNext
Richard Caunt
 
PDF
Asp.Net Core MVC , Razor page , Entity Framework Core
mohamed elshafey
 
PPTX
ASP.NET Core: The best of the new bits
Ken Cenerelli
 
PPTX
Quick Interview Preparation Dot Net Core
Karmanjay Verma
 
PPTX
ASP.NET Core 1.0
Ido Flatow
 
PPTX
What's new in ASP.NET vNext
Gunnar Peipman
 
Introduction to ASP.NET 5
mbaric
 
Short-Training asp.net vNext
Betclic Everest Group Tech Team
 
The next step from Microsoft - Vnext (Srdjan Poznic)
Geekstone
 
ASP.NET vNext
Alex Thissen
 
Learning ASP.NET 5 and MVC 6
Ido Flatow
 
Angular on ASP.NET MVC 6
Noam Kfir
 
Get acquainted with the new ASP.Net 5
Suyati Technologies
 
ASP.NET vNext ANUG 20140817
Christian Horsdal
 
The future of ASP.NET / CodeCamp/Iasi 25 Oct 2014
Enea Gabriel
 
Intro to.net core 20170111
Christian Horsdal
 
Project K, Vnext and Owin
Hrvoje Hudoletnjak
 
.NET Core: a new .NET Platform
Alex Thissen
 
ASP.NET Core - Phillosophies, Processes and Tooling
💻 Spencer Schneidenbach
 
ASP.NET vNext
Richard Caunt
 
Asp.Net Core MVC , Razor page , Entity Framework Core
mohamed elshafey
 
ASP.NET Core: The best of the new bits
Ken Cenerelli
 
Quick Interview Preparation Dot Net Core
Karmanjay Verma
 
ASP.NET Core 1.0
Ido Flatow
 
What's new in ASP.NET vNext
Gunnar Peipman
 
Ad

Recently uploaded (20)

PDF
Go Concurrency Real-World Patterns, Pitfalls, and Playground Battles.pdf
Emily Achieng
 
PDF
New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
PDF
Bitcoin for Millennials podcast with Bram, Power Laws of Bitcoin
Stephen Perrenod
 
PDF
Achieving Consistent and Reliable AI Code Generation - Medusa AI
medusaaico
 
PDF
LOOPS in C Programming Language - Technology
RishabhDwivedi43
 
PPTX
Building Search Using OpenSearch: Limitations and Workarounds
Sease
 
PDF
Using FME to Develop Self-Service CAD Applications for a Major UK Police Force
Safe Software
 
PDF
[Newgen] NewgenONE Marvin Brochure 1.pdf
darshakparmar
 
PDF
Advancing WebDriver BiDi support in WebKit
Igalia
 
PDF
What Makes Contify’s News API Stand Out: Key Features at a Glance
Contify
 
PDF
Empower Inclusion Through Accessible Java Applications
Ana-Maria Mihalceanu
 
PDF
Transcript: New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
PPTX
Webinar: Introduction to LF Energy EVerest
DanBrown980551
 
PDF
IoT-Powered Industrial Transformation – Smart Manufacturing to Connected Heal...
Rejig Digital
 
PDF
CIFDAQ Market Insights for July 7th 2025
CIFDAQ
 
PDF
CIFDAQ Token Spotlight for 9th July 2025
CIFDAQ
 
PPTX
"Autonomy of LLM Agents: Current State and Future Prospects", Oles` Petriv
Fwdays
 
PPTX
COMPARISON OF RASTER ANALYSIS TOOLS OF QGIS AND ARCGIS
Sharanya Sarkar
 
PDF
Agentic AI lifecycle for Enterprise Hyper-Automation
Debmalya Biswas
 
PPTX
Future Tech Innovations 2025 – A TechLists Insight
TechLists
 
Go Concurrency Real-World Patterns, Pitfalls, and Playground Battles.pdf
Emily Achieng
 
New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
Bitcoin for Millennials podcast with Bram, Power Laws of Bitcoin
Stephen Perrenod
 
Achieving Consistent and Reliable AI Code Generation - Medusa AI
medusaaico
 
LOOPS in C Programming Language - Technology
RishabhDwivedi43
 
Building Search Using OpenSearch: Limitations and Workarounds
Sease
 
Using FME to Develop Self-Service CAD Applications for a Major UK Police Force
Safe Software
 
[Newgen] NewgenONE Marvin Brochure 1.pdf
darshakparmar
 
Advancing WebDriver BiDi support in WebKit
Igalia
 
What Makes Contify’s News API Stand Out: Key Features at a Glance
Contify
 
Empower Inclusion Through Accessible Java Applications
Ana-Maria Mihalceanu
 
Transcript: New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
Webinar: Introduction to LF Energy EVerest
DanBrown980551
 
IoT-Powered Industrial Transformation – Smart Manufacturing to Connected Heal...
Rejig Digital
 
CIFDAQ Market Insights for July 7th 2025
CIFDAQ
 
CIFDAQ Token Spotlight for 9th July 2025
CIFDAQ
 
"Autonomy of LLM Agents: Current State and Future Prospects", Oles` Petriv
Fwdays
 
COMPARISON OF RASTER ANALYSIS TOOLS OF QGIS AND ARCGIS
Sharanya Sarkar
 
Agentic AI lifecycle for Enterprise Hyper-Automation
Debmalya Biswas
 
Future Tech Innovations 2025 – A TechLists Insight
TechLists
 

ASP.NET vNext the future of ASP

Editor's Notes

  • #3: ASP Summary : historique et comprendre ou on est/ ou on va New structure + demo : structure de vNext OWIN : standart d’une couche d’abstraction entre le code applicatif et le serveur Grunt : task runner Bower : packet manager DI + demo : la DI est native maintenant K* + demo : voir les commandes pour gérer le versione de runtime sur la machine Omnisharp & YO : environnement de dev sur différentes plateformes et quelques tools
  • #4: ASP.NET = 2002 (WebForm – System.Web : lié au framework .NET, release synchronisées avec les releases du framework) Ce Framework a été créé pour deux types de profils : les développeurs Web qui jusque-là s’appuyaient sur la technologie ASP mais aussi pour les développeurs du Winforms (provenant par exemple de VB6). C’est un Framework qui satisferait ces deux types de personnes : et c’est ainsi que sont apparues les WebForms. Un des gros élémentdes webforms c’est le viewstate, qui permet de garder l’état de la page (le web est stateless, mais la on a réussi a simuler un état stateful) ASP.NET depend (il en a besoin tout de même) aussi de System.WEB. c’est du bricolage. C’est lourd aussi : plus de 30Ko de mémoire par requête sur le serveur IIS à cause du HttpCotext (designé pour les webform) (et sapu poru les api REST). Cette grosse « usine  à gaz » articulée autour d’une unique assembly (System.Web.dll) fortement couplée à un unique serveur d’application (IIS). Cela se traduit donc par une faible portabilité, un cycle de livraison long et compliqué à mettre en place, etc…
  • #5: ASP .NET MVC est totalement découplé du Framework .NET, ce qui permet d’apporter une solution au problème de modularité et de fréquence du cycle de livraison (notamment avec l’apparition du gestionnaire de paquets NuGet). Quand j’entend découplé c’est que MVC est un package Nuget qui ne dépend pas des releases synchronisées avec celles du framework, comme dans l’ASP. ------ Web API : casse les dépendances avec l’assembly « System.Web.dll », donc plus de dépendances avec IIS (on peut le deploy sur Linux) ------ MVC et WebAPI ont été deux opportunités pour MS pour corriger les petit couac du passé. On a des solutions légères, modulaires et moins couplées. Niveau évolutivité, c’est bien mieux qu’avant! ------ Cloud Optimized = framework .net optimisé pour le WEB (on passe de 200 à 10 megas pour le framework ! (retrait de system drawing, wpf, winforms, …) ) Support officiel de mono: MS integre mono dans leur build d’integration continue (tous les tests qu’ils font, ils feront tester ces features avec mono) KRuntime : il va gerer les packets et frameworks (utilisable en CLI) : KVM Gestionnaire de versions du framework KPM : gestionnaire de paquets (dependances) Injection de dépendances (dependancy resolver refondu en vrai module d’injection de dépendance) Côté serveur, on a IIS, Cassini (2005 serveur web light de VS), IIS Express (mieux que Cassini car cassini n’a pas exactement le meme comportement que iis donc gênant pour le dev) qui ont tous besoin de system.web. Depuis, MS a lancé OWIN (Katana) pour résoudre ce probleme. Aujourd’hui et demain, on a besoin d’une application web avec ou sans interface graphique, une webapi ou pas, idem pour signalr, etc etc et on voudait pouvoir gerer ces differents services de manière complètement indépendante les uns des autres, mais grâce à vnext, on le peut! (OWIN)
  • #6: Package.json = fichier de configuration de Grunt
  • #8: demo-structure-and-roslyn
  • #9: OWIN = standard définissant une couche d’abstraction entre le code applicatif et le serveur. Katana est une implémentation d’OWIN de MS. Il en existe d’autres: NOWIN, ConnectOWIN, OwinHost, … Objectif = découpler l’application du serveur pour pouvoir livrer l’application dans d’autres environnements que IIS. 2 elements importants pour OWIN: le dictionnaire d’environnement : échange de valeurs entre l’applo et le serveur ex: owin.requestmehtod, owin.reuestQueryString, … et le délégué applicatif : un genre d’interface sur laquelle se brancher Les blocs sont interchangeables (à le host peut etre IIS, ou OwinHost, oiu custom process… par exemple !) C’est Portable: Possibilité de changer les briques! Exemple pour azure, au lieu de Windows, Windows Azure et au lieu de System.Web, HttpSys! C’est Modulaire: modularité grâce à un processus de démarrage simple: 1)Server Boot 2)Load Startup of vNext app 3)Pipeline creation that compose modules that you want (SignalR, WebAPI, etc) Ce pipeline se trouve dans Startup > Configuration(IAppBuilder app) C’est Performant et Evolutif : la modularité permet de ne pas tout embarquer, … le tout est asyncrone, l’hebergement est séparé et donne de la flexibilité et donc possibilité d’optimiser le tout
  • #10: Fort utilisé par les gars qui utilisent du PHP, NodeJS, etc. Ici on voit que Microsoft pousse les développeurs à utiliser les technos MS. Il existe des packages d'édition ou alors on peut les faire soi même. Parmi les plus utilisés, uglify pour compresser des scripts js en .min.js qUnit pour faire des test unitaires Concat pour concaténer des fichiers Jshint pour valider des fichiers js : il tente de détecter des erreurs et des problèmes potentiels dans du code JS Watch pour faire tourner certains scripts quand certains fichiers changent …
  • #11: Best practice: Technology Package Manager .NET NuGet JavaScript Bower CSS Bower Il y a aussi NPM qui est aussi un package manager et qui est aussi inclus dans vNext, mais NPM c’est plus pour les modules de Node.js. Bower est crée spécialement pour les front-end et il le fait bien car bien optimisé etc npm ne gère pas non plus l’arbre des dépendances alors que bower bien (c’est lourd  ) (Je pense en fait que Node.Js et Grunt ont besoin de NPM pour rester à jour… a verifier)
  • #12: Intro dépendance d’injection: Dépendance: un objet nécessaire pour que la classe fonctione. Exemple d’une classe objet qui récupère des données depuis un objet DB, la classe Obj a une dépendance à l’obj DB. L’injection signifie qu’on va injecter cette dépendance depuis l’extérieur de ces classes. EN d’autres termes, on ne devra pas instancier les dépendances à l’intérieur de la classe, mais d’une autre manière. Trois types de DI : injection du constructeur (le constructeur de la classe prend en paremètre l’interface (donc on a une instance d’une classe qui a cette implementation de cette interface) ), injection du setteur ( idem que constructeur mais dans une methode settor) , et injection par l’interface (la plus complexe – c’est comme le méthode settor, mais via une interface (une interface avec la methode setor) ).
  • #13: Dans le projet, deux controlleurs, Todo et TodoDI pour voir la différence entre les deux mais ne pas s’attarder sur le Todo sans la DI. La démo ne présente que les données (pas besoin de plus pour la démo) Todo sans DI liste une todo list de 3 elements. Todo DI utilise l’injection de dépendance, et fait la meme chose: elle affiche 3 elements. On va voir comment la DI fonctionne avec le container par défaut livré avec ASP.NET vNext. On va avoir le un contract (l’interface), puis son implementation, puis le controleur et enfin comment vNext fait pour gérer les DI. Tout d’abord, l’interface. Plusieurs methods mais on ne se focalise que sur la AllItems pour la demo. Les autres methods sont là à titre d’exemple.
  • #14: Le repo implémente l’interface ITodoRepository. Ici, le items est a titre d’exemple, pour simplifier la demo, les données sont en dur dans le TodoRepository
  • #15: Le controleur possède une propriété de contrat et le constructeur du controlleur recoit une implémentation de cette interface par le service. Ou se situe ce service? Dans le config.cs (slide suivant)
  • #16: DP singleton pour éviter d’avoir plusieurs instances du même objet (dans le get on check si il existe si il est null, on l’instancie et on ne retourne) ASP.NET vNext supporte aussi les autres containers! Autofaq, Ninject, Unity, StructureMap, etc
  • #17: demo-DI
  • #18: KRE bootstrappe et fait tourner vNext. On utilise donc KVM pour gérer les versions du KRE. Visual studio est fait pour faire tourner la version de KRE qui possède l’alias « default ». KVM est un script powershell pour avoir le runtime et gérer ses versions sur la même machine. On peut faire des upgrade, sélectionner la version qu’il faut utiliser, … (KVM est aidé de NuGet pour gérer les packets.) KLR utilisé pour lancer une application via le CLI quand on a une application self-hosted. A ce moment-là, KLR ira trouver et appeler le CLR native host. CLR = Common Language Runtime = VM du framework .NET KPM : la commande pour installer, restaurer, packer l’application pour le déploiement, etc Il est responsable de toutes les opérations en rapport avec les packages de l’application comme par exemple KPM restore qui télécharge les dépendances définies dans le project.json
  • #19: Kvm list Liste les versions de KRE dispos et montre celui qui est sélectionné. Kvm alias default pour changer l’alias default (utilisé par VS) Kvm use to set active (for OS) version (if launch different version of app in selfhost for example, use this)
  • #20: demo-helloworld-console demo-helloweb-console demo-run-multuple-assembly-info Need to launch @powershell -NoProfile -ExecutionPolicy unrestricted -Command "iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/aspnet/Home/master/kvminstall.ps1'))“ in order to download KVM Apres couper le CLI et en relancer un nouveau et y mettre KVM upgrade