Chapter 1: Introduction to .NET
The goal behind this book is not to create yet another design pattern book, but instead, it organizes the chapters cohesively based on scale and topics, allowing you to start small with strong bases and build slowly on top, in just the same way that you would build a program.
Instead of writing a guide that covers a few ways of applying a design pattern, we explore the thinking process behind the systems that we are designing from a software engineer's point of view.
This is not a magic recipe book, and from experience, there is no magic recipe when designing software; there is only your logic, knowledge, experience, and analytical skills. From that last sentence, let's define experience according to your past successes and failures. And don't worry, you will fail during your career, but don't get discouraged by it. The faster you fail, the faster you can recover and learn, leading to successful products. Many techniques covered in this book should help you achieve that goal. Everyone has failed and made mistakes; you won't be the first, and you certainly won't be the last.
The high-level plan looks like this:
- We start by exploring basic patterns, architectural principles, and some crucial ASP.NET Core mechanisms.
- Then we move to the component scale, exploring patterns oriented toward small chunks of the software.
- Next, we move to application-scale patterns and techniques, where we explore higher-level patterns and how to structure the application as a whole.
- Afterward, we tackle the client side to connect the dots and make ASP.NET a viable full stack alternative.
Many subjects covered throughout the book could have a book of their own. Once you are done with this book, you should have plenty of ideas about where to continue your journey into software architecture.
Here are a few pointers that I believe are worth naming:
- The chapters are organized to start with small-scale patterns then get to higher-level ones, making the learning curve easier.
- Instead of giving you a recipe, the book focuses on the thinking aspect and shows evolutions of some techniques to help you understand why the evolution happened.
- Many use-cases combine more than one design pattern to illustrate alternate usage, aiming toward the understanding of the patterns and how to use them efficiently, as well as showing that a pattern is not a beast to tame but a tool to use, manipulate, and bend to your will.
- As in real life, no textbook solution can solve all of our problems, and real problems are always more complicated than as they are explained in textbooks. In this book, my goal is to show you how to mix and match patterns and how to think "architecture" instead of how to follow instructions.
The introduction introduces different concepts that we will be exploring throughout the book, including refreshers on a few notions. We are also covering .NET and its tooling, as well as the technical requirements, such as where the source code is located.
The following topics will be covered in this chapter:
- What is a design pattern?
- Anti-patterns and code smells
- Understanding the web – Request/Response
- Getting started with .NET