The Future of Web Apps @shahedC WakeUpAndCode.com.

48
By Shahed Chowdhuri Sr. Technical Evangelist ASP .NET 5 (aka ASP .NET vNext) The Future of Web Apps @shahedC WakeUpAndCode.com

Transcript of The Future of Web Apps @shahedC WakeUpAndCode.com.

Page 1: The Future of Web Apps @shahedC WakeUpAndCode.com.

By Shahed ChowdhuriSr. Technical Evangelist

ASP .NET 5 (aka ASP .NET vNext)The Future of Web Apps

@shahedC

WakeUpAndCode.com

Page 2: The Future of Web Apps @shahedC WakeUpAndCode.com.

Agenda

Introduction

> .NET (Framework & Core)> ASP.NET 5.0> VS2015 Preview

Q&A

Page 3: The Future of Web Apps @shahedC WakeUpAndCode.com.

Introduction

Page 4: The Future of Web Apps @shahedC WakeUpAndCode.com.

Sources

asp.net/vNext

Scott Guthrie’s Blog

MSDN Blogs, Feb 2015 Update

dotnetConf 2015 on MSDN Ch9

(Coming Soon!)

Page 5: The Future of Web Apps @shahedC WakeUpAndCode.com.

.NET Across Windows/Web Platforms

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

Page 6: The Future of Web Apps @shahedC WakeUpAndCode.com.

Evolution of ASP and ASP .NET

ASP.NETWeb API

Active Server Pages

(Classic ASP)

ASP.NET

(Web Forms)

ASP.NET

MVC1/2/3/4/

5

ASP.NETWeb

Pages

ASP.NET

MVC6

Unified MVC, Web

API and Web

Pages

Page 7: The Future of Web Apps @shahedC WakeUpAndCode.com.

Names & Version Numbers

C#

6.0

.NET Framework

4.6

ASP.NET 5(runs on .NET Core 5 or .NET Framework

4.5.2+)

ASP.NET MVC 6

.NET Core 5

SignalR

3

Page 8: The Future of Web Apps @shahedC WakeUpAndCode.com.

Agenda

Introduction

> .NET (Framework & Core)> ASP.NET 5.0> VS2015 Preview

Q&A

Page 9: The Future of Web Apps @shahedC WakeUpAndCode.com.

.NET Framework & .NET Core

Page 10: The Future of Web Apps @shahedC WakeUpAndCode.com.

.NET 2015: High-Level Overview

Page 11: The Future of Web Apps @shahedC WakeUpAndCode.com.

.NET Core & App Models

Page 12: The Future of Web Apps @shahedC WakeUpAndCode.com.

Compilation Process

Page 13: The Future of Web Apps @shahedC WakeUpAndCode.com.

What About .NET Framework 4.6?

Page 14: The Future of Web Apps @shahedC WakeUpAndCode.com.

ASP .NET 5.0

Page 15: The Future of Web Apps @shahedC WakeUpAndCode.com.

ASP.NET 5.0 Overview

Page 16: The Future of Web Apps @shahedC WakeUpAndCode.com.

ASP.NET 5.0 Summary

Page 17: The Future of Web Apps @shahedC WakeUpAndCode.com.

ASP.NET 5.0 Features

Flexible, Cross Platfor

m runtime

MVC6 – Unified

Programming Model

Tag Helper

s

Dynamic Developme

nt

Bower, Grunt, Gulp

Simplified Dependenc

y Mgmt

Cloud-Ready Config

Dependency Injection

(DI)

Fast HTTP Performanc

e

Open Source

New Project Templates

Command Line Tools

Identity Updates

New HTTP client-role API

Page 18: The Future of Web Apps @shahedC WakeUpAndCode.com.

ASP.NET 5.0 Features

Flexible, Cross Platfor

m runtime

MVC6 – Unified

Programming Model

Tag Helper

s

Dynamic Developme

nt

Bower, Grunt, Gulp

Simplified Dependenc

y Mgmt

Cloud-Ready Config

Dependency Injection

(DI)

Fast HTTP Performanc

e

Open Source

New Project Templates

Command Line Tools

Identity Updates

New HTTP client-role API

• .NET Core or full .NET Framework

• .NET Core is cross-platform• Deploy Core runtime with app• No need for unused features

Page 19: The Future of Web Apps @shahedC WakeUpAndCode.com.

ASP.NET 5.0 Features

Flexible, Cross Platfor

m runtime

MVC6 – Unified

Programming Model

Tag Helper

s

Dynamic Developme

nt

Bower, Grunt, Gulp

Simplified Dependenc

y Mgmt

Cloud-Ready Config

Dependency Injection

(DI)

Fast HTTP Performanc

e

Open Source

New Project Templates

Command Line Tools

Identity Updates

New HTTP client-role API

Unified:• MVC• Web API• Web Pages

Page 20: The Future of Web Apps @shahedC WakeUpAndCode.com.

ASP.NET 5.0 Features

Flexible, Cross Platfor

m runtime

MVC6 – Unified

Programming Model

Tag Helper

s

Dynamic Developme

nt

Bower, Grunt, Gulp

Simplified Dependenc

