.NET Core 2.0 ist seit kurzem released, ebenso wie ASP.NET Core 2.0 und der .NET Standard 2.0.
Aber was ist das genau?
Was ist der .NET Standard und was hat er für Auswirkungen auf die Entwicklung mit .NET?
In diesem Vortrag möchte ich euch zeigen was das .NET Core ist, was für Chancen und Möglichkeiten ASP.NET Core bietet und was der .NET Standard damit alledem zu tun hat.
2. Wer bin ich?
.NET süchtiger Web Developer seit 2001
3x Microsoft MVP für Visual Studio & Development
Technologies
Blogger auf http://asp.net-hacker.rocks/
Autor mehrerer Artikel in bekannten .NET Magazinen
Leiter der .NET User Group Basel und der INETA Deutschland
3. Wo arbeite ich?
Als Entwickler, Berater und Trainer
YooApplications AG am Äschenplatz in Basel
http://yooapps.com
DIE Full-Service-Agentur in Basel
Konzepte (UX) => Design (UI) => Entwicklung
UX/UI,
Web-, Mobile-, Enterprise-Entwicklung,
Beratung & Schulung
5. Was ist .NET Core?
„.NET Core is the modular and high performance
implementation of .NET for creating web applications and
services that run on Windows, Linux and Mac. It is open source
and it can share the same code with .NET Framework and
Xamarin apps.“
“.NET Core is a blazing fast, lightweight and modular platform
for creating web applications and services that run on Windows,
Linux and Mac.”
9. Was ist .NET Core?
Komplett neu entwickeltes .NET Framework: „CoreFX“
Komplett neu entwickelte .NET Run-Time: „CoreCLR“
Plattformunabhängig
Windows, Linux, MacOS, Tizen
PCs, R-PI, Arduino, Samsung-TV,
Komplett Open Source
Leichtgewichtig
Intuitive .NET CLI
10. .NET Core Versionen
.NET Core 1.0 wurde released am 27 June 2016
Arbeitet mit VS2015 und VS2017
.NET Core 2.0 wurde released am 14 August 2017
Nur VS2017 (15.3)
13. Was ist der .NET Standard?
.NET API Spezifikation
Vereinheitlicht die APIs aller .NET Plattformen
.NET Framework, .NET Core, Xamarin, (UWP)
Aktuell 2.0
Je größer die Versionsnummer, desto größer die API
Stellt Interop und kompatibilität zwischen den Plattformen her.
„.NET Standard solves the code sharing problem for .NET developers
by bringing all the APIs that you expect and love across the
environments that you need: desktop applications, mobile apps &
games, and cloud services.“
18. Unterschied zu Portable Class Libraries
(PCL)
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
Platform 3Platform 1
Platform 2
19. Versionierung im .NET Standard?
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
2.0
1.6
1.5
1.4
1.3
1.2
1.1
1.0
20. Neue APIs in .NET Standard 2.0
Primitives • Collections • Reflection • Interop • LinqCORE
Threads • Thread Pool • TasksTHREADING
Files • Compression • MMFIO
Sockets • Http • Mail • WebSocketsNETWORKING
BinaryFormatter • Data Contract • XMLSERIALIZATION
XLinq • XML Document • XPath • Schema • XSLXML
Abstractions • Provider Model • DataSetDATA
21. Wie arbeitet der .NET Standard?
.NET Standard is represented by
The NuGet package NetStandard.Library which contains the reference
assembly netstandard.dll
At build time
.NET Standard bridges references to existing .NET Framework and
PCL assemblies via type forwarding
At runtime
Each platform provides an implementation for netstandard.dll that type
forwards to its implementation
22. Was kann man vom .NET Standard
referenzieren?
My Standard Library 2.x
.NET Standard Library .NET Framework LibraryPortable Class Library
.NET FRAMEWORK .NET CORE XAMARIN
Via Portability
Via Compatibility Shim
Legend
Application Type
Is able to reference
23. Platformspezifische APIs & .NET Standard
.NET Standard (mostly) only contains APIs that will work
everywhere
MSFT generally avoid adding large chunks of APIs that don’t work
everywhere
A small set of APIs will throw PlatformNotSupportedException
Platform specific APIs sit on top of .NET Standard & you can
add references to them
Examples: Registry, Reflection Emit, Access Control, Windows Identity
You’ll become less portable
24. .NET Core und .NET Standard
.NET Core is an implementation of the .NET Standard
They are fully separated, e.g. different GitHub repositories
.NET Standard updates are coordinated across all .NET
implementers
There is a .NET Standard review board
.NET Core can be updated independently
Used by us to experiment and accelerate innovation
27. Was ist ASP.NET Core?
Komplett neu entwickeltes Web Entwicklungs Framework
https://docs.microsoft.com/en-us/aspnet/core/
Gebaut mit .NET Standard
Komplett Open Source
https://github.com/aspnet/home
Leichtgewichtig und Plattformunabhängig
Erweiterbar und Veränderbar
Läuft auf .NET Core und .NET Framework
28. Hosting
Kestrel neu entwickelter WebServer, basiert auf LibuV
Nicht direkt ins Netz hängen
IIS/Nginx
Als Reverse-Proxy vor dem Kestrel
Self hosted
In jeder App
WebListener
Alternative zu Kestrel