Book Image

Hands-On Design Patterns with C# and .NET Core

By : Gaurav Aroraa, Jeffrey Chilberto
Book Image

Hands-On Design Patterns with C# and .NET Core

By: Gaurav Aroraa, Jeffrey Chilberto

Overview of this book

Design patterns are essentially reusable solutions to common programming problems. When used correctly, they meet crucial software requirements with ease and reduce costs. This book will uncover effective ways to use design patterns and demonstrate their implementation with executable code specific to both C# and .NET Core. Hands-On Design Patterns with C# and .NET Core begins with an overview of object-oriented programming (OOP) and SOLID principles. It provides an in-depth explanation of the Gang of Four (GoF) design patterns, including creational, structural, and behavioral. The book then takes you through functional, reactive, and concurrent patterns, helping you write better code with streams, threads, and coroutines. Toward the end of the book, you’ll learn about the latest trends in architecture, exploring design patterns for microservices, serverless, and cloud native applications. You’ll even understand the considerations that need to be taken into account when choosing between different architectures such as microservices and MVC. By the end of the book, you will be able to write efficient and clear code and be comfortable working on scalable and maintainable projects of any size.
Table of Contents (19 chapters)
Free Chapter
1
Section 1: Essentials of Design Patterns in C# and .NET Core
4
Section 2: Deep Dive into Utilities and Patterns in .NET Core
10
Section 3: Functional Programming, Reactive Programming, and Coding for the Cloud

Preface

The purpose of this book is to give readers a broad understanding of patterns in modern software development while diving into more detail with specific examples. The number of patterns used when developing solutions is vast, and often, developers use patterns without knowing they are doing so. This book covers patterns from low-level code, to high-level concepts used in solutions that run in the cloud.

Though many of the patterns presented do not require a specific language, C# and .NET Core will be used to illustrate examples for many of them. C# and .NET Core were chosen due to their popularity and design, which supports building solutions from simple console applications to large-enterprise distributed systems.

Covering a large number of patterns, the book serves as a great introduction to many of them, while allowing a deeper, hands-on approach to a selected collection. The specific patterns covered have been selected as they illustrate a specific point or aspect of patterns. References to additional resources are provided to allow the reader to dive deeper into patterns of particular interest.

From simple websites to large-enterprise distributed systems, the right pattern can make the difference between a successful, long-lived solution and a solution viewed as a failure due to its poor performance and high cost. This book covers many patterns that can be applied to build solutions that handle the inevitable change required to stay competitive in business, as well as achieve the robustness and reliability expected of modern applications.