y Mgmt

Cloud-Ready Config

Dependency Injection

(DI)

Fast HTTP Performanc

e

Open Source

New Project Templates

Command Line Tools

Identity Updates

New HTTP client-role API

• HTML Helpers in your views!

Page 21: The Future of Web Apps @shahedC WakeUpAndCode.com.

ASP.NET 5.0 Features

Flexible, Cross Platfor

m runtime

MVC6 – Unified

Programming Model

Tag Helper

s

Dynamic Developme

nt

Bower, Grunt, Gulp

Simplified Dependenc

y Mgmt

Cloud-Ready Config

Dependency Injection

(DI)

Fast HTTP Performanc

e

Open Source

New Project Templates

Command Line Tools

Identity Updates

New HTTP client-role API

1. Edit code2. Save changes3. Refresh browser4. See changes!

Compiled language with benefits of interpreted language!

Page 22: The Future of Web Apps @shahedC WakeUpAndCode.com.

ASP.NET 5.0 Features

Flexible, Cross Platfor

m runtime

MVC6 – Unified

Programming Model

Tag Helper

s

Dynamic Developme

nt

Bower, Grunt, Gulp

Simplified Dependenc

y Mgmt

Cloud-Ready Config

Dependency Injection

(DI)

Fast HTTP Performanc

e

Open Source

New Project Templates

Command Line Tools

Identity Updates

New HTTP client-role API

• Bower client-side pkg mgr• e.g. JS, CSS

• Grunt & Gulp task runners• compile LESS/CoffeeScript,

Typescipt• run JSLint• minify JS files

Page 23: The Future of Web Apps @shahedC WakeUpAndCode.com.

ASP.NET 5.0 Features

Flexible, Cross Platfor

m runtime

MVC6 – Unified

Programming Model

Tag Helper

s

Dynamic Developme

nt

Bower, Grunt, Gulp

Simplified Dependenc

y Mgmt

Cloud-Ready Config

Dependency Injection

(DI)

Fast HTTP Performanc

e

Open Source

New Project Templates

Command Line Tools

Identity Updates

New HTTP client-role API

• Manage dependencies with NuGet packages

• Edit project.json file• Enjoy IntelliSense!

Page 24: The Future of Web Apps @shahedC WakeUpAndCode.com.

ASP.NET 5.0 Features

Flexible, Cross Platfor

m runtime

MVC6 – Unified

Programming Model

Tag Helper

s

Dynamic Developme

nt

Bower, Grunt, Gulp

Simplified Dependenc

y Mgmt

Cloud-Ready Config

Dependency Injection

(DI)

Fast HTTP Performanc

e

Open Source

New Project Templates

Command Line Tools

Identity Updates

New HTTP client-role API

• Configuration in code• Edit Startup.cs file• No need to use

Web.config• Use JSON, XML, env vars

Page 25: The Future of Web Apps @shahedC WakeUpAndCode.com.

ASP.NET 5.0 Features

Flexible, Cross Platfor

m runtime

MVC6 – Unified

Programming Model

Tag Helper

s

Dynamic Developme

nt

Bower, Grunt, Gulp

Simplified Dependenc

y Mgmt

Cloud-Ready Config

Dependency Injection

(DI)

Fast HTTP Performanc

e

Open Source

New Project Templates

Command Line Tools

Identity Updates

New HTTP client-role API

• minimalistic DI container

• replace with others• Autofac, Ninject,

etc• use [Activate]

attribute

Page 26: The Future of Web Apps @shahedC WakeUpAndCode.com.

ASP.NET 5.0 Features

Flexible, Cross Platfor

m runtime

MVC6 – Unified

Programming Model

Tag Helper

s

Dynamic Developme

nt

Bower, Grunt, Gulp

Simplified Dependenc

y Mgmt

Cloud-Ready Config

Dependency Injection

(DI)

Fast HTTP Performanc

e

Open Source

New Project Templates

Command Line Tools

Identity Updates

New HTTP client-role API

New HTTP pipeline• modular• add components

as needed• no longer

dependent on System.Web

Page 27: The Future of Web Apps @shahedC WakeUpAndCode.com.

ASP.NET 5.0 Features

Flexible, Cross Platfor

m runtime

MVC6 – Unified

Programming Model

Tag Helper

s

Dynamic Developme

nt

Bower, Grunt, Gulp

Simplified Dependenc

y Mgmt

Cloud-Ready Config

Dependency Injection

(DI)

Fast HTTP Performanc

e

Open Source

New Project Templates

Command Line Tools

Identity Updates

New HTTP client-role API

GitHub!

Page 28: The Future of Web Apps @shahedC WakeUpAndCode.com.

ASP.NET 5.0 Features

Flexible, Cross Platfor

m runtime

MVC6 – Unified

Programming Model

Tag Helper

s

Dynamic Developme

nt

Bower, Grunt, Gulp

Simplified Dependenc

y Mgmt

Cloud-Ready Config

Dependency Injection

(DI)

Fast HTTP Performanc

e

Open Source

New Project Templates

Command Line Tools

Identity Updates

New HTTP client-role API

