Is there such a thing as having the most prefered design pattern for building applications in TDD or the iterative mode?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
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?