31

ASP.NET 5 - Microsoft's Web development platform reimagined

Embed Size (px)

Citation preview

Page 1: ASP.NET 5 - Microsoft's Web development platform reimagined
Page 2: ASP.NET 5 - Microsoft's Web development platform reimagined

Alex ThissenLead Consultant Xpirit

ASP.NET 5Microsoft’s web development platform reimagined

Page 3: ASP.NET 5 - Microsoft's Web development platform reimagined

Agenda• Overview .NET vNext and ASP.NET 5• Tenets of ASP.NET• Open source and cross-platform• Command-line first• Symmetry• Modern Web Architecture

• Wrapup• Summary• Questions and Answers

Page 4: ASP.NET 5 - Microsoft's Web development platform reimagined

An overviewViewing ASP.NET from above

Page 5: ASP.NET 5 - Microsoft's Web development platform reimagined

ASP.NET componentsNothing new here, or is there?

MVC 6Unified Web StackMVC 6

Page 6: ASP.NET 5 - Microsoft's Web development platform reimagined

ASP.NET 5 and the Modern WebA big shift for Microsoft

Choose your editors and tools

Open Source with contributions Cross-Platform

Seamless transition from on-premises to cloud

Faster developmentcycleTotally modular

Fast

Page 7: ASP.NET 5 - Microsoft's Web development platform reimagined

Ingredients to the mixHow it all started

Project KatanaOWIN npm NuGet

Page 8: ASP.NET 5 - Microsoft's Web development platform reimagined

.NET FX vNext Technology Stack

Host

Mac OS XLinux

Self Hosted

“Helios”

IIS

IIS Native ModuleIIS Native Module

CLR Core CLR Mono CLR

.NET Base Class Library

ASP.NET 5

Windows

Cloud/Server optimized

Page 9: ASP.NET 5 - Microsoft's Web development platform reimagined

ASP.NET 5 on .NET FX vNext

Full .NET CLR

• Entire API set in machine wide install (200 MB)

• Updated with OS• Ecosystem of existing

packages• Backward compatibility• Default for

Visual Studio 2015 projects

Cloud Optimized CLR

• Lean and modular runtime (11 MB)• Optimized for server• Small memory footprint

• Libraries in NuGet packages

• Framework deployed with app

• Different versions can run side-by-side

Mono

• Cross-Platform runtime for Linux and Mac OS X

• Together with Mono community

ASP.NET 5.0 ASP.NET 5.0 ASP.NET 5.0

Page 10: ASP.NET 5 - Microsoft's Web development platform reimagined

Tenets from ASP.NET team

Command-line first• Facilitate cross-

platform• Visual Studio

2015 for premium experience

Symmetry• Between

command-line and visual studio

• Between server and cloud

• It just works by default in the cloud and on-premise

Open source• All code visible

(even during development)

• Contributions from community

Light-weight and Pay-as-you-go• Only include

what you use

Page 11: ASP.NET 5 - Microsoft's Web development platform reimagined

Open sourceTap into the community ecosystem

Page 12: ASP.NET 5 - Microsoft's Web development platform reimagined

Open sourced parts of .NET

Page 13: ASP.NET 5 - Microsoft's Web development platform reimagined

Open sourcing ASP.NET Find it all here• github.com/aspnet • github.com/dotnet

/home Help and feedback• JabbR:

https://jabbr.net/#rooms/aspnetvnext

• ASP.NET forums: http://forums.asp.net

Have a look in the kitchen

Page 14: ASP.NET 5 - Microsoft's Web development platform reimagined

.NET Foundation• Focused on .NET FX• Apache 2 license mostly• No platform restrictions

Fostering open development and collaboration

Page 15: ASP.NET 5 - Microsoft's Web development platform reimagined

SymmetryTaking away the differences and embracing choice

Page 16: ASP.NET 5 - Microsoft's Web development platform reimagined

DNX - .NET Execution Environment• Compilation system• SDK tools (DNVM,

DNU)

• Native CLR hosts

Code required to bootstrap and run an application

Goals

• Change code and run• Expose metadata about the

runtime for others to query• Create a cached version of

your application's dependencies ("compilation")

Principles

• NuGet all the things• There is no such thing as

"design time"• Dependencies are always

described as what not where

Page 17: ASP.NET 5 - Microsoft's Web development platform reimagined

Cross-platform toolingA warm welcome to MacOS and Linux

Page 18: ASP.NET 5 - Microsoft's Web development platform reimagined

Building and runningChoose your own tooling

Web Server

Website

C# Code(.cs file)

BinaryRoslyn

Page 19: ASP.NET 5 - Microsoft's Web development platform reimagined

Command-line firstOffering both a CLI and UI experience

Page 20: ASP.NET 5 - Microsoft's Web development platform reimagined

Command-line firstMore than just Visual Studio

Page 21: ASP.NET 5 - Microsoft's Web development platform reimagined

Text before UI • Everything from text

files– Projects– Configuration– Preferences and

options– Launch settings

• JSON is preferred data format

Return of the text files

Page 22: ASP.NET 5 - Microsoft's Web development platform reimagined

New project system.csproj is gone. Long live project.json

• Independent of Visual Studio• JSON files instead of VS artefacts• Every file is relevant

– Unless stated otherwise• Specific folder structure• Build for multiple target frameworks

Page 23: ASP.NET 5 - Microsoft's Web development platform reimagined

Modern web architectureModular, pay as you use, light-weight and fast

Page 24: ASP.NET 5 - Microsoft's Web development platform reimagined

NuGet all the things • NuGet packages are

unit of reference– Not assemblies

Projects: • build NuGet

packages• reference NuGet

packages

Simplify dependency management

Page 25: ASP.NET 5 - Microsoft's Web development platform reimagined

Runtime loading• Dependency

resolution rules

• Nearest wins• Cousin

dependencies

Playing by the rules

Page 26: ASP.NET 5 - Microsoft's Web development platform reimagined

Deploying ASP.NET 5 applicationsWith source code Without source code

XCopy deployment

Page 27: ASP.NET 5 - Microsoft's Web development platform reimagined

Global tools• DNX console applications in a NuGet package• Installed globally• Runnable from command line.

Example: User-secret

Page 28: ASP.NET 5 - Microsoft's Web development platform reimagined

Assembly Neutral Interfaces• Allows an interface's identity to not be tied to its

assembly– Interface used as a contract– No requirement on shared binary asset (compile-

time and run-time)• Interfaces must be identical

– Exact same types and marked with [AssemblyNeutral] [AssemblyNeutral]

public interface ILogger { void Log(string message); }

Page 29: ASP.NET 5 - Microsoft's Web development platform reimagined

Summary

ASP.NET 5 reimagined

Cross-PlatformCoreCLR Command-LineDNXNuGet

Key takeaways for ASP.NET 5

Page 30: ASP.NET 5 - Microsoft's Web development platform reimagined

Your feedback is important!Scan the QR Code and let us know via the TechDays App.

Laat ons weten wat u van de sessie vindt!Scan the QR Code via de TechDays App.

Bent u al lid van de Microsot Virtual Academy?! Op MVA kunt u altijd iets nieuws leren over de laatste technologie van Microsoft. Meld u vandaag aan op de MVA Stand. MVA biedt 7/24 gratis online training on-demand voor IT-Professionals en Ontwikkelaars.

Page 31: ASP.NET 5 - Microsoft's Web development platform reimagined