Demystifying .NET Standard and .NET Core Presented by Steve Ives Demystifying .NET Standard and .NET Core • Wait, Isn’T .NET Just … .NET?

Demystifying .NET Standard and .NET Core Presented by Steve Ives Demystifying .NET Standard and .NET Core • Wait, Isn’T .NET Just … .NET?

Demystifying .NET Standard and .NET Core Presented by Steve Ives Demystifying .NET Standard and .NET Core • Wait, isn’t .NET just … .NET? • .NET Framework • Websites, services, desktop apps, and more on Windows • Xamarin / Mono • A .NET implementation for running apps on all the major mobile operating systems • .NET Core • A cross-platform .NET implementation for websites, servers, and console apps on Windows, Linux, and macOS • .NET Standard • A base set of APIs that are common to all .NET implementations .NET Framework • In the beginning (well, since 2000) there was the .NET Framework • Extensive, powerful, and flexible • Windows only • Bloated and slow compared to present day .NET alternatives • Still a GREAT solution for many workloads • Existing applications already in production • Technologies not available in .NET Core • WinForms, WPF, WWF, etc. • 3rd party libraries/packages not in .NET Core .NET Spreads Its Wings • Mono (since 2001) • Cross-platform .NET CLR, Framework, and C# compiler • Open source; led by Ximian, Novell, (Attachmate), Xamarin, and now Microsoft and the .NET Foundation • Most Linux platforms, BSD, macOS, Solaris, and Windows • Xamarin (since 2011) • Continue Mono development (post Attachmate) and add commercial products / tooling • Android, iOS, watchOS, macOS • Xamarin Studio (Visual Studio for Mac) • Purchased by Microsoft in 2016 Portable Class Libraries • PCLs emerged as new platforms began Windows iOS Android to adopt .NET App App App • Windows Phone • Linux (Mono) Portable Class Library • Android, iOS, macOS (Xamarin) (Common Code) • Develop & deploy code in a library that works on multiple platforms • Each platform has different capabilities • Lowest common denominator • Selecting more platforms resulted in fewer available APIs .NET Core • General-purpose development platform maintained by Microsoft and the .NET community on GitHub • Open source • Cross-platform, supporting Windows, Linux, and macOS • Can be used in device, service, cloud, and embedded/IoT scenarios • Performance & scalability • Cost savings; less hardware / VMs required • Especially useful for micro services & containers • Significantly smaller footprint and higher performance than .NET Framework .NET Core Characteristics • Cross-platform • Command-line tools • Runs on Windows, Linux, and macOS • All product scenarios can be • Can be ported to other OSs exercised at the command line • Supported OSs, CPUs, & application scenarios will grow over time, from • Compatible with .NET Framework, • Microsoft Xamarin, and Mono • Other organizations • Individuals • Via the .NET Standard • Flexible deployment • Open source • Deployed with your app • MIT and Apache 2 licenses • Or installed side by side • A .NET Foundation project • User or machine scope • Can be used in Docker containers • Supported by Microsoft Included with .NET Core … Not Much! • Minimal framework libraries • .NET Core runtime • Primitive types, such as bool and int • Type system • Collections such as Generic List and • Assembly loading Generic Dictionary • Garbage collector • Utility types, such as HttpClient & • Native interop FileStream • Other basic services • Data types such as DataSet and DbSet • App host program • dotnet.exe • SDK tools and language compilers • Launches .NET Core apps • Roslyn (C# and Visual Basic) • Selects and hosts the runtime • F# • Provides assembly loading • Launches the app • Also launches SDK tools Where’s All the Cool Stuff? • Beyond the very basics, everything is an add-on • NuGet packages • Really cool • You only reference what you need • Everything is open source (GitHub) • Less resources used (except disk) • Lighter and faster • Really frustrating • Knowing what’s out there • Constantly moving target • No central point for documentation .NET Core Workloads • Out of the box .NET Core includes a single application model • Console apps • Command line tools • Hosting local services • Other Frameworks built on top of .NET Core • ASP.NET Core • Windows 10 UWP • Xamarin.Forms (when targeting UWP) • EF Core .NET Core Version History • Things are moving FAST! • .NET Core 1.0 • June 27, 2016 • .NET Core 1.1 • November 16, 2016 • .NET Core 2.0 • August 14, 2017 • .NET Core 2.1 • May 30, 2018 • Point releases (2.1.1, 2.1.2, etc.) every 1 to 2 months .NET Core 2.1 Platform & Chip Support Platforms Chips • Windows Client: 7, 8.1, 10 (1607+) • X64 Windows • Windows Server: 2008 R2 SP1+ • • Linux • macOS: 10.12+ • macOS • RHEL: 6+ • X86 • Fedora: 26+ • Windows • Ubuntu: 14.04+ • ARM32 • Linux (Ubuntu 18.04+, Debian 9+) • Debian: 8+ • SLES: 12+ • openSUSE: 42.3+ • Synergy support is currently Windows only (more later) • Alpine: 3.7+ Developing with .NET Core • IDEs • Visual Studio • 15.8 or later for Synergy .NET Core • Avoid 15.8.2, it was REALLY BAD! • Visual Studio Code • Windows, Linux, and MacOS • Visual Studio for Mac • Formerly Xamarin Studio • Languages • C# • Visual Basic • F# • Synergy .NET • Everything can be done at the command line! Deploying .NET Core Apps • .NET Core Framework can be deployed • Bundled with an app (default) • Per user install • Machine install • App distribution created using dotnet publish • Exports app binaries and content files • Dependencies (assemblies from NuGet packages) • .NET Core assemblies and runtime • Zip and deploy to target systems • Or build an installer as for any other app • InstallShield, WiX, etc. Hosting .NET Core Apps • Console app • Command line utilities • Self-hosted services (development, or run as scheduled task) • Windows service • Permanent production services • IIS hosting • Web sites or services • Install .NET Core Hosting Bundle • Configure application pool for “No managed code” • Azure AppService • Specify license server via SYNERGYLICENSESERVER=name_or_ip • Docker container • Supported by .NET Core, but currently untested with Synergy • Specify license server as above Current “Flavors” of .NET • Three flavors of .NET .NET Framework .NET Core Xamarin (Mono) • Each has its own BCL • Developers must know about and deal with differences and compatibility issues .NET Standard • A set of APIs that ALL .NET implementations must adhere to • A contract that any new .NET implementations must implement • Advantages • Simplified development • Improved code reuse • Better portability • Easier management, etc. • .NET Standard class libraries will work across all .NET platforms .NET Standard Versioning Rules Additive • .NET Standard versions are logically concentric circles • Higher versions incorporate all APIs from previous versions • No breaking changes allowed between versions Immutable • Once shipped, .NET Standard versions are frozen New APIs • First available in a specific implementation (e.g., .NET Core) • .NET Standard review board decides whether new API should become part of .NET Standard in a later version .NET Standard vs. Portable Class Libraries • .NET Standard supersedes PCL • Improves on the PCL experience by curating a standard BCL • Establishes greater uniformity across .NET implementations .NET Standard Versions • The higher the version, the more APIs are available • The lower the version, the more platforms implement it Synergy Support for .NET Standard • Initial support & project template in 10.3.3e • Class Library (.NET Standard) • Official support in 10.3.3f • Supported anywhere that Synergy PCLs are supported • Use .NET Standard over PCL if possible • Less platform conditionals • More future-proof • Better performance Synergy Support for .NET Core • Initial support & project templates in 10.3.3e • Class Library (.NET Core) • Console App (.NET Core) • Official support in 10.3.3f • Deployment currently supported on Windows. • Linux support possible, but not currently planned • Participate and vote on the Ideas forum • “Support Synergy .NET Core code on Linux” (9/25/2018) • Recommendation • If you’re Windows only and can leverage .NET Core for better performance, do it! Synergy Licensing with .NET Standard & .NET Core • .NET Standard produces class libraries • Runs in the context of .NET Framework or .NET Core • .NET Core Licensing • If Synergy is installed • License server configured during installation • If Synergy is not installed • Environment variable SYNERGYLICENSESERVER=dns_name_or_ip • Makes it possible to host Synergy .NET code in “real” cloud services like Azure App Service Choosing the Right Solution .NET Core .NET Standard • Command line utilities • Class libraries to be shared across • E.g., CodeGen different applications • Long-running processes running as console apps or services • Web applications • Web services • E.g., Harmony Core services .NET Core 3 Roadmap .NET Core 2.2 (Q4 2018) • Main focus is development tooling improvements .NET Core 3.0 (2019) • Adding Desktop, IoT, and AI workloads • WinForms & WPF apps (on Windows) • XAML Islands (host UWP in WinForms & WPF apps) • XAML Controls (UWP browser & media controls for WinForms & WPF) • Utility available to prepare for migration • Analyze current app binaries • Report APIs supported and unsupported in .NET Core • .NET Core App Builder utility • Bundle app and .NET core as a single self-contained .exe • Precompiled, fast startup • Access to all Windows 10 APIs For Additional Information .NET Documentation https://docs.microsoft.com/en-us/dotnet/welcome .NET Blog https://blogs.msdn.microsoft.com/dotnet Demystifying .NET Standard and .NET Core Who has the first question?.

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    27 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us