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?

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
If this question can be reworded to fit the rules in the help center, please edit the question.

7 Answers
7

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.

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 BoumaMay 8 '09 at 19:18

4

+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♦Oct 10 '09 at 17:56

3

Well, Wikipedia is defining DDD in a fairly code-centric way, or at least emphasizing the use of certain DDD-specific code design patterns...
–
alchemicalDec 2 '09 at 23:35

11

@LuftMensch: yeh well your mistake there is thinking that Wikipedia is a definitive resource
–
cottsakDec 7 '09 at 6:51

3

It's one of the largest collaborative compendiums around, anyone can edit it...if it's there it at least means that's how most / lots of people are understanding something...in reality most people don't see DDD as simple understanding the business--that's something we've always needed to do. In practice, it would seem to be that + exchanging DataTables for custom storage objects for everything...and repositories & factories to manage and create those objects...then you have often many, many of these objects flying around-hence best to apply these patterns only where they're really useful.
–
alchemicalDec 16 '09 at 0:38

Sorry but if DDD were only a way of thinking as Frans Bouma says, then it would not recommend such things as Persistence Ignorance. This is dismissing others as somewhat underclass developers.

PI, for which DDD has at least a bias, is an architectural choice. It is not a way of thinking anymore ; it is already something being served to you, with most of the time too vague warnings to be of any use: "not suited for everything".

But deciding to go the PI way or not is a challenge in itself, and you can't call names someone ("a coder") if he feels uneasy about this.

Take an ERP package with all-over the place a MS Access-like interface: grids with running totals, auto-updating columns and pageless scrolling on a 100 000 records. Clearly a DDD approach is suited for thinking of how to go about this app. But in years I have never seen anyone - neither in books nor online, going though evidence backed explanations, let alone real life code examples, of how PI could deal with this ubiquitous situation for anyone wanting to deliver commercial grade apps and user experiences.

Don't want to get religious on this. DDD and DAL proponents tend to be overly religious and may drive away those who have been bitten once but who are/were open-minded. Many just want to confront real-life experiences (i.e. THINK), and not get served with just Cats, Cars, and basic Order/OrdersItems (i.e. poor CODE) to support the preaching.

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.

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.

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.

DDD is a gimmick, it does not bring ANY new ideas to the table, it's just pure old OOP/OOD with a bias for latest developments in coding practices. "First talk to the domain experts, identify key abstractions" is the first thing you'd read in any 30-year-old book on OOP. "Encapsulate functionality inside domain classes except for when it doesn't make sense"... Duh!
–
rustyxAug 15 '14 at 8:32