Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Modernizing Your Windows Applications with the Windows App SDK and WinUI

You're reading from   Modernizing Your Windows Applications with the Windows App SDK and WinUI Expand your desktop apps to support new features and deliver an integrated Windows 11 experience

Arrow left icon
Product type Paperback
Published in Apr 2022
Publisher Packt
ISBN-13 9781803235660
Length 514 pages
Edition 1st Edition
Languages
Arrow right icon
Authors (2):
Arrow left icon
Marc Plogas Marc Plogas
Author Profile Icon Marc Plogas
Marc Plogas
Matteo Pagani Matteo Pagani
Author Profile Icon Matteo Pagani
Matteo Pagani
Arrow right icon
View More author details
Toc

Table of Contents (19) Chapters Close

Preface 1. Section 1: Basic Concepts
2. Chapter 1: Getting Started with the Windows App SDK and WinUI FREE CHAPTER 3. Section 2: Modernization Journey
4. Chapter 2: The Windows App SDK for a Windows Forms Developer 5. Chapter 3: The Windows App SDK for a WPF Developer 6. Chapter 4: The Windows App SDK for a UWP Developer 7. Chapter 5: Designing Your Application 8. Chapter 6: Building a Future-Proof Architecture 9. Section 3: Integrating Your App with the Windows Ecosystem
10. Chapter 7: Migrating Your Windows Applications to the Windows App SDK and WinUI 11. Chapter 8: Integrating Your Application with the Windows Ecosystem 12. Chapter 9: Implementing Notifications 13. Chapter 10: Infusing Your Apps with Machine Learning Using WinML 14. Section 4: Distributing Your Application
15. Chapter 11: Publishing Your Application 16. Chapter 12: Enabling CI/CD for Your Windows Applications 17. Assessments 18. Other Books You May Enjoy

The role of the new .NET runtime

.NET Framework was introduced by Microsoft in 2002 with the goal to provide a better development experience and an easier learning curve for developers to build applications for Windows. These principles still hold true today, but the development landscape has changed significantly since 2002. New platforms have appeared, and Windows, in the server and cloud space, isn't the leading platform anymore; scenarios such as containers and microservices require a new level of optimization and performance, especially in key areas such as networking or filesystem access. Open source is now the new standard to release and evolve development platforms in collaboration with the community.

In 2014, Microsoft announced the first version of .NET Core, a new development platform based on the same principles of .NET Framework but open source, cross-platform, and lighter. The first versions of .NET Core were focused on key scenarios such as cloud services and web applications. With the release of .NET Core 3.0, Microsoft has started to invest also in the desktop ecosystem, by making Windows Forms and WPF open source and welcoming them into the new runtime.

However, the .NET ecosystem was still fragmented – if web and desktop applications could run on .NET Core, many developers were still using the full .NET Framework to build their solutions; Xamarin (the cross-platform framework to build Android and iOS apps with C#) and Blazor (the new platform to build client-side web applications using C# instead of JavaScript) were still based on Mono, the original open source implementation of .NET Framework. This fragmentation created multiple challenges over time and required the team to create solutions such as Portable Class Libraries and .NET Standard to enable developers to share code and libraries across different projects.

With .NET 5 (released in November 2020), Microsoft started an ambitious project to unify the entire .NET ecosystem. Instead of having multiple implementations of the framework for different workloads, .NET 5 started a unification journey, with the goal of supporting all the platforms and devices on the market with a single runtime and base class library. .NET 6 is going to complete this journey with a future update by abandoning Mono and bringing Xamarin (now known as .NET for Android and .NET for iOS) inside the family.

The new .NET runtime has also introduced a more predictable release plan, which makes it easier for developers to plan the adoption of one version or another:

  1. .NET 5 was released in November 2020.
  2. A new version will be released around the same time frame each year – for example, NET 6 was released in November 2021, and .NET 7 will be released in November 2022.
  3. The releases with an even version number (.NET 6, .NET 8, and so on) are marked Long-Term Support (LTS). These releases will be supported for 3 years, so they're a better fit for projects that need stability.
  4. The releases with an uneven version number (.NET 5, .NET 7, and so on) are supported for 6 months until the release of the next version – for example, .NET 5 will go out of support in May 2022, 6 months after the release of .NET 6. You can check the most up-to-date support policy at https://dotnet.microsoft.com/en-us/platform/support/policy/dotnet-core.

By adopting a more frequent release cycle, the .NET team can be more agile and reduce the chances of introducing breaking changes between one version and the other. Even if you decide to adopt a .NET runtime that is not marked as LTS, in most cases, the transition to the next release will be smooth, with no or very few code changes needed.

Consequently, .NET Framework reached the end of the journey with the release of .NET Framework 4.8. This framework is still popular today, and as such, Microsoft doesn't have any plan of deprecating it. The current .NET Framework support policy is tied to the Windows one, so .NET Framework will continue to be supported for a long time. However, it won't receive any new features or major updates. If you're a developer building Windows apps that are continuously upgraded and evolved, the suggested path forward is to migrate your .NET Framework applications to the new .NET runtime so that you can take advantage of the constant evolution of the platform.

For all these reasons, the new .NET runtime plays a critical role in our journey. Since the Windows App SDK is the future of Windows development, its evolution is deeply connected with the new .NET runtime. For example, the first preview releases of the Windows App SDK were targeting .NET 5, but the platform is now aligned with the most recent .NET 6 release.

Additionally, all the features exposed by the Windows App SDK don't support the old .NET Framework, but they require the new .NET runtime.

You have been reading a chapter from
Modernizing Your Windows Applications with the Windows App SDK and WinUI
Published in: Apr 2022
Publisher: Packt
ISBN-13: 9781803235660
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime