ASP.NET Core and Docker

Download ASP.NET Core and Docker

Post on 12-Feb-2017

25 views

Category:

Technology

0 download

TRANSCRIPT

Microsoft brand template

ASP.NET Core Apps and DockerIan PhilpotSr. Technical Evangelist@tripdubroot

8/17/2016 9:29 AM1 Microsoft Corporation. All rights reserved.

The web stack is oldWeighed down by old unused codePrimarily in system.webDepending on machine level upgrades to .net was problematicPerformance was as fast it could be on existing platform

Why Reinvent ASP.NET

ArchitectureNot User Experience

ASP.NET Core is a rethinking of the platform

Complete re-write of the platformCross-platformOpen sourceSingle platform (MVC and WebAPI)WebForms is goneEverything is a dependency your app will be leanLow memory footprintMultiple Deployment

What is ASP.NET?

OverviewUnix/Linux/OSX.net coreMonoSelf-hosted dotnet cliWindows.net 4.6.net coreHosting IIS Native LoaderSelf-hosted dotnet cli

What is ASP.NET?

Three FrameworksFrameworks are about cross-platform.NET 4.6The .NET youve always known.Net CoreThe cross-platform .net framework in progressMonoThe existing open source cross-platform .net framework

What is ASP.NET?

CoreCLR is a subset of the .NET framework. Youll need to work around missing functionality outside of the ASP.NET Core.

Everyting above .NET layer is a NuGet PackageFrameworks are bootstrapped and CLRMVC, StaticFiles, Logging, Configuration, Identity are just packagesEverything is optional

Completely Composed

Uses existing Web Development toolingNPM for tooling supportBower for client-side lib supportGrunt and Gulp for build automationNuGet for .Net PackagesNone of this is required

Embraces Open Web Development

Installing ASP.NET Core

Demohttp://dot.net/Core DownloadVisual StudioProject Templates

Microsoft Corporation. All rights reserved. 8/17/2016 9:29 AM10

Hello World .NET Core

Dotnet cliDotnet helpExtensibaleMkdir helloworldDotnet newProgram.csProject.jsonDotnet restoreDotnet build/runChange the hello world text

Microsoft Corporation. All rights reserved. 8/17/2016 9:29 AM11

Hello World VS Code

Code.visualstudio.comDownload (cross-platform)InstallerCode .http://docs.asp.net/en/latest/client-side/yeoman.htmlNodenpm install -g yo bower grunt-cli gulpnpm install -g generator-aspnetmkdiryo aspnetcode .

Microsoft Corporation. All rights reserved. 8/17/2016 9:29 AM12

Hello World Visual Studio

File New Project > EmptyProgram.csStartup.csConfigureServicesConfigureCalled when requests come inMiddleware runs when requests come inFile New Project > web applicationShow All files and review

Microsoft Corporation. All rights reserved. 8/17/2016 9:29 AM13

VSTS Build

https://www.visualstudio.com/en-us/docs/build/apps/aspnet/aspnetcore-to-azure

Microsoft Corporation. All rights reserved. 8/17/2016 9:30 AM14

Dockerize

-y for apt-get install

Microsoft Corporation. All rights reserved. 8/17/2016 9:30 AM15

Copyright Microsoft Corporation. All rights reserved.

8/17/2016 9:29 AM16 Microsoft Corporation. All rights reserved.