Over the summer, I've been reading a lot about design. Two notable pieces that I read were Test Driven Development: By Example by Kent Beck, and another named Pattern-Oriented Analysis and Design: Composing Patterns to Design Software Systems by Yacoub.
These books take two very different approaches to designing software systems. My impression is that both of these techniques are at opposite ends of the spectrum. I come to this conclusion because:
- In POAD, we design strictly from patterns. In TDD, we refactor to patterns on an as-needed basis.
- In TDD, we keep models light weight. In POAD, we rigorously develop models for different levels of granularity. We use code generation and round tripping to keep the models and code consistent.
- POAD seems more theoretical, and less proven to work. Many software developers practice TDD.
I realize that TDD is well proven to work, though I see a lot of reasoning behind using a pattern-oriented approach to design:
- Patterns offer a higher level of abstraction than classes.
- Patterns allow you to ignore details of higher granularity.
- Trying to understand the system only in terms of code may become more difficult, however POAD provides higher level models that provide traceability. Using these models in conjunction with the code can make the system easier to understand at a faster pace.
So, given this, are these methodologies competing and mutually exclusive? I feel like I prefer POAD, though I certainly see TDD as a valuable design methodology. Is there a preferred approach?