.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.

E6cffbf3b7a5fbfee4707033ef1636f5?s=128

dotnetday

May 28, 2019
Tweet

Transcript

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

    we going to talk about today? .NET
  3. dot.net/customers

  4. DESKTOP WEB CLOUD MOBILE GAMING IoT AI .NET Your platform

    for building anything
  5. Distributed analytics engine for large datasets typically terabytes or petabytes

    Currently available Scala, Java, Python and R and now .NET!
  6. 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
  7. 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
  8. 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.
  9. An open source app platform from Microsoft for building modern

    & performant .NET applications for iOS, Android, macOS, watchOS, tvOS apps
  10. App architecture .NET standard Business logic • Platform APIs •

    User interface .NET C# C# C#
  11. None
  12. DESKTOP WEB CLOUD MOBILE GAMING IoT AI .NET Your platform

    for building anything
  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 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
  15. 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
  16. 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
  17. 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
  18. 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
  19. 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
  20. 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
  21. July 2019 .NET Core 3.0 RC Sept 2019 .NET Core

    3.0
  22. None
  23. 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
  24. 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
  25. 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
  26. dot.net/get-framework

  27. None
  28. None
  29. dot.net/get-core3

  30. Windows desktop apps Artificial intelligence & Machine Learning Full-stack web

    development Big data
  31. 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
  32. 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
  33. None
  34. 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
  35. None
  36. None
  37. None
  38. 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
  39. 2014 Many .NETs .NET FRAMEWORK .NET CORE XAMARIN / MONO

  40. 2014 2016 Many .NETs .NET standard .NET FRAMEWORK .NET CORE

    XAMARIN / MONO
  41. XAMARIN / MONO .NET FRAMEWORK .NET 2014 Next 2016 Many

    .NETs .NET standard .NET .NET CORE .NET STANDARD
  42. None
  43.  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
  44. .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
  45. None
  46. None
  47. None
  48. 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); } }
  49. • 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); } }
  50. 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); } }
  51. 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); } }
  52. 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); } }
  53. 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); } }
  54. 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); } }
  55. None
  56. None
  57. None
  58. None
  59.  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);
  60. 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?
  61. 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; }
  62. 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 });
  63. 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 });
  64. 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;
  65. 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 });
  66. 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... ... }
  67. 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}"); } }
  68. 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}"); } }
  69. docs.microsoft.com/dotnet/csharp devblogs.microsoft.com/dotnet/the-net-language-strategy github.com/dotnet/csharplang

  70. dot.net/ml dot.net/spark dot.net/get-core3

  71. DESKTOP WEB CLOUD MOBILE GAMING IoT AI .NET Your platform

    for building anything
  72. Thank you! Kathleen.dollard@Microsoft.com https://dotnet.microsoft.com https://docs.dotnet.microsoft.com https://www.microsoft.com/en-us/build

  73. None