Is there such a thing as having the most prefered design pattern for building applications in TDD or the iterative mode?
I think the question could be rewritten so it makes more sense in these words:
"Which architectural patterns and strategies are useful in order to achieve flexibility when using a Test-Driven and incremental development strategy?"
My answer would be: patterns that help you decouple your clases and components, like:
Inversion of Control and Dependency Injection - Help you keep the dependencies between your classes and components detached from specific implementations that are resolved until runtime (or startup time) allowing both using stubs for not-yet implemented functionality and for unit tests.
Facades - Helps you isolate components providing well defined interfaces for interaction between them, reducing coupling.
Factories and other creational patterns - They give you flexibility in the sections of your code responsible for instantiating objects.
Also remember that one of the mantras of incremental and iterative development is 'Do the simplest thing that could possibly work'. Don't over-engineer.
Does it makes sense according with what you asked?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With