K Package Manager (KPM)• bundle application• build NuGet packages• build assemblies

Page 29: The Future of Web Apps @shahedC WakeUpAndCode.com.

ASP.NET 5.0 Features

Flexible, Cross Platfor

m runtime

MVC6 – Unified

Programming Model

Tag Helper

s

Dynamic Developme

nt

Bower, Grunt, Gulp

Simplified Dependenc

y Mgmt

Cloud-Ready Config

Dependency Injection

(DI)

Fast HTTP Performanc

e

Open Source

New Project Templates

Command Line Tools

Identity Updates

New HTTP client-role API

ASP.NET 5 Preview Templates• Empty• Starter Web• Web API

Page 30: The Future of Web Apps @shahedC WakeUpAndCode.com.

ASP.NET 5.0 Features

Flexible, Cross Platfor

m runtime

MVC6 – Unified

Programming Model

Tag Helper

s

Dynamic Developme

nt

Bower, Grunt, Gulp

Simplified Dependenc

y Mgmt

Cloud-Ready Config

Dependency Injection

(DI)

Fast HTTP Performanc

e

Open Source

New Project Templates

Command Line Tools

Identity Updates

New HTTP client-role API

• Open ID Connect• OAuth2• Template auth logic based

on OWIN and Open ID Connect (not WIF)

Page 31: The Future of Web Apps @shahedC WakeUpAndCode.com.

ASP.NET 5.0 Features

Flexible, Cross Platfor

m runtime

MVC6 – Unified

Programming Model

Tag Helper

s

Dynamic Developme

nt

Bower, Grunt, Gulp

Simplified Dependenc

y Mgmt

Cloud-Ready Config

Dependency Injection

(DI)

Fast HTTP Performanc

e

Open Source

New Project Templates

Command Line Tools

Identity Updates

New HTTP client-role API

More granular control (than HttpClientHandler) over individual aspects of HTTP• redirects, auth, cookies,

etc

Page 32: The Future of Web Apps @shahedC WakeUpAndCode.com.

ASP.NET 5.0 Features

Flexible, Cross Platfor

m runtime

MVC6 – Unified

Programming Model

Tag Helper

s

Dynamic Developme

nt

Bower, Grunt, Gulp

Simplified Dependenc

y Mgmt

Cloud-Ready Config

Dependency Injection

(DI)

Fast HTTP Performanc

e

Open Source

New Project Templates

Command Line Tools

Identity Updates

New HTTP client-role API

Page 33: The Future of Web Apps @shahedC WakeUpAndCode.com.

How about Entity Framework?

DB

ORM

Entities in

Code

Page 34: The Future of Web Apps @shahedC WakeUpAndCode.com.

Visual Studio 2015 Preview

Page 35: The Future of Web Apps @shahedC WakeUpAndCode.com.

File New Project Web

• Web App• Class Lib?• Console App?

Page 36: The Future of Web Apps @shahedC WakeUpAndCode.com.

Select a Template

Page 37: The Future of Web Apps @shahedC WakeUpAndCode.com.

Startup.cs Configuration

Page 38: The Future of Web Apps @shahedC WakeUpAndCode.com.

project.json

packages.config not needed!

Page 39: The Future of Web Apps @shahedC WakeUpAndCode.com.

Right-click (Project) Properties • Application tab

• Debug tab

Use specific KRE version!

Page 40: The Future of Web Apps @shahedC WakeUpAndCode.com.

Choose CLR Type While Debugging

Page 41: The Future of Web Apps @shahedC WakeUpAndCode.com.

DEMO

Page 42: The Future of Web Apps @shahedC WakeUpAndCode.com.

Beyond Visual Studio

Website: http://www.omnisharp.net/ • Cross-platform .NET development!• No VS? No Windows? No problem!• Sublime on MacOS! Emacs on Ubuntu!

https://github.com/aspnet/dnvm/ • .NET SDK Version Manager• Formerly KVM• Get list of DNXs (aka KRE)

DNVM

Page 43: The Future of Web Apps @shahedC WakeUpAndCode.com.

References• http://asp.net/vnext • https://weblogs.asp.net/scottgu/introducing-asp-net-5 • http://blogs.msdn.com/b/webdev/archive/2015/02/23/aspnet

-5-updates-for-feb-2015.aspx

• https://channel9.msdn.com/Events/dotnetConf/2015

• http://blogs.msdn.com/b/bethmassi/archive/2015/02/25/understanding-net-2015.aspx

• http://www.asp.net/vnext/overview/aspnet-vnext/grunt-and-bower-in-visual-studio-2015

• http://www.asp.net/vnext/overview/aspnet-vnext/vc• Tutorials in Starter Web Template

Page 45: The Future of Web Apps @shahedC WakeUpAndCode.com.

Agenda

Introduction

> .NET (Framework & Core)> ASP.NET 5.0> VS2015 Preview

Q&A

Page 46: The Future of Web Apps @shahedC WakeUpAndCode.com.

Q & A

Page 47: The Future of Web Apps @shahedC WakeUpAndCode.com.

Agenda

Introduction

> .NET (Framework & Core)> ASP.NET 5.0> VS2015 Preview

Q&A