ASP.NET Core 2.0: The Future of Web Apps

58
ASP .NET Core 2.0 Shahed Chowdhuri Sr. Technical Evangelist @ Microsoft @shahedC WakeUpAndCode.com The Future of Web Apps

Transcript of ASP.NET Core 2.0: The Future of Web Apps

Page 1: ASP.NET Core 2.0: The Future of Web Apps

ASP.NET Core 2.0

Shahed Chowdhuri

Sr. Technical Evangelist @ Microsoft

@shahedC

WakeUpAndCode.com

The Future of Web Apps

Page 2: ASP.NET Core 2.0: The Future of Web Apps

Agenda

Introduction

> .NET (Framework & Core)

> ASP.NET Core

> Visual Studio

Wrap-up + Q&A

Page 3: ASP.NET Core 2.0: The Future of Web Apps

Introduction

Page 4: ASP.NET Core 2.0: The Future of Web Apps

ASP.NET Core 2.0Info and Downloads: http://www.asp.net/

Page 5: ASP.NET Core 2.0: The Future of Web Apps

.NET Core for Cross-Platform Dev.NET Core: https://www.microsoft.com/net

Page 6: ASP.NET Core 2.0: The Future of Web Apps

Blog Sources

Scott Hanselman’s Blog: https://www.hanselman.com/blog/

.NET Web Dev Blog: https://blogs.msdn.microsoft.com/webdev/

Page 7: ASP.NET Core 2.0: The Future of Web Apps

Visual Studio 2017 Launch Videos

https://channel9.msdn.com/Events/Visual-Studio/Visual-Studio-2017-Launch?sort=viewed&direction=asc

Page 8: ASP.NET Core 2.0: The Future of Web Apps

Build 2017: ASP .NET Core 2.0

https://channel9.msdn.com/Events/Build/2017/b8048

Page 9: ASP.NET Core 2.0: The Future of Web Apps

Other Video Sources

MSDN Channel 9: https://channel9.msdn.com

.NET Conf 2017: http://www.dotnetconf.net

Page 10: ASP.NET Core 2.0: The Future of Web Apps

Docs + Tutorials

Tutorials: https://docs.microsoft.com/en-us/aspnet/core/tutorials/first-mvc-app/

Docs: https://blogs.msdn.microsoft.com/webdev/2017/02/07/asp-net-documentation-now-on-docs-microsoft-com/

Page 11: ASP.NET Core 2.0: The Future of Web Apps

.NET Across Windows/Web Platforms

http://blogs.msdn.com/b/dotnet/archive/2014/12/04/introducing-net-core.aspx

Page 12: ASP.NET Core 2.0: The Future of Web Apps
Page 13: ASP.NET Core 2.0: The Future of Web Apps

ASP.NETWeb API

Active Server Pages

(Classic ASP)

ASP.NET(Web

Forms)

ASP.NETMVC

1/2/3/4/5

ASP.NETWeb Pages

Evolution of ASP and ASP .NET

ASP.NETCore MVC

Unified MVC, Web

API and Razor Web

Pages

Page 14: ASP.NET Core 2.0: The Future of Web Apps

Names & Version Numbers

Page 15: ASP.NET Core 2.0: The Future of Web Apps

C# 7.0 in VS2017

https://docs.microsoft.com/en-us/dotnet/articles/csharp/csharp-7

Page 16: ASP.NET Core 2.0: The Future of Web Apps

ASP.NET Core Roadmap

https://github.com/aspnet/Home/wiki/Roadmap

Page 17: ASP.NET Core 2.0: The Future of Web Apps

ASP.NET Core 2.0 Update

https://blogs.msdn.microsoft.com/webdev/2017/06/28/introducing-asp-net-core-2-0-preview-2/

Page 18: ASP.NET Core 2.0: The Future of Web Apps

.NET Core Roadmap

https://github.com/dotnet/core/blob/master/roadmap.md

Page 19: ASP.NET Core 2.0: The Future of Web Apps

.NET Core 2.0 (Q3 2017)

https://github.com/dotnet/corefx/milestone/4

Page 20: ASP.NET Core 2.0: The Future of Web Apps

22https://blogs.msdn.microsoft.com/dotnet/2017/03/07/announcing-net-core-tools-1-0/

Announcing .NET Core Tools 1.0 in VS2017

Page 21: ASP.NET Core 2.0: The Future of Web Apps

Agenda

Introduction

> .NET (Framework & Core)

> ASP.NET Core

> Visual Studio

Wrap-up + Q&A

Page 22: ASP.NET Core 2.0: The Future of Web Apps

.NET Framework & .NET Core

Page 23: ASP.NET Core 2.0: The Future of Web Apps

ASP.NET Core High-Level Overview

Page 24: ASP.NET Core 2.0: The Future of Web Apps

Compilation Process

Page 25: ASP.NET Core 2.0: The Future of Web Apps

What About .NET Framework 4.6+?

Core is

4.7

Page 26: ASP.NET Core 2.0: The Future of Web Apps

ASP .NET Core

Page 27: ASP.NET Core 2.0: The Future of Web Apps

ASP.NET Core Features

Page 28: ASP.NET Core 2.0: The Future of Web Apps

ASP.NET Core Summary

Page 29: ASP.NET Core 2.0: The Future of Web Apps

Relevant XKCD Comic

https://xkcd.com/303/

