NET Standard - Introduction

Preview:

Citation preview

.NET StandardIntroduction

.NET FRAMEWORK .NET CORE XAMARIN

APP

MO

DELS

BASE

LIBR

ARIE

S

Compilers Languages Runtime components

COMMON INFRASTRUCTURE

Base Class Library Core Library Mono Class Library

ASP.NET

Windows FormsWPF UWP

ASP.NET Core

iOSAndroid

OS X

.NET today—app models and libraries

.NET FRAMEWORK .NET CORE XAMARIN

APP

MO

DELS

BASE

LIBR

ARIE

S

Compilers Languages Runtime components

COMMON INFRASTRUCTURE

Base Class Library Core Library Mono Class Library

ASP.NET

Windows FormsWPF UWP

ASP.NET Core

iOSAndroid

OS X

.NET today—reusing code

Difficult to reuse skills• Need to master 3+1 base class libraries

Difficult to reuse code• Need to target a small common denominator

Difficult to innovate• Need implementations on each platform

CHALLENGES

.NET FRAMEWORK .NET CORE XAMARIN

APP

MO

DELS

BASE

LIBR

ARIE

S

Compilers Languages Runtime components

COMMON INFRASTRUCTURE

Base Class Library Core Library Mono Class Library

ASP.NET

Windows FormsWPF UWP

ASP.NET Core

iOSAndroid

OS X

.NET tomorrow

.NET STANDARDOne BCL to rule them all

.NET FRAMEWORK .NET CORE XAMARIN

APP

MO

DELS

BASE

LIBR

ARIE

S

Compilers Languages Runtime components

COMMON INFRASTRUCTURE

Base Class Library Core Library Mono Class Library

ASP.NET

Windows FormsWPF UWP

ASP.NET Core

iOSAndroid

OS X

.NET tomorrow—reusing code

.NET STANDARD LIBRARYOne library to rule them all

Reuse skills• Master one library, not a platform

Reuse code• Big surface area - no small common denominator

Faster innovation• .NET Standard can grow without updating platforms

BENEFITS

.NET Standard is a specification Represents a set of APIs that all .NET platforms have to implement

Is a type of class library & provided as a NuGet package

What is .NET Standard?

Platform 3Platform 1

Platform 2

PCLs were an after thought, i.e. each platform could decide which APIs to includes• No systematic approach to versioning• Computed intersection profiles

Each PCLs is targeting a specific set of platforms• Not compatible with newer platforms• Hard to understand compatibility

relationships

Difference to Portable Class Libraries (PCL)

Intersection Profiles

2.0

1.6

1.3

Higher versions incorporate all APIs from previous versions.• Projects targeting version X.Y can

reference libraries & projects targeting any version between 1.0 and X.Y

Concrete .NET platforms implement a specific version of .NET Standard• From that platform you can

reference libraries up to that version

How does versioning work in .NET Standard?

1.0

DemoExploring .NET Standard Versions