Upgrade to Pro — share decks privately, control downloads, hide ads and more …

.NET Day 19 - Welcome to the new world of .NET Development by Kathleen Dollard

.NET Day 19 - Welcome to the new world of .NET Development by Kathleen Dollard

While the big story has been .NET Core 3.0 embracing Windows desktop development, upcoming releases from Microsoft have features that improve almost every type of development. Just a few of the huge number of features: .NET Core provides smaller executables via a linker, Visual Studio automates formatting rules, C# lets you avoid null reference exceptions, ASP.NET incorporates Blazor via Razor Components and the .NET ecosystem is expanding with .NET Tools. Kathleen brings together a set of demos across the spectrum of .NET to show how the next chapter of .NET can make your development easier and your applications better.

dotnetday

May 28, 2019
Tweet

More Decks by dotnetday

Other Decks in Technology

Transcript

  1. .NET story Demo: C# and Visual Studio C# What are

    we going to talk about today? .NET
  2. Distributed analytics engine for large datasets typically terabytes or petabytes

    Currently available Scala, Java, Python and R and now .NET!
  3. Total execution time (seconds) for all 22 queries in the

    TPC-H benchmark (lower is better). Data sourced from an internal run of the TPC-H benchmark, using warm execution on Ubuntu 16.04. .NET for Apache Spark is designed for high performance and performs better than python on the TPC-H benchmark tpc.org/tpch. The TPC-H benchmark consists of a suite of business- oriented queries. Learn more: dot.net/spark 406 433 375 .NET PYTHON SCALA
  4. Custom ML made easy with AutoML Model Builder (a simple

    UI tool) and CLI make it super easy to build custom ML Models. Built for .NET developers Create custom ML models using C# or F# without having to leave the .NET ecosystem. Extended with TensorFlow & more Leverage other popular ML frameworks (TensorFlow, ONNX, Infer.NET, and more). Trusted & proven at scale Use the same ML framework which powers Microsoft Office, Windows and Azure dot.net/ml ML.NET 1.0 An open source and cross-platform machine learning framework
  5. dot.net/ml Product recommendation Recommend products based on purchase history using

    a matrix factorization algorithm. Sentiment analysis Analyze the sentiment of customer reviews using a binary classification algorithm. Price prediction Predict taxi fares based on distance traveled etc. using a regression algorithm. Customer segmentation Identify groups of customers with similar profiles using a clustering algorithm. Spam detection Flag text messages as spam using a binary classification algorithm. Image classification Classify images (e.g. broccoli vs pizza) using a TensorFlow deep learning algorithm. Sales forecasting Forecast future sales for products using a regression algorithm. GitHub labeler Suggest the GitHub label for new issues using a multi-class classification algorithm. Fraud detection Detect fraudulent credit card transactions using a binary classification algorithm.
  6. An open source app platform from Microsoft for building modern

    & performant .NET applications for iOS, Android, macOS, watchOS, tvOS apps
  7. Finding Your Service Boundaries - A Practical Guide ! Adam

    Ralph .NET Core 3 – The Windows Desktop Is Back! ! Thomas Claudius Huber Advanced Azure Functions - Beyond Http Get /Helloworld ! Christian Weyer Abusing the C# Compiler ! Filip Wojcieszyn Software Architecture in the Agile World ! Urs Enzler TypeScript - The Unsung Hero of Modern Web Development ! Jonathan Ziller Docker + Azure DevOps + Kubernetes = ♥ ! Marc Müller Git for Fun - Getting Productive with Git ! Michael Kaufmann Knock. Knock. Who's There? A Message from the Future ! Daniel Marbach Progressive Web Apps for .NET Developers: An Overview ! Christian Liebel Extend Your O365 With Azure Functions and Graph API ! Christian Waha Duel of the Giants - Entity Framework vs. Entity Framework Core ! Christian Giesswein The Ethical Implications and Risks Of AI and Deep Learning ! Laurent Bugnion Designing a UI For Microservices ! Mauro Servienti Real Time Analytics in IoT ! Marcel Lattmann Go Pro on .NET with F# ! Isaac Abraham Keynote: Enterprise Transformation (And You Can Too) ! Donovan Brown
  8. Finding Your Service Boundaries - A Practical Guide ! Adam

    Ralph .NET Core 3 – The Windows Desktop Is Back! ! Thomas Claudius Huber Advanced Azure Functions - Beyond Http Get /Helloworld ! Christian Weyer Abusing the C# Compiler ! Filip Wojcieszyn Software Architecture in the Agile World ! Urs Enzler TypeScript - The Unsung Hero of Modern Web Development ! Jonathan Ziller Docker + Azure DevOps + Kubernetes = ♥ ! Marc Müller Git for Fun - Getting Productive with Git ! Michael Kaufmann Knock. Knock. Who's There? A Message from the Future ! Daniel Marbach Progressive Web Apps for .NET Developers: An Overview ! Christian Liebel Extend Your O365 With Azure Functions and Graph API ! Christian Waha Duel of the Giants - Entity Framework vs. Entity Framework Core ! Christian Giesswein The Ethical Implications and Risks Of AI and Deep Learning ! Laurent Bugnion Designing a UI For Microservices ! Mauro Servienti Real Time Analytics in IoT ! Marcel Lattmann Go Pro on .NET with F# ! Isaac Abraham Keynote: Enterprise Transformation (And You Can Too) ! Donovan Brown
  9. Finding Your Service Boundaries - A Practical Guide ! Adam

    Ralph .NET Core 3 – The Windows Desktop Is Back! ! Thomas Claudius Huber Advanced Azure Functions - Beyond Http Get /Helloworld ! Christian Weyer Abusing the C# Compiler ! Filip Wojcieszyn Software Architecture in the Agile World ! Urs Enzler TypeScript - The Unsung Hero of Modern Web Development ! Jonathan Ziller Docker + Azure DevOps + Kubernetes = ♥ ! Marc Müller Git for Fun - Getting Productive with Git ! Michael Kaufmann Knock. Knock. Who's There? A Message from the Future ! Daniel Marbach Progressive Web Apps for .NET Developers: An Overview ! Christian Liebel Extend Your O365 With Azure Functions and Graph API ! Christian Waha Duel of the Giants - Entity Framework vs. Entity Framework Core ! Christian Giesswein The Ethical Implications and Risks Of AI and Deep Learning ! Laurent Bugnion Designing a UI For Microservices ! Mauro Servienti Real Time Analytics in IoT ! Marcel Lattmann Go Pro on .NET with F# ! Isaac Abraham Keynote: Enterprise Transformation (And You Can Too) ! Donovan Brown
  10. Finding Your Service Boundaries - A Practical Guide ! Adam

    Ralph .NET Core 3 – The Windows Desktop Is Back! ! Thomas Claudius Huber Advanced Azure Functions - Beyond Http Get /Helloworld ! Christian Weyer Abusing the C# Compiler ! Filip Wojcieszyn Software Architecture in the Agile World ! Urs Enzler TypeScript - The Unsung Hero of Modern Web Development ! Jonathan Ziller Docker + Azure DevOps + Kubernetes = ♥ ! Marc Müller Git for Fun - Getting Productive with Git ! Michael Kaufmann Knock. Knock. Who's There? A Message from the Future ! Daniel Marbach Progressive Web Apps for .NET Developers: An Overview ! Christian Liebel Extend Your O365 With Azure Functions and Graph API ! Christian Waha Duel of the Giants - Entity Framework vs. Entity Framework Core ! Christian Giesswein The Ethical Implications and Risks Of AI and Deep Learning ! Laurent Bugnion Designing a UI For Microservices ! Mauro Servienti Real Time Analytics in IoT ! Marcel Lattmann Go Pro on .NET with F# ! Isaac Abraham Keynote: Enterprise Transformation (And You Can Too) ! Donovan Brown
  11. Finding Your Service Boundaries - A Practical Guide ! Adam

    Ralph .NET Core 3 – The Windows Desktop Is Back! ! Thomas Claudius Huber Advanced Azure Functions - Beyond Http Get /Helloworld ! Christian Weyer Abusing the C# Compiler ! Filip Wojcieszyn Software Architecture in the Agile World ! Urs Enzler TypeScript - The Unsung Hero of Modern Web Development ! Jonathan Ziller Docker + Azure DevOps + Kubernetes = ♥ ! Marc Müller Git for Fun - Getting Productive with Git ! Michael Kaufmann Knock. Knock. Who's There? A Message from the Future ! Daniel Marbach Progressive Web Apps for .NET Developers: An Overview ! Christian Liebel Extend Your O365 With Azure Functions and Graph API ! Christian Waha Duel of the Giants - Entity Framework vs. Entity Framework Core ! Christian Giesswein The Ethical Implications and Risks Of AI and Deep Learning ! Laurent Bugnion Designing a UI For Microservices ! Mauro Servienti Real Time Analytics in IoT ! Marcel Lattmann Go Pro on .NET with F# ! Isaac Abraham Keynote: Enterprise Transformation (And You Can Too) ! Donovan Brown
  12. Finding Your Service Boundaries - A Practical Guide ! Adam

    Ralph .NET Core 3 – The Windows Desktop Is Back! ! Thomas Claudius Huber Advanced Azure Functions - Beyond Http Get /Helloworld ! Christian Weyer Abusing the C# Compiler ! Filip Wojcieszyn Software Architecture in the Agile World ! Urs Enzler TypeScript - The Unsung Hero of Modern Web Development ! Jonathan Ziller Docker + Azure DevOps + Kubernetes = ♥ ! Marc Müller Git for Fun - Getting Productive with Git ! Michael Kaufmann Knock. Knock. Who's There? A Message from the Future ! Daniel Marbach Progressive Web Apps for .NET Developers: An Overview ! Christian Liebel Extend Your O365 With Azure Functions and Graph API ! Christian Waha Duel of the Giants - Entity Framework vs. Entity Framework Core ! Christian Giesswein The Ethical Implications and Risks Of AI and Deep Learning ! Laurent Bugnion Designing a UI For Microservices ! Mauro Servienti Real Time Analytics in IoT ! Marcel Lattmann Go Pro on .NET with F# ! Isaac Abraham Keynote: Enterprise Transformation (And You Can Too) ! Donovan Brown
  13. Finding Your Service Boundaries - A Practical Guide ! Adam

    Ralph .NET Core 3 – The Windows Desktop Is Back! ! Thomas Claudius Huber Advanced Azure Functions - Beyond Http Get /Helloworld ! Christian Weyer Abusing the C# Compiler ! Filip Wojcieszyn Software Architecture in the Agile World ! Urs Enzler TypeScript - The Unsung Hero of Modern Web Development ! Jonathan Ziller Docker + Azure DevOps + Kubernetes = ♥ ! Marc Müller Git for Fun - Getting Productive with Git ! Michael Kaufmann Knock. Knock. Who's There? A Message from the Future ! Daniel Marbach Progressive Web Apps for .NET Developers: An Overview ! Christian Liebel Extend Your O365 With Azure Functions and Graph API ! Christian Waha Duel of the Giants - Entity Framework vs. Entity Framework Core ! Christian Giesswein The Ethical Implications and Risks Of AI and Deep Learning ! Laurent Bugnion Designing a UI For Microservices ! Mauro Servienti Real Time Analytics in IoT ! Marcel Lattmann Go Pro on .NET with F# ! Isaac Abraham Keynote: Enterprise Transformation (And You Can Too) ! Donovan Brown
  14. Finding Your Service Boundaries - A Practical Guide ! Adam

    Ralph .NET Core 3 – The Windows Desktop Is Back! ! Thomas Claudius Huber Azure IoT ! Mark Allibone Abusing the C# Compiler ! Filip Wojcieszyn Software Architecture in the Agile World ! Urs Enzler TypeScript - The Unsung Hero of Modern Web Development ! Jonathan Ziller Docker + Azure DevOps + Kubernetes = ♥ ! Marc Müller Git for Fun - Getting Productive with Git ! Michael Kaufmann Knock. Knock. Who's There? A Message from the Future ! Daniel Marbach Progressive Web Apps for .NET Developers: An Overview ! Christian Liebel Extend Your O365 With Azure Functions and Graph API ! Christian Waha Duel of the Giants - Entity Framework vs. Entity Framework Core ! Christian Giesswein The Ethical Implications and Risks Of AI and Deep Learning ! Laurent Bugnion Designing a UI For Microservices ! Mauro Servienti Real Time Analytics in IoT ! Marcel Lattmann Go Pro on .NET with F# ! Isaac Abraham Keynote: Enterprise Transformation (And You Can Too) ! Donovan Brown
  15. July 2019 .NET Core 3.0 RC Sept 2019 .NET Core

    3.0 Nov 2019 .NET Core 3.1 LTS Nov 2020 .NET 5.0 Nov 2021 .NET 6.0 LTS Nov 2022 .NET 7.0 Nov 2023 .NET 8.0 LTS
  16. July 2019 .NET Core 3.0 RC Sept 2019 .NET Core

    3.0 Nov 2019 .NET Core 3.1 LTS Nov 2020 .NET 5.0 Nov 2021 .NET 6.0 LTS Nov 2022 .NET 7.0 Nov 2023 .NET 8.0 LTS
  17. July 2019 .NET Core 3.0 RC Sept 2019 .NET Core

    3.0 Nov 2019 .NET Core 3.1 LTS Nov 2020 .NET 5.0 Nov 2021 .NET 6.0 LTS Nov 2022 .NET 7.0 Nov 2023 .NET 8.0 LTS .NET Core 2.1 .NET Core 3.1 .NET Core 6.0 https://dotnet.microsoft.com/platform/support/policy/dotnet-core
  18. gRPC High performance contract-based RPC services with .NET Works across

    many languages and and platforms Worker service Starting point for long running back processes like Windows Server or Linux daemon Producing or consuming messages from a message queue Web API’s + identity Add security and authentication to Web API’s
  19. Full stack web development with C# You don’t need to

    know AngularJS, React, Vue, etc. Take advantage of stability and consistency of .NET Runs in all browsers Strongly typed on the client and server Share C# code with the client and server Web assembly (optional and in preview) Native performance Requires no plugin or code transpilation
  20. Hughbe MaherJendoubi zacpwhite 0 50 100 150 200 250 300

    0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 Weeks since open sourcing Community PRs CoreCLR CoreFX WinForms WPF 0 50 100 150 200 250 300 350 400 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 Weeks since open sourcing Community issues CoreCLR CoreFX WPF WinForms
  21. July 2019 .NET Core 3.0 RC Sept 2019 .NET Core

    3.0 Nov 2019 .NET Core 3.1 LTS Nov 2020 .NET 5.0 Nov 2021 .NET 6.0 LTS Nov 2022 .NET 7.0 Nov 2023 .NET 8.0 LTS
  22. XAMARIN / MONO .NET FRAMEWORK .NET 2014 Next 2016 Many

    .NETs .NET standard .NET .NET CORE .NET STANDARD
  23.  Web forms, WCF server and Windows workflow remain on

    .NET Framework 4.8 only. There are no plans to port these.  Recommendations  ASP.NET Blazor for ASP.NET Web forms (we will provide a migration guide)  gRPC for WCF server and remoting (we will provide a migration guide)  Open source core workflow for Windows workflow (WF): https://github.com/UiPath/corewf
  24. .NET 5 INFRASTRUCTURE .NET STANDARD .NET—A unified platform DESKTOP WEB

    CLOUD MOBILE GAMING IoT AI WPF Windows forms UWP ASP.NET Xamarin Unity Azure ARM32 ARM64 ML.NET .NET for Apache Spark
  25. static async Task Main(string[] args) { IAsyncEnumerable<Customer?> customers = GetCustomersAsync(args[2..]);

    await foreach (Customer? customer in customers) { string? name = customer switch { null => null, (null, string ln) => $"Ms/Mr {ln}", (string fn, string ln) => $"{fn[0]}. {ln}", }; if (name != null) Console.WriteLine(name); } }
  26. • Ranges static async Task Main(string[] args) { IAsyncEnumerable<Customer?> customers

    = GetCustomersAsync(args[2..]); await foreach (Customer? customer in customers) { string? name = customer switch { null => null, (null, string ln) => $"Ms/Mr {ln}", (string fn, string ln) => $"{fn[0]}. {ln}", }; if (name != null) Console.WriteLine(name); } }
  27. static async Task Main(string[] args) { IAsyncEnumerable<Customer?> customers = GetCustomersAsync(args[2..]);

    await foreach (Customer? customer in customers) { string? name = customer switch { null => null, (null, string ln) => $"Ms/Mr {ln}", (string fn, string ln) => $"{fn[0]}. {ln}", }; if (name != null) Console.WriteLine(name); } }
  28. static async Task Main(string[] args) { IAsyncEnumerable<Customer?> customers = GetCustomersAsync(args[2..]);

    await foreach (Customer? customer in customers) { string? name = customer switch { null => null, (null, string ln) => $"Ms/Mr {ln}", (string fn, string ln) => $"{fn[0]}. {ln}", }; if (name != null) Console.WriteLine(name); } }
  29. static async Task Main(string[] args) { IAsyncEnumerable<Customer?> customers = GetCustomersAsync(args[2..]);

    await foreach (Customer? customer in customers) { string? name = customer switch { null => null, (null, string ln) => $"Ms/Mr {ln}", (string fn, string ln) => $"{fn[0]}. {ln}", }; if (name != null) Console.WriteLine(name); } }
  30. static async Task Main(string[] args) { IAsyncEnumerable<Customer?> customers = GetCustomersAsync(args[2..]);

    await foreach (Customer? customer in customers) { string? name = customer switch { null => null, (null, string ln) => $"Ms/Mr {ln}", (string fn, string ln) => $"{fn[0]}. {ln}", }; if (name != null) Console.WriteLine(name); } }
  31. static async Task Main(string[] args) { IAsyncEnumerable<Customer?> customers = GetCustomersAsync(args[2..]);

    await foreach (Customer? customer in customers) { string? name = customer switch { null => null, (null, string ln) => $"Ms/Mr {ln}", (string fn, string ln) => $"{fn[0]}. {ln}", }; if (name != null) Console.WriteLine(name); } }
  32.  class Person : IEquatable<Person>  {  public string

    First { get; }  public string Last { get; }  public Person(string First, string Last) => (this.First, this.Last) = (First, Last);  public void Deconstruct(out string First, out string Last) => (First, Last) = (this.First, this.Last);  public bool Equals(Person other) => other != null && First == other.First && Last == other.Last;  public override bool Equals(object obj) => obj is Person other ? Equals(other) : false;  public override int GetHashCode() => GreatHashFunction(First, Last);  …  } record Person(string First, string Last);
  33. record Person(string First, string Last); record Person { string First,

    string Last } var p1 = new Person { First = "Scott", Last = "Hunter" }; var p2 = p1 with { Last = "Hanselman" }; // Inheritance? // Discriminated unions?
  34. public static T AddAll<T>(T[] ts) where T : ??? {

    T result = T.Zero; foreach (T t in ts) { if (!t.IsZero) result += t; } return result; }
  35. public static T AddAll<T>(T[] ts) where T : IMonoid<T> {

    T result = T.Zero; foreach (T t in ts) { if (!t.IsZero) result += t; } return result; } interface IMonoid<T> { static T operator +(T t1, T t2); static T Zero { get; } bool IsZero { get; } } struct Int32 : …, IMonoid<Int32> { … public static int Zero => 0; public bool IsZero => this == 0; } int sixtyThree = AddAll(new [] { 1, 2, 4, 8, 16, 32 });
  36. public static T AddAll<T>(T[] ts) where T : IMonoid<T> {

    T result = T.Zero; foreach (T t in ts) { if (!t.IsZero) result += t; } return result; } interface IMonoid<T> { static T operator +(T t1, T t2); static T Zero { get; } bool IsZero { get; } } struct Int32 : …, IMonoid<Int32> { … public static int Zero => 0; public bool IsZero => this == 0; } int sixtyThree = AddAll(new [] { 1, 2, 4, 8, 16, 32 });
  37. public static T AddAll<T>(T[] ts) where T : IMonoid<T> {

    T result = T.Zero; foreach (T t in ts) { if (!t.IsZero) result += t; } return result; } interface IMonoid<T> { static T operator +(T t1, T t2); static T Zero { get; } bool IsZero { get; } } extension IntMonoid of int { public static int Zero => 0; public bool IsZero => this == 0; } int zero = int.Zero; bool is0 = zero.IsZero;
  38. public static T AddAll<T>(T[] ts) where T : IMonoid<T> {

    T result = T.Zero; foreach (T t in ts) { if (!t.IsZero) result += t; } return result; } interface IMonoid<T> { static T operator +(T t1, T t2); static T Zero { get; } bool IsZero { get; } } extension IntMonoid of int : IMonoid<int> { public static int Zero => 0; public bool IsZero => this == 0; } int sixtyThree = AddAll(new [] { 1, 2, 4, 8, 16, 32 });
  39. public class DataObject { public DataObject this[string index] { get;

    } // throw if not found public string AsString(); // throw if the DataObject does not represent a string public IEnumerable<DataObject> AsEnumerable(); // throw if not... ... }
  40. public role Order of DataObject { public Customer Customer =>

    this["Customer"]; public string Description => this["Description"].AsString(); } public role Customer of DataObject { public string Name => this["Name"].AsString(); public string Address => this["Address"].AsString(); public IEnumerable<Order> Orders => this["Orders"].AsEnumerable(); } IEnumerable<Customer> customers = CommerceFramework.LoadCustomers(); foreach (Customer customer in customers) { WriteLine($"{customer.Name}:"); foreach (Order order in customer.Orders) { WriteLine($" {order.Description}"); } }
  41. public role Order of DataObject { public Customer Customer =>

    this["Customer"]; public string Description => this["Description"].AsString(); } public role Customer of DataObject : IPerson { public string Name => this["Name"].AsString(); public string Address => this["Address"].AsString(); public IEnumerable<Order> Orders => this["Orders"].AsEnumerable(); } IEnumerable<Customer> customers = CommerceFramework.LoadCustomers(); foreach (Customer customer in customers) { WriteLine($"{customer.Name}:"); foreach (Order order in customer.Orders) { WriteLine($" {order.Description}"); } }