9/12/2018 10:05 PM BRK3318 Slides are at: http://aka.ms/taylorb/slides Modernizing your .NET Enterprise without a rewrite: WinForms, WCF and SQL to cloud and .NET Core Adam Braden – adambr@microsoft.com Scott.Hunter@microsoft.com (@coolcsh) Taylor.Brown @microsoft.com (@taylorb_msft) © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
Where do developers spend time… Microsoft Build 2017 9/12/2018 10:05 PM Where do developers spend time… Debugging existing applications “Fixing” existing applications Adding “features” to existing applications Fixing the feature someone else added Building a new application (maybe… if there’s time) © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
Where do application admin’s spend time… Microsoft Build 2017 9/12/2018 10:05 PM Where do application admin’s spend time… Maintaining existing applications Re-deploying existing applications Diagnosing issues with existing applications Troubleshooting issues from feature additions Deploying a new application (maybe… if there’s time) © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
Making old new… We can’t throw out every old app. Microsoft Build 2017 9/12/2018 10:05 PM Making old new… We can’t throw out every old app. We can’t stop adding features. We can’t stop maintaining old apps. We can make it easier… We can use new tools/code with existing apps… © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
From legacy to cloud-ready to microservices Existing Application Convert to container Modern Methodologies Integrate with DevOps and Agile programming Move to cloud or refresh HW Modern Infrastructure Modern Microservices Add new services or start peeling off services from monolith code base
Typical three tier app… 9/12/2018 10:05 PM Typical three tier app… Front End Middle Tier Back End Winforms/WPF WCF SQL © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
Front End Packaging Front End Middle Tier Back End Packaged 9/12/2018 10:05 PM Front End Packaging Front End Middle Tier Back End Winforms/WPF WCF SQL Packaged Winforms/WPF © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
Middle Tier Containerized 9/12/2018 10:05 PM Middle Tier Containerized Front End Middle Tier Back End Winforms/WPF WCF SQL Packaged Winforms/WPF WCF © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
Middle Tier Updates… Front End Middle Tier Back End Packaged 9/12/2018 10:05 PM Middle Tier Updates… Front End Middle Tier Back End Winforms/WPF WCF SQL Packaged Winforms/WPF WCF .Net Core © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
Backend modernized Front End Middle Tier Back End Packaged 9/12/2018 10:05 PM Backend modernized Front End Middle Tier Back End Winforms/WPF WCF SQL Packaged Winforms/WPF WCF SQL .Net Core © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
The end product… Front End Middle Tier Back End Packaged Winforms/WPF 9/12/2018 10:05 PM The end product… Front End Middle Tier Back End Winforms/WPF WCF SQL Packaged Winforms/WPF WCF SQL .Net Core © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
Modernize the Frontend 9/12/2018 10:05 PM Modernize the Frontend © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
Windows Forms & High DPI 9/12/2018 10:05 PM Windows Forms & High DPI Adam Braden © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
Looking Good on High DPI Devices Improved experience with .NET Framework 4.7 E.g. DataGridView, MonthCalendar & CheckedListbox Target .NET 4.7+ DPIAwareness setting in App.config Developer Support for High DPI scenarios DPIChanged(), DPIChangedBeforeParent(), DPIChangedAfterParent() events Helper methods to for conversion and scaling LogicalToDeviceUnits ScaleBitmapLogicalToDevice DeviceDpi
UWP Deployment for Win32 & .NET Apps via Desktop Bridge 9/12/2018 10:05 PM UWP Deployment for Win32 & .NET Apps via Desktop Bridge © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
Desktop Bridge - “Containers for the Frontend” 9/12/2018 10:05 PM Desktop Bridge - “Containers for the Frontend” Simple, Trusted, Clean Install/Uninstall Deployment Virtual File System & Registry (VFS & VReg) OS/Shell Extensions declared in Manifest (ie: file type associations) App has Identity with the System OS manages the app Call UWP APIs No Sandbox/Security Boundary – call all the APIs you want! Limitations No drivers, services, auto-elevate, install folder is read-only © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
Desktop Bridge - Conversion 9/12/2018 10:05 PM Desktop Bridge - Conversion Convert to Universal Windows App Package (*.appx) Desktop App Converter (DAC) Install from the Store Windows App Packaging Project (*.wapproj) VS2017 Update 4 Preview 3rd party tool support AdvancedInstaller, FireGiant (WIX), InstallShield, InstallAware, RAD Studio © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
Modernizing the Middle Tier 9/12/2018 10:05 PM Modernizing the Middle Tier © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
.NET Architecture Available now at: https://dot.net/architecture 9/12/2018 10:05 PM .NET Architecture Available now at: https://dot.net/architecture Microservices and Docker Containers Modernizing Existing .NET Applications Deploying to the Cloud with Azure Web Applications with ASP.NET Mobile Applications with Xamarin Desktop Applications with UWP © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
Monolithic Architecture Cloud DevOps ready Get more Cloud benefit by Containerizing your app with Windows Server Docker Containers and deploying them to Azure cloud Lift & Shift .NET Web apps (Cloud) Pros No re-architect or new code Increased density & lower deployment cost Improved productivity and DevOps agility Portability of apps and dependencies High availability and Orchestration with ACS/K8 and Service Fabric Existing Apps .NET Web apps (on-prem.) On-Premises Relational Database Using: Servers or VMs on-premises SQL Server, Oracle, MySQL, etc. Monolithic Architecture
TechReady 23 9/12/2018 10:05 PM Docker Containers Docker helps automating the deployment of applications as portable, self-sufficient containers that can run on any cloud or on-premises. No more: “It works in my dev machine!... Why not in production?” Now it is: “If it works in Docker, it works in production” Keywords about WHY Docker? Dependencies (self-sufficient) Deployment © 2016 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
Container Enable Existing Apps 9/12/2018 10:05 PM Container Enable Existing Apps Right-Click on Project | Add | Docker Support Now you can develop in same container as production Deployment Azure App Service – Right Click | Publish Azure Virtual Machines - https://tinyurl.com/azurevms Azure Container Service - https://tinyurl.com/acskub © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
ASP.NET Core Web API’s 9/12/2018 10:05 PM © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
Adding Rest Based API’s for all Clients 9/12/2018 10:05 PM Adding Rest Based API’s for all Clients Create ASP.NET Core 2.0 Web API Add SwashBuckle.AspNetCore Configure: https://github.com/domaindrivendev/Swashbuckle.AspNetCore Download Swagger.json Right Click | Add | Rest API Sharelibrary to Web, WinForm, WPF, UWP, Xamarin © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
Modernize the Backend 9/12/2018 10:05 PM © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
Modernize the backend SQL Existing Data New Data Keep it in SQL 9/12/2018 10:05 PM Modernize the backend Existing Data Keep it in SQL Make SQL easier to manage Make the data accessible New Data Use the best tool for the job Let the service own it’s data SQL © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
Image2Docker SQL 9/12/2018 10:05 PM mdf ldf © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
Image2Docker ConvertTo-Dockerfile ` -RemotePath \\192.168.1.5\c$ ` 9/12/2018 10:05 PM Image2Docker ConvertTo-Dockerfile ` -RemotePath \\192.168.1.5\c$ ` -OutputPath c:\newDockerFile ` -Artifact SQL SQL mdf ldf © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
Image2Docker ConvertTo-Dockerfile ` -RemotePath \\192.168.1.5\c$ ` 9/12/2018 10:05 PM Image2Docker ConvertTo-Dockerfile ` -RemotePath \\192.168.1.5\c$ ` -OutputPath c:\newDockerFile ` -Artifact SQL SQL mdf ldf dockerfile mdf ldf © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
Image2Docker ConvertTo-Dockerfile ` -RemotePath \\192.168.1.5\c$ ` 9/12/2018 10:05 PM Image2Docker ConvertTo-Dockerfile ` -RemotePath \\192.168.1.5\c$ ` -OutputPath c:\newDockerFile ` -Artifact SQL SQL mdf ldf dockerfile mdf ldf container © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
Image2Docker Open source PowerShell module 9/12/2018 10:05 PM Image2Docker Open source PowerShell module WIM, VHD, VHDx or Live Servers Roles and Features along with installed programs Internet Information Services (IIS) - HTTP Handlers in IIS configuration - IIS Websites and filesystem paths - ASP.NET web applications Microsoft SQL Server Instances Apache Web Server https://www.powershellgallery.com/packages/Image2Docker/ https://github.com/docker/communitytools-image2docker-win Get It © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
Migrate to the cloud SQL Azure (let us update/manage/support)… 9/12/2018 10:05 PM Migrate to the cloud SQL Azure (let us update/manage/support)… https://docs.microsoft.com/en-us/azure/sql-database/sql-database-cloud-migrate VM in Azure (high computability, portability) SQL in another cloud VM in another cloud SQL © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
9/12/2018 10:05 PM Summary Font End: High DPI support: https://docs.microsoft.com/en-us/dotnet/framework/winforms/high-dpi-support-in-windows-forms Desktop Bridge: http://aka.ms/desktopbridge Windows Application Packaging Project VS2017 Update 4 Preview 1+ Middle Tier Backend Image2Docker https://www.powershellgallery.com/packages/Image2Docker/ https://github.com/docker/communitytools-image2docker-win SQL Migration https://docs.microsoft.com/en-us/azure/sql-database/sql-database-cloud-migrate © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
Related Talks Session Title Speakers BRK2067 9/12/2018 10:05 PM Related Talks Session Title Speakers BRK2067 The core value of Windows 10 apps in the enterprise Andrew Clinck & Kyle Marsh BRK3077 Next gen packaging and deployment of Windows apps in the enterprise John Vintzel & Andy Liu BRK2068 Get more from your existing enterprise apps on Windows 10 with efficient deployment and DevOps Vladimir Postel, Arian Ghotbi BRK2069 Build powerful new applications for the enterprise onWindows 10 with the Universal Windows Platform Stefan Wick & Ginny Caughey © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
Useful Links Swashbuckle https://github.com/domaindrivendev/Swashbuckle.AspNetCore Swagger Codegen https://github.com/swagger-api/swagger-codegen
Please evaluate this session Tech Ready 15 9/12/2018 Please evaluate this session From your Please expand notes window at bottom of slide and read. Then Delete this text box. PC or tablet: visit MyIgnite https://myignite.microsoft.com/evaluations Phone: download and use the Microsoft Ignite mobile app https://aka.ms/ignite.mobileapp Your input is important! © 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
9/12/2018 10:05 PM © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.