My Story & Features from .NET Core 3.0

My Story & Features from .NET Core 3.0

How I’ve met .NET Core and a little story about my drama with the framework. This talk will reveal some of my projects and experience with .NET Core and what we can learn from them. We will take a look of some interesting features from .NET Core 3.0 and in the end why I love this framework and the way Microsoft is going.

Dfccee30e1e9615539372a759222c40e?s=128

Vladimir Georgiev

January 17, 2019
Tweet

Transcript

  1. vladimirgeorgiev.com Vladimir Georgiev Software Development Lead @ Concep vladimirgeorgiev.com My

    Story & Features from .NET Core 3.0
  2. vladimirgeorgiev.com Благодарим за подкрепата! vladimirgeorgiev.com

  3. vladimirgeorgiev.com vladimirgeorgiev.com

  4. vladimirgeorgiev.com vladimirgeorgiev.com

  5. vladimirgeorgiev.com vladimirgeorgiev.com

  6. vladimirgeorgiev.com vladimirgeorgiev.com

  7. vladimirgeorgiev.com Plugin architecture with Asp.Net Core vladimirgeorgiev.com

  8. vladimirgeorgiev.com Web App eCommerce Adapter Abstract App Plugin App 1

  9. vladimirgeorgiev.com Web App eCommerce Adapter Abstract App Plugin App 2

    Plugin App 1 Plugin App 4 Plugin App 3 Assembly AppDomain Caching PluginManager TypeFinder
  10. vladimirgeorgiev.com What I learn? Rewriting is not always fun Rewriting

    takes time Don’t rewrite if you aren’t into the code Don’t rewrite apps without business value
  11. vladimirgeorgiev.com SSO with IdentityServer & Asp.Net Core vladimirgeorgiev.com

  12. vladimirgeorgiev.com Deployment App Customer App Customer App Customer App Customer

    App Web API External Systems vladimirgeorgiev.com Basic Auth Basic Auth Basic Auth
  13. vladimirgeorgiev.com Auth Server Deployment App Customer App Customer App Customer

    App Customer App Web API External Systems vladimirgeorgiev.com
  14. vladimirgeorgiev.com What I have learned? Understand business Be patient But

    I want new technologies… Business will ask for it
  15. vladimirgeorgiev.com ASP.NET Core 3.0 Features

  16. vladimirgeorgiev.com Applications now have executables by default

  17. vladimirgeorgiev.com Framework Dependent Self-Contained

  18. vladimirgeorgiev.com dotnet build now copies dependencies

  19. vladimirgeorgiev.com Json.NET

  20. vladimirgeorgiev.com Json.NET

  21. vladimirgeorgiev.com Fast in-box JSON Reader Utf8JsonReader

  22. vladimirgeorgiev.com Utf8JsonReader DEMO

  23. vladimirgeorgiev.com Assembly Metadata Reading MetadataLoadContext in .NET Core 3.0 Same

    as ReflectionOnlyLoad from .NET Framework Reading assembly metadata without affecting the caller’s application domain Available in System.Reflection.MetadataLoadContext Loaded into the reflection-only context
  24. vladimirgeorgiev.com Assembly Metadata Reading var paths = new string[] {

    @"C:\myapp\app.dll" }; var resolver = new PathAssemblyResolver(paths); using (var lc = new MetadataLoadContext(resolver)) { Assembly a = lc.LoadFromAssemblyName("app"); Type myInterface = a.GetType("App.IReconnectApplication"); foreach (Type t in a.GetTypes()) { if (t.IsClass && myInterface.IsAssignableFrom(t)) Console.WriteLine($"Class {t.FullName}"); } }
  25. vladimirgeorgiev.com Assembly Metadata Reading var paths = new string[] {

    @"C:\myapp\app.dll" }; var resolver = new PathAssemblyResolver(paths); using (var lc = new MetadataLoadContext(resolver)) { Assembly a = lc.LoadFromAssemblyName("app"); Type myInterface = a.GetType("App.IReconnectApplication"); foreach (Type t in a.GetTypes()) { if (t.IsClass && myInterface.IsAssignableFrom(t)) Console.WriteLine($"Class {t.FullName}"); } }
  26. vladimirgeorgiev.com Assembly Metadata Reading var paths = new string[] {

    @"C:\myapp\app.dll" }; var resolver = new PathAssemblyResolver(paths); using (var lc = new MetadataLoadContext(resolver)) { Assembly a = lc.LoadFromAssemblyName("app"); Type myInterface = a.GetType("App.IReconnectApplication"); foreach (Type t in a.GetTypes()) { if (t.IsClass && myInterface.IsAssignableFrom(t)) Console.WriteLine($"Class {t.FullName}"); } }
  27. vladimirgeorgiev.com Assembly Metadata Reading var paths = new string[] {

    @"C:\myapp\app.dll" }; var resolver = new PathAssemblyResolver(paths); using (var lc = new MetadataLoadContext(resolver)) { Assembly a = lc.LoadFromAssemblyName("app"); Type myInterface = a.GetType("App.IReconnectApplication"); foreach (Type t in a.GetTypes()) { if (t.IsClass && myInterface.IsAssignableFrom(t)) Console.WriteLine($"Class {t.FullName}"); } }
  28. vladimirgeorgiev.com Assembly Metadata Reading var paths = new string[] {

    @"C:\myapp\app.dll" }; var resolver = new PathAssemblyResolver(paths); using (var lc = new MetadataLoadContext(resolver)) { Assembly a = lc.LoadFromAssemblyName("app"); Type myInterface = a.GetType("App.IReconnectApplication"); foreach (Type t in a.GetTypes()) { if (t.IsClass && myInterface.IsAssignableFrom(t)) Console.WriteLine($"Class {t.FullName}"); } }
  29. vladimirgeorgiev.com Tiered Compilation – How JIT works? App Start JIT

    App Start JIT Fast Application Loading Low application performance Slow application loading High application performance
  30. vladimirgeorgiev.com Tiered Compilation – How Tiered uses JIT? App Start

    JIT JIT Fast application loading High application performance
  31. vladimirgeorgiev.com Tiered Compilation Add MSBuild property to the default property

    group in project file: Add in configProperties to the runtimeconfig.json: <TieredCompilation>true</TieredCompilation> "System.Runtime.TieredCompilation": true
  32. vladimirgeorgiev.com More and more… Cryptography AES-GCM AES-CCM Import/Export of asymmetric

    public and private keys from standard formats No more need of X.509 certificate IoT Serial Port APIs support on Linux GPIO, PWM, SPI and I2C APIs TLS 1.3 and OpenSSL 1.1.1 on Linux And many more…
  33. vladimirgeorgiev.com The Future of .NET Core High performance High quality

    High developer productivity Multi-platform support Multi-language support Easy deployment Minimize chance of errors
  34. vladimirgeorgiev.com Vladimir Georgiev vladimirgeorgiev.com ?