Avoiding Code Anti-Patterns with SOLID
The right design principles can keep your code from quickly going stale. While there are many right ways of writing code, there are anti-patterns and code smells that constitute the wrong way of writing code.
Additionally, the community has identified several principles to keep in mind when building software that can help your code resist accumulating technical debt for as long as possible. In this chapter, we’ll cover a number of these principles, including the famous SOLID acronym, and see how they can help you build software that actively resists the gradual decline toward legacy code.
In this chapter, we’ll cover the following topics:
- Identifying anti-patterns in C# code
- Writing SOLID code
- Considering other architectural principles