.NET-Framework adé! – Und
was ist mit meinem UI?
Robin Sedlaczek | CTO Fairmas GmbH | .NET User Group Berlin
@RobinSedlaczek
RobinSedlaczek.com
@RobinSedlaczek
RobinSedlaczek.com
RobinSedlaczek
RobinSedlaczek.com
robin.sedlaczek@live.de
 Community-Leader
 CTO der GmbH Berlin
 Sprecher | Autor | Blogger
Entwickler.de, Heise, DotNetPro, Informatik aktuell, BASTA!, .NET Summit,
ParallelCon, ADC, GUI & DESIGN, DevSpace, Spartakiade...
 Open Source-Entwickler
SharpGL, Roslyn, FxCopAnalyzers, Force Feedback Programming
.NET User Group Berlin-Brandenburg
Ihr habt Fragen?
Ich beantworte sie jederzeit gerne. For free hugs. 😉
Robin Sedlaczek
@RobinSedlaczek
RobinSedlaczek.com
PROBLEME
Mit Windows,
monolithischem
.NET Framework
& MSSQL Server
in die Cloud…
@RobinSedlaczek
RobinSedlaczek.com
MOTIVATION
Auf grüner Wiese
Aller Anfang ist schwer…
Auf brauner Wiese
Migration einer Bestandssoftware…
Auf der Parkbank
Ist .NET Core überhaupt relevant für mich?
Raus aus der Komfortzone
Womit soll ich mich beschäftigen?
Robin Sedlaczek | CTO Fairmas GmbH | .NET User Group Berlin
@RobinSedlaczek
RobinSedlaczek.com
Neues in .NET Core
@RobinSedlaczek
RobinSedlaczek.com
NEUES IN .NET CORE
Stand heute (28.04.2019)
 Aktuelle Preview: .NET Core 3.0.0 Preview 5 (final September 2019)
 Aktuelle Version:
 .NET Core SDK 2.2.5
 .NET Core Runtime 2.2.204
 LTS: .NET Core 2.1.x with SDK 2.1.x
 Maintenance: .NET Core 1.1 und .NET Core 1.0
@RobinSedlaczek
RobinSedlaczek.com
.NET Core 3
 ASP.NET Core ab Version 3 nicht
mehr auf Full Framework lauffähig -
nur noch auf .NET Core
 WPF, WinForms, EF6 und UWP-
Controls unterstützt in .NET Core
 .NET Fx komplett eingebettet in
Anwendung (.exe) auslieferbar
 .NET Core Side-by-Side UND WPF-,
WinForms-, UWP-Unterstützung
@RobinSedlaczek
RobinSedlaczek.com
.NET CORE 3
 .NET Standard v2.1
 ABER: Desktop Packs nur auf Windows!
 Side-by-Side für Windows Desktop
Anwendungen möglich
 Komfortable/problemlose Migration zu .NET
Core durch Tooling angestrebt
 Umstellung auf neues Project File Format
 Mit ML.NET hält AI/ML Einzug in .NET Core
Robin Sedlaczek | CTO Fairmas GmbH | .NET User Group Berlin
@RobinSedlaczek
RobinSedlaczek.com
Die Gretchen-Frage…
@RobinSedlaczek
RobinSedlaczek.com
DIE GRETCHEN-FRAGE…
Soll ich umsteigen auf .NET Core und/oder .NET Standard?
Ja/Nein/Wann?
Was ist eigentlich dieses .NET Standard? Ist das auch
plattformunabhängig? Oder wogegen kompiliere ich eigentlich
meine Anwendungen? Ich bin verwirrt…
Nööö… Da bleib ich lieber beim Altbekannten...!
@RobinSedlaczek
RobinSedlaczek.com
DIE GRETCHEN-FRAGE…
Nochmal:
2. .NET Framework erfüllt/implementiert .NET
Standard 2.1 nicht! Bisher sind auch keine Pläne
dazu bekannt.
 Typen aus .NET Standard 2.1 sind Voraussetzung
