Book Image

Adopting .NET 5

By : Hammad Arif, Habib Qureshi
Book Image

Adopting .NET 5

By: Hammad Arif, Habib Qureshi

Overview of this book

.NET 5 is the unification of all .NET technologies in a single framework that can run on all platforms and provide a consistent experience to developers, regardless of the device, operating system (OS), or cloud platform they choose. By updating to .NET 5, you can build software that can quickly adapt to the rapidly changing demands of modern consumers and stay up to date on the latest technology trends in .NET. This book provides a comprehensive overview of all the technologies that will form the future landscape of .NET using practical examples based on real-world scenarios, along with best practices to help you migrate from legacy platforms. You’ll start by learning about Microsoft’s vision and rationale for the unification of the platforms. Then, you’ll cover all the new language enhancements in C# 9. As you advance, you’ll find out how you can align yourself with modern technology trends, focusing on everything from microservices to orchestrated containerized deployments. Finally, you’ll learn how to effectively integrate machine learning in .NET code. By the end of this .NET book, you’ll have gained a thorough understanding of the .NET 5 platform, together with a readiness to adapt to future .NET release cycles, and you’ll be able to make architectural decisions about porting legacy systems and code bases to a newer platform.
Table of Contents (13 chapters)
1
Section 1: Features and Capabilities
4
Section 2: Design and Architecture
7
Section 3: Migration
10
Section 4: Bonus

Who this book is for

The book is intended for intermediate and advanced developers with some experience of .NET and C# application development. It is also aimed at solution architects who wish to grasp the differentiating features and the future roadmap of the .NET technology. Knowledge of .NET Core or cloud development is not assumed. No prior machine learning knowledge is required to complete the bonus chapter on ML.NET.

This book discusses various transformation use cases for legacy applications written using Windows Presentation Foundation (WPF), ASP.NET, Entity Framework, and so on. To get the full benefit from this book, an understanding of these common .NET technologies will help and enhance your reading experience and appreciation for the migration scenarios.

What this book covers

Chapter 1, Introducing .NET 5 Features and Capabilities, provides a brief history of .NET technology and how .NET 5 fits into the picture. It covers the main new .NET 5 features and different types of applications that can be built using this platform. This chapter compares .NET 5 with its predecessors, which are .NET Framework and .NET Core. It discusses the merits of each of these frameworks and then provides comprehensive coverage of the performance enhancements in the .NET 5 platform.

Chapter 2, What's New in C# 9?, covers all the new C# language features, including those that have been improved from the recent C# 7 and C# 8 versions, such as pattern matching and text processing. Code-based examples have been provided for all the discussed features.

Chapter 3, Design and Architectural Patterns, discusses application design strategies using design patterns such as SOLID, messaging protocols, and architectural patterns such as microservices, serverless, and distributed processing.

Chapter 4, Containerized Microservices Architecture, is full of practical exercises to build microservices-based containerized applications on .NET 5 using technologies such as gRPC, Tye, WSL 2, and Kubernetes.

Chapter 5, Upgrading Existing .NET Apps to .NET 5, discusses migration approaches to transform .NET Framework applications to the.NET 5 platform. It provides a sample application migration exercise that upgrades a .NET Framework 4.7 application with WPF, Entity Framework, ASP.NET, and third-party libraries such as AutoFac to its .NET 5 equivalents.

Chapter 6, Upgrading On-Premises Applications to the Cloud with .NET 5, introduces the reader to the cloud services such as Azure SQL Database, Azure Web Apps, Azure Functions, and Azure Container Instances. It provides a practical example to transform an on-premises application and deploy it to the aforementioned cloud services.

Chapter 7, Integrating Machine Learning in .NET 5 Code, is written for .NET developers who wish to integrate machine learning services into their .NET apps. The chapter covers the ML.NET library along with ML.NET Model Builder and provides an exercise to build an Azure function that integrates with ML.NET.