Design Patterns and TDD : SOLID Approach to Development (Intro)

I am strong believer in TDD as an effective approach to modern software development. For new feature, it is like a dose of clarity for any ambiguity  requirements or assumption that us as developer use to made. It’s critically important for any extension of existing features that make us feel safe with backup of comprehensive tests cases. In a way, it encourages us to make change and provides intuitive approaches to solve and guard the those changes from any defect.

I could spend thousand words to continue on TDD pros and cons but it is not the focus of this article as well as subsequent ones in this series.  So let adjust the the zoom, shall we.

As developer, I believe we are all aware of SOLID practice, design pattern, TDD and so on. It is practical CS knowledge in real world. However, I believe many of us have been struggling in the application of these knowledge. I mean really use it in day to day work and develop a way of thinking. For me, I find coding practices is like martial art practices or any other sport require regular muscle exercise. I must constantly do it on daily basic. The more I do, the more automated behavior I developed, the more automatic thinking in practical way I become, the less I need to think about it. The key point I want to make is that we should make it as part of our habit so that we don’t have to think about it when we perform any coding activity, we just do it naturally.

Having that in mind, I plan to develop a series of Design Patterns and TDD practice that I will cover all 23 design patterns, its implementation and lots of practical example of using in the the real world project both individually and mixtures of a few pattern. It will take a few months for me to finish this off. Looking at the ending encourages me, why? because i believe it will help me and you to be a better developer.

This series code has been published regularly to Github as https://github.com/mikenguyen69/design-pattern-code-sample. Feel free to check it out and modify or contribute our further enhancement on real world application. The initial version is in C# .NET (7.0). Upon finishing, it will be extent to another popular language such as Go or JS.

Following are the list of topic that covers in sub-sequence articles in this series.

Part 1: Creation Design Patterns

  1. Abstract Factory
  2. Builder
  3. Factory Method
  4. Singleton
  5. Prototype

Part 2: Structural Design Patterns

  1. Adapter
  2. Composite
  3. Decorator
  4. Bridge
  5. Facade
  6. Flyweight
  7. Proxy

Part 3.1 Behavior Design Patterns

  1. Command
  2. Strategy
  3. Observer
  4. State
  5. Visitor

Part 3.2 Behavior Design Patterns

  1. Template Method
  2. Chain of Responsibility
  3. Mediator
  4. Iterator
  5. Interpreter
  6. Memento

Stay tune until we meet again 😉