Page 30: ASP.NET Core 2.0: The Future of Web Apps

How about Entity Framework?

DB

ORM

Entities in Code

Core

)

4.6+

4.6+

Page 31: ASP.NET Core 2.0: The Future of Web Apps

Visual Studio 2017

Page 32: ASP.NET Core 2.0: The Future of Web Apps

New Installer!

Page 33: ASP.NET Core 2.0: The Future of Web Apps

File New Project Web

• ASP .NET Core Web App

• Web App (4.x)

Page 34: ASP.NET Core 2.0: The Future of Web Apps

Select a Template1.0 , 1.1, 2.0 Templates

• Empty

• Web API

• Web App (Razor)

• Web App (MVC)

• Angular

• React.js

• React.js & Redux

Other settings:

• Authentication

• Docker Support

Page 35: ASP.NET Core 2.0: The Future of Web Apps

Startup.cs Configuration

Page 36: ASP.NET Core 2.0: The Future of Web Apps

project.json

Page 37: ASP.NET Core 2.0: The Future of Web Apps

.csproj project file

Page 38: ASP.NET Core 2.0: The Future of Web Apps

Right-click (Project) Properties

Page 39: ASP.NET Core 2.0: The Future of Web Apps

Choose Profile While Debugging

Page 40: ASP.NET Core 2.0: The Future of Web Apps

New Razor Pages!h

ttp

://w

ww

.his

ham

bin

ate

ya.c

om

/welc

om

e-r

azo

r-p

ag

es

Page 41: ASP.NET Core 2.0: The Future of Web Apps

Intro to Razor Pages

https://docs.microsoft.com/en-us/aspnet/core/mvc/razor-pages

Page 42: ASP.NET Core 2.0: The Future of Web Apps

Razor Syntax

Page 43: ASP.NET Core 2.0: The Future of Web Apps

Live Unit Testing

https://blogs.msdn.microsoft.com/visualstudio/2016/11/18/live-unit-testing-visual-studio-2017-rc/

Page 44: ASP.NET Core 2.0: The Future of Web Apps

DEMO

Page 45: ASP.NET Core 2.0: The Future of Web Apps

Migrating from MVC to MVC Core

https://docs.microsoft.com/en-us/aspnet/core/migration/mvc

Page 46: ASP.NET Core 2.0: The Future of Web Apps

Visual Studio Code

Download https://code.visualstudio.com

Page 47: ASP.NET Core 2.0: The Future of Web Apps

.NET Version Manager (DNVM)

• .NET SDK Version Manager

• Formerly KVM

• Get list of DNXs (aka KRE)

GitHub: https://github.com/aspnet/dnvm

Page 48: ASP.NET Core 2.0: The Future of Web Apps

Tooling Changes and NETStandard

Page 49: ASP.NET Core 2.0: The Future of Web Apps

dotnet/cli on GitHubThis repo contains the .NET Core command-line (CLI) tools, used for building .NET Core apps and libraries.

GitHub: https://github.com/dotnet/cli

Page 50: ASP.NET Core 2.0: The Future of Web Apps

Agenda

Introduction

> .NET (Framework & Core)

> ASP.NET Core

> Visual Studio

Wrap-up + Q&A

Page 51: ASP.NET Core 2.0: The Future of Web Apps

MEAN Stack…?

72

Page 52: ASP.NET Core 2.0: The Future of Web Apps

NICE Stack!

• .NET

• IIS

•C#

•Entity Framework

nicestack.io

73

Page 53: ASP.NET Core 2.0: The Future of Web Apps

DevHub on GitHub!

74

https://github.com/shahedc/DevHub

Page 54: ASP.NET Core 2.0: The Future of Web Apps

References• ASP .NET: http://www.asp.net

• .NET Core: https://www.microsoft.com/net

• .NET Web Dev Blog: https://blogs.msdn.microsoft.com/webdev

• Scott Hanselman’s Blog: https://www.hanselman.com/blog

• .NET Conf: http://www.dotnetconf.net

• MSDN Channel 9: https://channel9.msdn.com

• Tutorials: https://docs.microsoft.com/en-us/aspnet/core/tutorials/first-mvc-app

• C# 7: https://docs.microsoft.com/en-us/dotnet/articles/csharp/csharp-7

• ASP.NET Core Roadmap: https://github.com/aspnet/Home/wiki/Roadmap

• .NET Core Roadmap: https://github.com/dotnet/core/blob/master/roadmap.md

Page 55: ASP.NET Core 2.0: The Future of Web Apps

Other Resources

• New Razor Pages: http://www.hishambinateya.com/welcome-razor-pages

• Intro to Razor: https://docs.microsoft.com/en-us/aspnet/core/mvc/razor-pages

• Live Unit Testing: https://blogs.msdn.microsoft.com/visualstudio/2016/11/18/live-unit-testing-visual-studio-2017-rc

• Migrating from MVC to MVC Core: https://docs.microsoft.com/en-us/aspnet/core/migration/mvc

• Visual Studio Code: https://code.visualstudio.com

• dotnet/cli on GitHub: https://github.com/dotnet/cli

Page 56: ASP.NET Core 2.0: The Future of Web Apps

Q & A

Page 57: ASP.NET Core 2.0: The Future of Web Apps

Agenda

Introduction

> .NET (Framework & Core)

> ASP.NET Core

> Visual Studio

Wrap-up + Q&A