Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Which Design Pattern is best for Iterative development? [closed]

Is there such a thing as having the most prefered design pattern for building applications in TDD or the iterative mode?

like image 820
user20358 Avatar asked Nov 17 '25 21:11

user20358


1 Answers

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?

like image 133
Sergio Acosta Avatar answered Nov 20 '25 12:11

Sergio Acosta



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!