Shaun Walker - Microsoft MVP (11 years), ASP Insider - .NET Foundation Advisory Council - Creator of DotNetNuke shaun.walker@arrowdesigns.com @sbwalker About Me: Based in Abbotsford, BC, Canada. Proud parent. I love ice hockey, music, and technology.
History of Microsoft’s Web Frameworks 1996 – Active Server Pages (ASP) 2002 – ASP.NET 2008 – ASP.NET MVC 2010 – ASP.NET Web Pages 2012 – ASP.NET Web API, SignalR
Characteristics of the Modern Web Web Frameworks: - Responsive Design - Client Frameworks - Cloud Ready - Cross Platform - Open Source Web Tooling: - Standards Based - Develop in Browser - Open Tooling - Grunt / Bower
Open Web Server Interface for .NET - Open Sourceproject ( http://owin.org/) - Specificationpublishedin 2012 - Standardizedinterfacebetweenweb serversand web applications - In practicalterms,a decouplingof ASP.NETfrom IIS - Providesthe flexibilityto run other OWIN-enabledframeworkson IIS - Providesthe flexibilityto run Microsoft’sweb frameworksin other environments - Introducedthe conceptof “Middleware”
History of ASP.NET Core 1.0 2012– Open WebServerInterfacefor .NET (OWIN) 2012– “ProjectK” 2013– Katana(Microsoftimplementationof OWIN) 2014– ASP.NETvNext 2015– ASP.NET5 2016– ASP.NETCore 1.0* *Note: full renameto ASP.NETCore 1.0 will be completedin RC2
ASP.NET Core 1.0 Key Values Choose your Editors and Tools Open Source with Contributions Cross-PlatformOSS Seamless transition from on-premises to cloud Faster Development CycleTotally Modular High Performance Unified Experience1
Modern Web - Productive Faster Development CycleUnified Experience1 - MVC & Web API unified( Web Pages coming) - DependencyInjection - Tracing& Diagnostics - Featuresshippedas packagesvia Nuget - Frameworkshipsas partof your application - Side-by-side frameworkversioning - Servicepackcontrol
Modern Web – Fast - Fasterstartuptimes - Lowermemory/ higherdensity(> 90% reduction) - Use a raw socket, frameworkor both - IIS or self-hosted - New HTTP request pipelineutilizing Middleware - Opt into onlydesired features High Performance Totally Modular
Modern Web - Flexible - Cloudready configuration,session, cache - No codechangesfor Cloud - Diagnostics,remote tracingand debugging Seamless transition from on-premises to cloud - Visual Studio,Text, Cloudeditors - No editors(command line) Choose your Editors and Tools
Modern Web – Cross Platform - Windows - Mac - Linux Cross-Platform Open Source with Contributions OSS - ApacheLicense, Version2.0 - Availableon Github - Pull Requests
ASP.NET 4.6 and ASP.NET Core 1.0
ASP.NET 4.6 and ASP.NET Core 1.0 .NET Framework 4.6 .NET Core 1.0 Full .NET Framework for any scenario and library support on Windows Modular libraries & runtime optimized for server and cloud workloads
https://github.com/aspnet/home/wiki/roadmap Milestone Release Date Beta6 Jul 27, 2015 Beta7 Sep 2, 2015 Beta8 Oct 15, 2015 RC1 Nov 18, 2015 RC2 April 2016?? RTM Summer/Fall 2016?? Release Schedule
Performance Benchmark ASP.NETCore 1.0 exceeded1.15 millionRequestsper Secondand 12.6Gbps of Throughput– 2300% greaterthan ASP.NET4.6!!
https://get.asp.net
Installing ASP.NET Core 1.0 On Windows 1. InstallVisualStudio 2015 - Be sure to specifythat you want to includethe . 2. InstallASP.NET5 - This will installthe latestASP.NET5 runtimeand tooling. 3. Enablethe ASP.NET5 command-linetools. - Open a command-promptand run: dnvmupgrade (thiswill enable the default.NET ExecutionEnvironment(DNX)).
.NET Execution Environment (DNX) - SDK and runtimeenvironmentfor creating.NET applicationson Windows, Mac, and Linux. - Provides a host process,CLR hosting logic and managedentry point discovery and can be interactedwith through a commandline tool. - Distributedwith your application
Create Project > File > New Project > ASP.NET Web Application - ApplicationInsights Integration
Project Templates > ASP.NET 5 Templates > Web Application - AuthenticationOptions - Microsoft Azure Options
Demo Getting Started with ASP.NET Core 1.0
Project Structure /References- server-sidereferences /wwwroot - web app root and location of staticresources /Dependencies- client-side dependencies(Bower/NPM) /Migrations- Entity Frameworkmigrations appsettings.json- configurationsettings project.json- server side dependencies(Nuget) Startup.cs- applicationentry point, configurationof request pipeline and services
Middleware - Componentsassembledinto an applicationpipeline to handle requests and responses. - Each componentcan pass the request on to the next componentor terminate - Componentshave the opportunityto performoperationsbefore and afterthe next componentexecutes - Ordering of componentsis important - Authentication,staticfiles, MVC, etc…
Dependency Injection (DI) - First-classcitizen - DefaultInversionof Control(IoC) containerprovided (canbe replaced) - Declareyour Servicesin Startup.cs
Adding MVC
Diagnostics - get rich diagnosticsby using the Microsoft.AspNet.Diagnosticspackageand app.UseDeveloperExceptionPage();in Startup.cs
Routing - Familiarconvention-basedsyntax - Consistentfor both MVC and WebAPI - Support for Filtersand Attributes(withconstructorinjection)
Views - Now supportDependencyInjectionwith @inject - _ViewImports.cshtmlfor registeringnamespacesto be used in your Views
View Components - Finallya more robust componentmodel for MVC! - Similarto partialviews but with more power (ie. complexbusinesslogic)
Tag Helpers - HTML helpers expressed as HTML tags - Designer friendly - Easier to customize with additional attributes - Works seamlessly with any HTML editor
- Input Tag: - Generates: - From: Tag Helpers
Tag Helpers - Create your own custom Tag Helpers!
Entity Framework Core 1.0 - Formerly named Entity Framework 7 - Rewritten from scratch - Common classes, patterns and workflows remain intact - Code First workflow only ( no designer-based EDMX model ) - Smaller Footprint - Cross Platform
Demo ASP.NET Core 1.0 Features
ASP.NET Core 1.0 Resources http://www.asp.net/vnext http://get.asp.net http://docs.asp.net https://live.asp.net/
Questions?

Getting Started with ASP.NET Core 1.0 (formerly ASP.NET 5)

  • 2.
    Shaun Walker - MicrosoftMVP (11 years), ASP Insider - .NET Foundation Advisory Council - Creator of DotNetNuke shaun.walker@arrowdesigns.com @sbwalker About Me: Based in Abbotsford, BC, Canada. Proud parent. I love ice hockey, music, and technology.
  • 5.
    History of Microsoft’sWeb Frameworks 1996 – Active Server Pages (ASP) 2002 – ASP.NET 2008 – ASP.NET MVC 2010 – ASP.NET Web Pages 2012 – ASP.NET Web API, SignalR
  • 6.
    Characteristics of theModern Web Web Frameworks: - Responsive Design - Client Frameworks - Cloud Ready - Cross Platform - Open Source Web Tooling: - Standards Based - Develop in Browser - Open Tooling - Grunt / Bower
  • 7.
    Open Web ServerInterface for .NET - Open Sourceproject ( http://owin.org/) - Specificationpublishedin 2012 - Standardizedinterfacebetweenweb serversand web applications - In practicalterms,a decouplingof ASP.NETfrom IIS - Providesthe flexibilityto run other OWIN-enabledframeworkson IIS - Providesthe flexibilityto run Microsoft’sweb frameworksin other environments - Introducedthe conceptof “Middleware”
  • 8.
    History of ASP.NETCore 1.0 2012– Open WebServerInterfacefor .NET (OWIN) 2012– “ProjectK” 2013– Katana(Microsoftimplementationof OWIN) 2014– ASP.NETvNext 2015– ASP.NET5 2016– ASP.NETCore 1.0* *Note: full renameto ASP.NETCore 1.0 will be completedin RC2
  • 10.
    ASP.NET Core 1.0Key Values Choose your Editors and Tools Open Source with Contributions Cross-PlatformOSS Seamless transition from on-premises to cloud Faster Development CycleTotally Modular High Performance Unified Experience1
  • 11.
    Modern Web -Productive Faster Development CycleUnified Experience1 - MVC & Web API unified( Web Pages coming) - DependencyInjection - Tracing& Diagnostics - Featuresshippedas packagesvia Nuget - Frameworkshipsas partof your application - Side-by-side frameworkversioning - Servicepackcontrol
  • 12.
    Modern Web –Fast - Fasterstartuptimes - Lowermemory/ higherdensity(> 90% reduction) - Use a raw socket, frameworkor both - IIS or self-hosted - New HTTP request pipelineutilizing Middleware - Opt into onlydesired features High Performance Totally Modular
  • 13.
    Modern Web -Flexible - Cloudready configuration,session, cache - No codechangesfor Cloud - Diagnostics,remote tracingand debugging Seamless transition from on-premises to cloud - Visual Studio,Text, Cloudeditors - No editors(command line) Choose your Editors and Tools
  • 14.
    Modern Web –Cross Platform - Windows - Mac - Linux Cross-Platform Open Source with Contributions OSS - ApacheLicense, Version2.0 - Availableon Github - Pull Requests
  • 16.
    ASP.NET 4.6 andASP.NET Core 1.0
  • 17.
    ASP.NET 4.6 andASP.NET Core 1.0 .NET Framework 4.6 .NET Core 1.0 Full .NET Framework for any scenario and library support on Windows Modular libraries & runtime optimized for server and cloud workloads
  • 18.
    https://github.com/aspnet/home/wiki/roadmap Milestone Release Date Beta6Jul 27, 2015 Beta7 Sep 2, 2015 Beta8 Oct 15, 2015 RC1 Nov 18, 2015 RC2 April 2016?? RTM Summer/Fall 2016?? Release Schedule
  • 19.
    Performance Benchmark ASP.NETCore 1.0exceeded1.15 millionRequestsper Secondand 12.6Gbps of Throughput– 2300% greaterthan ASP.NET4.6!!
  • 21.
  • 22.
    Installing ASP.NET Core1.0 On Windows 1. InstallVisualStudio 2015 - Be sure to specifythat you want to includethe . 2. InstallASP.NET5 - This will installthe latestASP.NET5 runtimeand tooling. 3. Enablethe ASP.NET5 command-linetools. - Open a command-promptand run: dnvmupgrade (thiswill enable the default.NET ExecutionEnvironment(DNX)).
  • 23.
    .NET Execution Environment(DNX) - SDK and runtimeenvironmentfor creating.NET applicationson Windows, Mac, and Linux. - Provides a host process,CLR hosting logic and managedentry point discovery and can be interactedwith through a commandline tool. - Distributedwith your application
  • 24.
    Create Project > File >New Project > ASP.NET Web Application - ApplicationInsights Integration
  • 25.
    Project Templates > ASP.NET5 Templates > Web Application - AuthenticationOptions - Microsoft Azure Options
  • 26.
    Demo Getting Started withASP.NET Core 1.0
  • 28.
    Project Structure /References- server-sidereferences /wwwroot- web app root and location of staticresources /Dependencies- client-side dependencies(Bower/NPM) /Migrations- Entity Frameworkmigrations appsettings.json- configurationsettings project.json- server side dependencies(Nuget) Startup.cs- applicationentry point, configurationof request pipeline and services
  • 29.
    Middleware - Componentsassembledinto an applicationpipelineto handle requests and responses. - Each componentcan pass the request on to the next componentor terminate - Componentshave the opportunityto performoperationsbefore and afterthe next componentexecutes - Ordering of componentsis important - Authentication,staticfiles, MVC, etc…
  • 30.
    Dependency Injection (DI) -First-classcitizen - DefaultInversionof Control(IoC) containerprovided (canbe replaced) - Declareyour Servicesin Startup.cs
  • 31.
  • 32.
    Diagnostics - get richdiagnosticsby using the Microsoft.AspNet.Diagnosticspackageand app.UseDeveloperExceptionPage();in Startup.cs
  • 33.
    Routing - Familiarconvention-basedsyntax - Consistentforboth MVC and WebAPI - Support for Filtersand Attributes(withconstructorinjection)
  • 34.
    Views - Now supportDependencyInjectionwith@inject - _ViewImports.cshtmlfor registeringnamespacesto be used in your Views
  • 35.
    View Components - Finallyamore robust componentmodel for MVC! - Similarto partialviews but with more power (ie. complexbusinesslogic)
  • 36.
    Tag Helpers - HTMLhelpers expressed as HTML tags - Designer friendly - Easier to customize with additional attributes - Works seamlessly with any HTML editor
  • 37.
    - Input Tag: -Generates: - From: Tag Helpers
  • 38.
    Tag Helpers - Createyour own custom Tag Helpers!
  • 39.
    Entity Framework Core1.0 - Formerly named Entity Framework 7 - Rewritten from scratch - Common classes, patterns and workflows remain intact - Code First workflow only ( no designer-based EDMX model ) - Smaller Footprint - Cross Platform
  • 40.
  • 41.
    ASP.NET Core 1.0Resources http://www.asp.net/vnext http://get.asp.net http://docs.asp.net https://live.asp.net/
  • 42.