Book Image

An Atypical ASP.NET Core 5 Design Patterns Guide

By : Carl-Hugo Marcotte
Book Image

An Atypical ASP.NET Core 5 Design Patterns Guide

By: Carl-Hugo Marcotte

Overview of this book

Design patterns are a set of solutions to many of the common problems occurring in software development. Knowledge of these design patterns helps developers and professionals to craft software solutions of any scale. ASP.NET Core 5 Design Patterns starts by exploring basic design patterns, architectural principles, dependency injection, and other ASP.NET Core mechanisms. You’ll explore the component scale as you discover patterns oriented toward small chunks of the software, and then move to application-scale patterns and techniques to understand higher-level patterns and how to structure the application as a whole. The book covers a range of significant GoF (Gangs of Four) design patterns such as strategy, singleton, decorator, facade, and composite. The chapters are organized based on scale and topics, allowing you to start small and build on a strong base, the same way that you would develop a program. With the help of use cases, the book will show you how to combine design patterns to display alternate usage and help you feel comfortable working with a variety of design patterns. Finally, you’ll advance to the client side to connect the dots and make ASP.NET Core a viable full-stack alternative. By the end of the book, you’ll be able to mix and match design patterns and have learned how to think about architecture and how it works.
Table of Contents (27 chapters)
1
Section 1: Principles and Methodologies
5
Section 2: Designing for ASP.NET Core
11
Section 3: Designing at Component Scale
15
Section 4: Designing at Application Scale
21
Section 5: Designing the Client Side
25
Acronyms Lexicon

To get the most out of this book

You must know C# and how to program. Boolean logic, loops, and other basic programming constructs should be mastered, including object-oriented programming basics. Some knowledge of ASP.NET will be beneficial. Knowing how to read UML class and sequence diagrams is an asset, but not required.

The code samples and resources are available on GitHub (https://net5.link/code). The README.md file at the root of the repository is filled with information to help you find the code and resources that you are looking for. If you don't find something, look at the README.md file – chances are you will find a pointer to the information that you seek.

Most links are shortened in the form of https://net5.link/**** so readers of a physical copy can easily type URLs quickly.

In the book, I use a mix of Visual Studio 2019 (which has a free version) and Visual Studio Code (free). I recommend that you use one or both of those. The IDE is unrelated to most of the content. You could use Notepad if you are impetuous enough (I don't recommend that). Unless you install Visual Studio, which comes with the .NET SDK, you may need to install the .NET 5 SDK. The SDK comes with the dotnet CLI as well as the building tools for running and testing your programs. I develop on Windows, but you should be able to use another OS. OS-related topics are very limited, even inexistent. The code compiles on both Windows and Linux.

Linux that is supported by .NET 5: https://github.com/dotnet/core/blob/master/release-notes/5.0/5.0-supported-os.md

If you are using the digital version of this book, we advise you to type the code yourself or access the code via the GitHub repository (link available in the next section). Doing so will help you avoid any potential errors related to the copying and pasting of code.