login about faq

Hi,

I am unfamiliar with many software development philosophies/approaches such as these:

  1. DDD - Domain Driven Development
  2. TDD - Test Driven Development
  3. BDD - Behavior Driven Development
  4. Other 3-letter acronym that ends with "development"
  5. and many more

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".

asked Mar 14 '11 at 14:56

Panoy's gravatar image

Panoy
1018

edited Mar 14 '11 at 15:09


-1

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

link

answered Mar 31 '11 at 07:31

ultrajohn's gravatar image

ultrajohn
292

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.

link

answered Mar 15 '11 at 11:31

Alistair%20A.%20Israel's gravatar image

Alistair A. Israel
3.1k210

edited Mar 15 '11 at 11:33

1

Ship even buggy? That phrase seems to be lacking something sir, a verb or adjective maybe?

Thank you anyway!

(Mar 15 '11 at 16:44) Panoy Panoy's gravatar image

Sir, do you believe that most software, especially the enterprise ones are mostly developed with DDD in mind?

BTW, aside from looking for resources in the web about learning the above philosophies, do have any good book recommendations that I might consider reading?

(Mar 16 '11 at 15:44) Panoy Panoy's gravatar image
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or __italic__
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×20
×4

Asked: Mar 14 '11 at 14:56

Seen: 1,161 times

Last updated: Mar 31 '11 at 07:31