views:

1269

answers:

6

Googling "What kind of applications is DDD suitable for?" gave me the following answer:

Probably 95% of all software applications fall into the “not so good for using DDD” categories. (see the article)

So what is all the fuss about?!?

The application I am working on is mainly data-centric but still contains some business logic and rules to be applied. Would it be waste of time to start applying DDD techniques? Am I better off using a more conventional Data Access Layer, a model of POCOs and a Business Logic Layer? Or to state it differently - what is a sound alternative to DDD?

+1  A: 

you know, sometimes the 5% makes more money than all the other 95% - that's why DDD exists.

it's for specific complex large system.

Francis
What's the alternative?
JacobE
Not always... A "money" domain is a relatively small system that benefits from DDD, and is often used to demonstrate the concept of DDD in the small.
JasonTrue
+5  A: 

Here is a very similar question: http://stackoverflow.com/questions/796656/do-you-allow-the-web-tier-to-access-the-dal-directly/796961#796961

I use DDD for all my projects. On the smaller applications some of the concepts don't apply, but I find many of the aspects are applicable on all projects regardless of size.

Chuck Conway
agreed- smaller projects may not need every thing - in fact some smaller project may need different things left out than others.
Preet Sangha
well, the size of mu project is quite big... do you think DD would do more harm than help when it is data centric?
JacobE
+4  A: 

DDD is about software that will be maintained for a while. To me this means that it needs to express ideas that will change with the domain. Sure a simple app may be perfect for a short delivery time and short implementation time. However if you need to grow the software then DDD principles will help immensely. DDD may be hard up front but once you get the idea of the ubiquitous language and the separation concerns then things do start to become easy.

Preet Sangha
+36  A: 

Many developers who think DDD is useful for their project fall into the trap that they think what their job is all about is writing code. This isn't the case. A developer's job is about realizing functionality so a problem can be solved through software. This results in the conclusion that writing code isn't the beginning of what a developer is doing, but the end: the code is the result of the whole process BEFORE the code is actually written.

DDD isn't about writing code, it's not a turn-key 10-step process to get great software, it's about that whole process BEFORE the code is written, it's about getting insight in what the problem is all about, what/who participates in which information streams and what do these elements look like, how do they relate to eachother etc. etc. In fact, the most important part of DDD is creating a language which makes conversations between domain experts and developers possible without misinterpretations. This is the 'Ubiquitous Language' Evans talks about. It in effect makes the whole process BEFORE the code is written a process which leaves little to be guessed, things are clear and straight forward. (that's the goal).

The problem with 'how does DDD work in practise' and 'could anyone give me an example of how I write code with DDD?' and the like is really coming from the fact that the people asking these kind of questions focus on writing code, but have no idea WHY they're writing THAT code and not other code. I.o.w.: if you realize that DDD about discovering WHAT you've to write as functionality and WHY, things fall into place. HOW you're writing that code, that's up to you. But as said: that's not the biggest problem anymore, as you by then already know what you've to write and why.

Frans Bouma
So in summary... DDD is a philosophical position??? A state of nirvana??? A religious following??? The Emperor's New Clothes???
GuyIncognito
It's a way of THINKING, not a way of writing code. The thinking about domains drives your design, which results in code which could be anything. Some people make the mistake to think in code and forget about the thinking, the domain oriented design.
Frans Bouma
+1 excellent description of DDD's benefits. I think it can be summed up as "creating a language which makes conversations between domain experts and developers possible without misinterpretations."
Robert Harvey
Well, Wikipedia is defining DDD in a fairly code-centric way, or at least emphasizing the use of certain DDD-specific code design patterns...
alchemical
@LuftMensch: yeh well your mistake there is thinking that Wikipedia is a definitive resource
cottsak
alchemical
+3  A: 

If you read the article a little more, you see this:

For the 5% of applications where DDD is a good fit, it is a very good fit. For those situations, DDD will help you crack a very tough nut. Here, DDD may be the silver bullet for that werewolf that your manager just pointed to your desk.

That's why the fuss about it.

Mnementh
you'll also see this: "just don’t expect miracles, and beware of over complicating your code for the sake of it – sometimes simpler really is better."
alchemical
@Luft Mensch => "Simple is better than complex. Complex is better than complicated. | @fedecarg"
Arnis L.
+1  A: 
  • As your app is mainly data-centric, perhaps your architecture could be mainly conventional.

  • For the aspects where you have more logic and potential domain or value objects, perhaps you could leverage some of the DDD ideas to organize the code.

  • In general, the "sound alternative" is to keep things as simple as possible, use the DDD concepts where useful, and don't unnecessarily complicate things, as the article advises.

I'm starting a similar project now, it is a mix of data manipulation and more logic/algorithm driven areas. I'd similarly like to take the parts of DDD that will benefit the project, but not try to force it on areas where it may be counter-productive.

alchemical