für neue C#-Sprachfeatures (z.B. asynchrone
Streams & Ranges)
http://immo.landwerth.net/netstandard-versions/#
1. WPF, WinForms open sourced und
portiert auf .NET Core!
@RobinSedlaczek
RobinSedlaczek.com
DIE GRETCHEN-FRAGE…
„.NET Core is the Future of .NET“
https://devblogs.microsoft.com/dotnet/net-core-is-the-future-of-net/
@RobinSedlaczek
RobinSedlaczek.com
DIE GRETCHEN-FRAGE…
Ab .NET Core 3
 keine Portierung weiterer Feature von .NET
 4.8 letzte Major-Version
 Primäre Anwendungsmodelle unterstützt, ansonsten
moderner Ersatz:
 Web Forms?  Blazor
 Remoting, WCF  ASP.NET Core Web APIs oder gRPC
@RobinSedlaczek
RobinSedlaczek.com
DIE GRETCHEN-FRAGE…
Weiterentwicklung von .NET Core
 Runtime, GC (Garbage Collector)
 JIT (Just-in-Time), AOT (Ahead-of-Time)
 BCL (Base Class Library)
 C#, VB.NET, F#
 ASP.NET
 Entity Framework
 ML.NET
 WinForms, WPF and Xamarin
 .NET Core vNext?
 .NET 5
@RobinSedlaczek
RobinSedlaczek.com
DIE GRETCHEN-FRAGE…
 Eine Runtime &
Framework
 Beste von .NET, .NET
Core, Xamarin &
Mono
 Eine Codebasis
@RobinSedlaczek
RobinSedlaczek.com
DIE GRETCHEN-FRAGE…
@RobinSedlaczek
RobinSedlaczek.com
DIE GRETCHEN-FRAGE…
Also: Ja, .NET Core für neue Projekte!
1. Neue Libraries immer gegen .NET Standard! Und alte am besten
migrieren zu .NET Standard.
2. Neue Projekte immer gleich auf .NET Core! Es tut ja nicht weh…
Außer vielleicht die NuGet-Hölle im Anschluss… ;o)
@RobinSedlaczek
RobinSedlaczek.com
.NET STANDARD
 .NET Standard ist eine Art
Interface/Vertrag
 Wird von einer Runtime &
Framework erfüllt
 Komponente, die gegen
Interface kompiliert ist, kann
überall verwendet werden, wo
Interface erfüllt wird
Robin Sedlaczek | CTO Fairmas GmbH | .NET User Group Berlin
@RobinSedlaczek
RobinSedlaczek.com
Architekturen
@RobinSedlaczek
RobinSedlaczek.com
ARCHITEKTUREN
Anwendungstypen
 Web Applications & Web APIs
 Desktop Applications
 Mobile Apps
 Cloud Applications
 IoT
 Artificial Intelligence (AI)
@RobinSedlaczek
RobinSedlaczek.com
ARCHITEKTUREN
.NET Application Architecture (Center)
https://www.microsoft.com/net/learn/architecture
 Architekturen, Patterns & Guides/Guidelines
 viele und vor allem „real-komplexe“
Beispiele
 das meiste Material als eBooks verfügbar
 alle Beispiele als Open Source auf GitHub
verfügbar https://github.com/dotnet-architecture
Robin Sedlaczek | CTO Fairmas GmbH | .NET User Group Berlin
@RobinSedlaczek
RobinSedlaczek.com
Architekturen für Web Apps & Apis
@RobinSedlaczek
RobinSedlaczek.com
WEB APPS & WEB APIS
 Clean/Onion-Architektur ist altbekannt: früher
hexagonale Architektur, später Ports & Adapter
Pattern genannt…
 Applikationsmodell ist Zentrum der Anwendung
 saubere Trennung von UI, BL und vor allem
Infrastrukturcode
 Durch IoC bzw. DI ist Infrastrukturcode abhängig von
Anwendungskern
 Austauschbarkeit & erleichtert Mocking/Testing
Clean Architecture (Onion-View)
https://github.com/dotnet-architecture/eShopOnWeb
@RobinSedlaczek
RobinSedlaczek.com
WEB APPS & WEB APIS
Ports & Adapter Pattern
Domain Layer
 Definiert Entities (werden im DAL verwendet)
 Definiert ViewModels (werden in API verwendet)
 Definiert Interface für Datenzugriffslogik (implementiert in DAL)
 Implementiert Supervisor (benutzt von API), konvertiert Models
Data Layer
 Implementiert Repository Pattern
 Repository implementiert
Interface aus Domain Layer
API Layer
 Implementiert HTTP Services
 Leitet Aufrufe an Domain Layer weiter
 Leitet Antworten von Domain Layer als Response weiter
Robin Sedlaczek | CTO Fairmas GmbH | .NET User Group Berlin
@RobinSedlaczek
RobinSedlaczek.com
Architekturen für Desktop Apps
@RobinSedlaczek
RobinSedlaczek.com
DESKTOP APPS
 MVVM-Pattern trennt UI von BL
 Trennung von Application (Login,
Navigation, Messages), Domain (Entities,
BL) und Data Services (Datenzugriff)
 saubere Trennung von UI, BL und vor
allem Infrastrukturcode
 Durch IoC bzw. DI ist Infrastrukturcode
abhängig von Anwendungskern
 Austauschbarkeit & erleichtert
Mocking/Testing
https://github.com/Microsoft/InventorySample
Robin Sedlaczek | CTO Fairmas GmbH | .NET User Group Berlin
@RobinSedlaczek
RobinSedlaczek.com
Architekturen für Mobile Apps & Microservices
@RobinSedlaczek
RobinSedlaczek.com
MOBILE APPS & MICROSERVICES
Business Logic A
Technologiestack XY
Business Logic B
Technologiestack YZ
Business Logic C
Technologiestack ZA
Business Logic D
Technologiestack YA
Business Logic A
Technologiestack XY
Business Logic B
Technologiestack YZ
Business Logic A
Technologiestack XY
Business Logic B
Technologiestack YZ
Business Logic A
Technologiestack XY
Business Logic B
Technologiestack YZ
Event Bus
@RobinSedlaczek
RobinSedlaczek.com
PRINZIPIEN FÜR MICROSERVICES
https://samnewman.io/talks/principles-of-microservices/
 CI/CD
 Technologieunabhängig
 Asynchrone Kommunikation
 Container
 Technische Standards (HTTPS,
REST, GraphQL, WebSockets…)
 Monitoring (z.B. Application
Insights)
 Documentation (z.B. Swagger,
Swashbuckle)
 Resilency, Fault-Handling (z.B.
Polly.NET)
@RobinSedlaczek
RobinSedlaczek.com
MICROSERVICES & CONTAINER
https://github.com/dotnet-architecture/eShopOnContainers
@RobinSedlaczek
RobinSedlaczek.com
MICROSERVICES & CONTAINER
https://github.com/dotnet-architecture/eShopOnContainers
Robin Sedlaczek | CTO Fairmas GmbH | .NET User Group Berlin
@RobinSedlaczek
RobinSedlaczek.com
Serverless
@RobinSedlaczek
RobinSedlaczek.com
SERVERLESS
https://www.stackery.io/blog/serverless-function-architecture-principles/
@RobinSedlaczek
RobinSedlaczek.com
PRINZIPIEN FÜR SERVERLESS
 Komplett verwaltet, Business Logic-Code only
 Sandboxed
 Kosten entstehen nur, wenn Code ausgeführt wird
 Trigger-basierte Ausführung (z.B. Webhook, Message Queue, Events…)
 Skaliert automatisch und on-Demand
Microsoft Serverless Computing: https://azure.microsoft.com/en-
us/overview/serverless-computing/
Robin Sedlaczek | CTO Fairmas GmbH | .NET User Group Berlin
@RobinSedlaczek
RobinSedlaczek.com
Ressourcen
@RobinSedlaczek
RobinSedlaczek.com
RESSOURCEN
 Microsoft .NET Architecture Guides: https://dotnet.microsoft.com/learn/dotnet/architecture-guides
 Referenz-Implementierungen: https://github.com/dotnet-architecture
 Prinzipien für Microservices: https://samnewman.io/talks/principles-of-microservices/
 Swashbuckle: https://github.com/domaindrivendev/Swashbuckle
 Polly.NET: https://github.com/App-vNext/Polly
 Serverless: https://www.stackery.io/blog/serverless-function-architecture-principles/,
https://azure.microsoft.com/en-us/overview/serverless-computing/
eBooks
.NET-Framework adé! – Und
was ist mit meinem UI?
Robin Sedlaczek | CTO Fairmas GmbH | .NET User Group Berlin
@RobinSedlaczek
RobinSedlaczek.com

.NET Core Architecture (UI)

Hinweis der Redaktion