A book written and illustrated by Bruce M. Van Horn II, CSM
This is not your classic book with an academic treatment, instead the book will explore real-world applications of design patterns in C# which will be useful in your everyday work. The book will allow software developers to recognize & deliver solutions to the common challenges faced time and again during software design in C# across all industries.
Visit the companion website for this book at https://csharppatterns.dev.
As a software developer, it is of key importance to learn new languages and at the same time be familiar with the programming paradigms and methods of leveraging patterns as both - a communications tool and as an advantage when designing well-written, easy to maintain codes. Being a collection of best practices, design patterns provide the necessary wisdom to solve common sets of challenges in object-oriented design and programming. C# developers will be able to put their knowledge to work with this practical guide to design patterns. The book takes a hands-on approach to introducing patterns & anti-patterns. Furthermore, it elaborates 14 patterns along with their real-world implementations. The book will allow developers to know the implementation of each pattern and how to successfully implement those patterns in their C# code within the context of a real-world project. By the end of this book, developers will be able to recognize situations where they are tempted to reinvent the wheel, and quickly avoid the time and cost associated with solving problems that are common, well understood, with battle-tested, and proven design patterns.
- Learn what patterns are, and how to conceive and document them
- Explore common patterns that might come up in my everyday work
- Recognize common anti-patterns early in the process
- Use creational patterns to create flexible and robust object structures
- Enhance class designs with structural patterns
- Simplify object interaction and behaviour with behavioural patterns
This book is for new and mid-level software developers who are looking to take their object-oriented programs or software designing skills to the next level by learning to leverage common patterns. Readers are expected to have a firm grasp of programm
Throughout this book, I assume you know how to create new C# projects in your favorite integrated development environment (IDE), so I won’t spend any time on the mechanics of setting up and running projects.
Should you decide to try any of this out, you’ll need the following:
- A computer running the Windows operating system. I’m using Windows 10. Since the projects are simple command-line projects, I’m pretty sure everything here would also work on a Mac or Linux, but I haven’t tested the projects on those operating systems.
- A supported IDE such as Visual Studio, JetBrains Rider, or Visual Studio Code with C# extensions. I’m using Rider 2021.3.3.
- Some version of the .NET SDK. Again, the projects are simple enough that our code shouldn’t be reliant on any particular version, though some of the syntactic sugar used in the sample code is relatively new. I recommend using the .NET Core 6 SDK.