Download presentation
Presentation is loading. Please wait.
1
Learn. Imagine. Build. .NET Conf
Bringing your WinForms/WPF investments forwards with UWP/.NET Standard 2.0 Chris Barker Daniel Jacobson #dotNETConf #UWP Learn. Imagine. Build. .NET Conf
2
Devices + IoT Mobile PC Xbox Surface Hub HoloLens UNIVERSAL APPS Adaptive User Interface Natural User Inputs One SDK + Tooling One Store + One Dev Center Cloud Services ONE WINDOWS PLATFORM Why UWP? Modern experiences Reach new audiences Increased engagement Improved servicing Modern experiences – Introduce an adaptive UX with natural user inputs such as Touch and Inking. Reach new audiences – Expand your audience by reaching new devices such as Surface Hub and HoloLens. Increase engagement – Engage your users through push notifications, Live Tiles and more Shell integration. Improve servicing – Often overlooked, but see the benefits of packaging your app for ease of deployment and servicing.
3
What are my options? WinForms / WPF Windows 10 APIs Desktop Bridge
Continue development Windows 10 APIs Modern and Engaging Experiences Desktop Bridge Improved Discoverability, Installation and Servicing Universal Windows App Reach New Audiences and Devices Everything we share today is with a view to optimize for leveraging your existing code base. You may have heard of various ways for modernizing your app and reaching new audiences, so let’s break down the options. First of all, your existing app can call into many of the new Windows 10 APIs. Some of the APIs require simply adding references to your existing project – others may require a little more work to add the notion of identity to your project. Secondly, the Desktop Bridge enables you to easily package up your existing Win32 app into an APPX. This brings benefits of calling additional Windows 10 APIs, but you also start to see the benefits of being packaged as a Store app – such as improved discoverability, installation and servicing. The area we will focus on today is creating a new Universal Windows Platform app that leverages portions of your existing WinForm/WPF code through the help of a .NET Standard 2.0 class library. UWP will enable you to realize the previously listed benefits, but also reach new devices and accessories more easily. In other sessions we will talk about Xamarin Forms, which enables you to build out the reach of your app further by targeting additional platforms such as iOS and Android – which can also utilize the benefits of .NET Standard 2.0. Xamarin Forms Reach New Audiences and Platforms
4
AZURE CONTAINER SERVICE
NODE.JS PYTHON HTML/JS .NET C# ASP.NET AZURE WINDOWS VM ANDROID DEVICE AZURE CONTAINER SERVICE WINDOWS DEVICE AZURE AZURE LINUX VM iOS DEVICE AZURE LINUX VM iOS DEVICE AZURE WEB APP XAMARIN STUDIO EMACS VIM VISUAL STUDIO VISUAL STUDIO CODE VISUAL STUDIO .NET AZURE Why .NET? End-to-end solution Maximum productivity Enterprise scale Modern Applications So we’ve spoken about the benefits about UWP, but this is a .NET conference, so why .NET? We believe .NET is a huge differentiation for Enterprise development as it provides an already connected, fully integrated end to end solution. Using Visual Studio, .NET and the Microsoft platform brings the maximum productivity to developers. Everything is meant to just work out of the box. And it comes with integrated DevOps and prescriptive architectures and libraries to create modern applications, all aligned and supported avoiding the wild west of using different misaligned technologies.
5
WEB APPS, CLOUD SERVICES
.NET Standard brings it all together TRADITIONAL WINDOWS WINDOWS 10 WEB APPS, CLOUD SERVICES MOBILE GAMES, VR, AR IoT AI .NET Standard allows sharing code, binaries and skills between .NET client, server and all of its flavors. .NET Standard provides a specification for any platform to implement (conceptually similar to HTML) All .NET runtimes provided by Microsoft are implementing the standard COMPILERS LANGUAGES RUNTIME COMPONENTS LIBRARIES INFRASTRUCTURE .NET STANDARD When we talk about .NET we’re talking about an entire unified platform and ecosystem. With Mono now under the .NET Foundation we can steer the direction of all of these implementations more easily. Each .NET implementation be that .NET Framework, .NET Core, or Mono for Xamarin & Unity, share the same common infrastructure and .NET Standard library. This means not only are your .NET skills portable, but your actual binaries are portable across implementations making it possible for your code to reach an even broader audience.
6
.NET Standard 2.0 interoperability
9/20/ :39 PM .NET Standard 2.0 interoperability MY .NET FRAMEWORK APP MY .NET CORE APP MY XAMARIN APP MY STANDARD LIBRARY We have had binary sharing options in the past in the form of Portable Class Libraries (PCLs). PCLs took an approach of target platform profiles – meaning the more you targeted, the smaller amount of re-use – and it became confusing. .NET Standard supersedes PCLs and you know that the higher the version number, the more APIs you have access to. Your new .NET Standard 2.0 library will be able to access existing .NET Standard 1.x libraries, PCLs and even .NET Framework libraries. EXISTING .NET STANDARD LIBRARY EXISTING PORTABLE CLASS LIBRARY EXISTING .NET FRAMEWORK LIBRARY © 2014 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
7
~70% +20K .NET Standard 2.0 Vastly improved API support
9/20/ :39 PM .NET Standard 2.0 Can reference .NET Framework libraries Compatibility shim allows referencing existing .NET Framework binaries No recompile required – also covers existing NuGet packages Limited to libraries that only use APIs that are available for .NET Standard ~70% of NuGet packages are API compatible Vastly improved API support Extended to cover intersection between .NET Framework and Xamarin Also makes .NET Core 2.0 bigger as it implements .NET Standard 2.0 +20K More APIs than .NET Standard 1.x The majority of Nuget packages today are targeting the .NET Framework – we analyzed these packages as part of designing the list of APIs .NET Standard 2.0 should support. As a result, we are able to support ~70% of existing .NET Framework Nuget packages. To enable the breadth of support across all of the app models, we have vastly increased the number of .NET APIs we support – more than 20K over .NET Standard 1.6. © 2014 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
8
APIs in .NET Standard 2.0 DATA XML SERIALIZATION NETWORKING IO
DataSet • DataTable • SQLClient XML XLinq • XML Document • XPath • Schema • XSL SERIALIZATION BinaryFormatter • Data Contract • XML NETWORKING Sockets • HTTP • Mail • WebSockets IO Files • Compression • MMF Here is a few of some of the API categories we are bringing support for in .NET Standard 2.0. THREADING Threads • Thread Pool • Tasks CORE Primitives • Collections • Reflection • Interop • Linq
9
DEMO - Taking Northwind Universal
Co-evolve Add New Features UWP Creating the App WinForms Prepare for .NET Standard 2.0 Ok, it’s time to get into demos. Today we are going to show a base project that consists of a WinForms app that utilizes a BLL and DAL that connects to a local SQL Server instance. We’re going to show just how easy it is to re-use that BLL/DAL code in a UWP app and how you can evolve the app(s) to use new Windows 10 features.
10
Demo WinForms - Prepare for .NET Standard 2.0
11
.NET Enhancements with UWP
Should we show the section header to transition?
12
.NET Native and UWP No JIT + leaner runtime means lightning fast startup Lower memory usage (~40% lower) Store compilation
13
.NET Native Workflow UWP App Edit-Build-Run loop
Debug | x86 | Local Machine File -> New C#/VB UWP Project UWP App Incremental compilation with .NET Native! Publish to the Store .appxupload Test on all target devices Test Release build / .NET Native
14
IMPORTANT! - .NET Standard 2.0 Requires Windows Fall Creators Update
.NET Delivery with UWP NuGet PackageReference UWP Framework Monikers uap10.0.TargetPlatformMinVersion.0 IMPORTANT! - .NET Standard 2.0 Requires Windows Fall Creators Update
15
Demo UWP – Creating the App
16
Demo Co-evolve – Add New Features
17
Installation and Servicing
ClickOnce .appx Install from web Full file download Intelligent download Auto-updates On app launch In the background Differential updates No Block level updates Automatic dependency management Yes Self-contained per-user app install Administrative permission-free
18
Call to action Port your libraries / nuget packages to .NET Standard 2.0 1 aspnetcore-linux aspnetcore-mvc-linux Modernize and extend your apps through the Universal Windows Platform 2 1 - 2,3 - 4 - Download the sample app from here: aka.ms/DotNetStdSample 3
19
.NET
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.