I am unfamiliar with many software development philosophies/approaches such as these:
My question is, when will you get to decide to choose what kind of philosophy/approach to follow? Particularly the top 3 approach in the list: What is TDD for? Why use DDD for this problem?
Mainly your answer would be a case-to-case basis or maybe that there is no single universal philosophy/approach to consider.
In that case, could you just tell me what type of project/scenario and why did you use that philosophy/approach.
This question is marked "community wiki".
Test Driven Development is probably the easiest to explain among the three, because it's the most popular/well-known. TDD really took off along with the Extreme Programming or Agile movement.
Basically, the philosophy of that methodology is to write your code test first. While the most immediately apparent value of this is having automated unit tests and code coverage from day one, the most value TDD provides is really in helping clarify the design or initial coding process, and better code coherence and reduced coupling overall. This becomes a natural effect of TDD because it's hard, if not impossible, to write tests when your code is very 'brittle' or has lots of hard dependencies, or if your code does too many things at once.
TDD is great for writing highly focused, low-level code such as APIs/libraries or functional modules. However, it requires a significant level of discipline/effort as well as technical ability to do properly—most code is not designed/written well enough to be easy to test.
Behavior Driven Development is basically an extension or enhancement of TDD and integrates other stakeholders, such as the business users and QA participants. It does this by elevating the focus from rather low-level code and test code, to higher-level specifications of behavior and expectations.
The tools that enable BDD basically allow specifications to be written by non-technical users in a natural language, or in the language of the domain, and these specifications are then transformed into automated unit tests and executed.
BDD thus provides the same value that TDD does, with the added advantage that it includes non-technical stakeholders and communicates in the language of the domain. Which brings us to:
Domain Driven Development in my mind, is basically just a formalization of a decades-old practice: that of developing a complex application by evolving it closely around the business or domain model.
Most software is designed and developed 'bottom up' or 'top down'. By bottom up, we start with the lowest level units (for example, tables and columns, functional utilities) and build the application up. Top down design/development can start with specifications of large functional units ('modules' or 'components') and attempts to derive lower-level units from there. Others practice 'outside-in' design/development where they start with modeling the UI and then going progressively 'deeper' into the application.
DDD, by contrast, starts with the core business or domain model and logic. For example, in a simple banking system, the core domain model may revolve around accounts and account holders. Other 'objects' in the domain might represent services, such as printing services (statements of account) or batch services (end of month calculations). All these are all modeled, designed and specified before any functional/behavioral specifications, unit tests or code.
The process lends itself well to developing large, complex systems as loosely-coupled services (service-oriented architecture) and information silos, but its benefits can be felt even in smaller, more focused programs.
Because DDD is more of a philosophy or set of practices rather than methodology, there's no real tooling or automation for it. Rather, by putting the domain first, then deriving the technical or architectural structure from that, DDD helps ensure that overall development is better aligned and more responsive to the business requirements.
If you ask me, don't get so caught up with the methodology. To me, there's really only one methodology/philosophy that ultimately makes sense:
He who ships, wins.
well whatever is required by your company. what ever is the nature of the application you are developing.
is it a simple web application. is it security-centric? is it mission, safety-critical like aviation control systems missile command system? it really depends.
in all of this so called 'approaches', i think the trade off would always be between time, money, and quality.
am rumbling, ain't i? ehehe
answered Mar 31 '11 at 07:31