Consensus between DDD and Enterprise Architecture

In literature (blogs, articles, books on Enterprise Architecture...), it seems there is a real (and exclusive) appliance of SOA in EA. If we consider DDD and SOA share common architecture principles but differ on many others, what is the place for DDD in the EA discipline ? As microservices are getting so much hype, what are the key points to promote DDD to CIO ?



Posted by: =?UTF-8?Q?R=C3=A9nald_VENANT=2DVALERY?= <r.venant.valery <at> gmail.com>


Domain-drive-design vs. Command pattern — mutually exclusive?

I like the Command-pattern's small, focussed classes such as SetProjectAsActiveCommand but I also DDD's approach of making models responsible for their own core business functions, such as calling Project::setAsActive()Can the 2 ideas work together, or are they mutually exclusive architectures?
/ tl;dr

I've been working on a project for the last few months in which we've been using the Command pattern, which has classes like ProposeNewProjectCommandSetProjectAsActiveCommand, and AddCommentToProjectCommand, all of which are handled by a command bus. These classes tend to be fairly small and focussed, doing only one thing.

Recently I've been reading about Domain-Driven-Design (DDD) and I gather that that approach relies more heavily on the Models doing work themselves, so the commands above might be replaced with Organisation::proposeNewProject()Project::setAsActive(), and Project::addComment().

Having these methods on Models means they can act as 'aggregate roots' (eg. in the examples above, Project is responsible for creating its own comments).

Whilst I really like the idea of making my Entities have more responsibility for their core business functions I'm also concerned that my Models could get really, really big with lots of methods on them relating to the various things the application can do.

Is there a way to have the small, focussed classes of the Command pattern whilst still making Models first-class citizens responsible for their key business functionality like in DDD? Or a way to tackle the potential large-model problem?

Or, alternatively, should I just pick one pattern and use it exclusively?

Thanks in advance for any insight you can give,

PS. I've never actually worked on an application which uses DDD, so I apologise if this is an incredibly naïve question.

Posted by: harrisonbro <at> gmail.com


Domain-Driven Design Europe conference in 2016

Hi everybody :-)

I thought you might like to know we're organising a Domain-Driven Design conference in Brussels, Belgium, January 28-29, 2016. 

Eric Evans, the author o f the original DDD book, is our first confirmed speaker. We'll have two days of talks and workshops about modelling, design, analysis, CQRS/ES, architecture, visualization, and more! 

We've currently got an Early Supporter ticket price going, EUR 375 instead of EUR 549, until the end of May. You're not only getting full access to two days of awesome talks and workshops, but you'd also be helping us launch a new conference :-)

Mathi as

ps If you have a user group or meetup, ping us at contact <at>  dddeurope.com to get some swag. 

Posted by: mathias <at> verraes.net


Exceptions in event handlers

How should one handle exceptions in events handlers when doing DDD?

As a very simplistic example I want Aggregate2 to react to events raised byAggregate1. However Aggregate2 may throw an exception during the event processing and the system is now in an invalid state.

I think I read somewhere that a compensating command should be issued; however, doesn't that lead to scattered compensating command all over the code base?

Moreover, Aggregate2 may be in another bounded context and may now it needs to know how to issue a command to another BC to fix its error (which may also fail :D)

Is there a practical way to handle errors in event handlers?

Posted by: songoko20000 <at> yahoo.com


Performance of aggregates in the database

I've managed to finish up benchmark of Revenj framework. It's available at: https://github.com/ngs-doo/dal-benchmark

I think DDD people might find it interesting since it talks to "Relational database" in non-conventional way and proves that DDD can be practiced without friction outside of JSON DB.

It also shows how framework can be faster than manual coding of SQL.

If you have questions or comments, let me know.




Posted by: rikard <at> ngs.hr


From UI to Commands - how?


How do you map UI Changes to commands in your DDD application ?

With a typical web UI having a bunch of input fields the User needs to set, its tempting to just have a CRUD like Update Action on your resource oriented backend endpoint. (Who says it should be resource oriented btw)

http Put myApi/MyResource/resourceId

This would lead to a myAggregateRoot.Update method getting called.

As you may know this looses the intent o the user  and creates an somewhat anemic domain model. We don't capture the behavior which forms our ubiquitous language.

Say the user wants to

1. Add subcontent to MYResource

2. Activate myResource

that would correspond to




I see two ways to accomplish this

UI makes multiple requests

1  http Post myApi/MyResource/resourceId/Content

2  http Post myApi/MyResource/resourceId/Activation

Currently my UI would have multiple tasks/actions on one single page. two requests seems like

doing a chatty implementation. when actions could be batched and send in one request.

Of cause UI could be split up so each page only deals with a single task / action.


put an update as a list of user activities (commands) to

http Put myApi/MyResource/resourceId/


http Post myApi/MyResource/resourceId/changes

the changes could have a json format like




id : 2324234234,

occurred : some date,

name : AddContent

data : {

content goes here




id : 2324234234,

occurred : some date,

name : Activate

data : {}





this could be mapped to commands in the application layer in a generic way.

But it would require the UI guys to work in a different way.

What do you think ?

Cheers  Christian


Posted by: chr.j.johansen <at> gmail.com


Suggestions for "nested" bounded contexts?

Any thoughts on how to deal with bounded contexts that (in a business sense) are nested within each other?  

For example a [Fund] context might have one or more [Brokerage Account] contexts - each of these operate independently but any changes to their valuation also change the valuation of the fund.  

Posted by: Duncan <at> merrioncomputing.com


DDD Introduction Talk


I want to introduce my team to domain driven design and thought it would be a good idea to let some real expert speak to them (via Youtube or the like). Do you know a good introduction talk?


Posted by: christian.helmbold <at> yahoo.de


New DDD group in Atlanta (ATL)

 Hello Everyone,

I am announcing a new group for those who live in Atlanta, GA (USA).

Feel free to join us if you live within reasonable distance from zip code 30305. We will try to meet up once a week. All expenses covered (refreshments, parking, etc.).

Thank you for your support!

If You Refuse To Everything But The Best....
You Very Often Get It.

Posted by: Jose Fernandez <ppcuban <at> yahoo.com>


Same aggregate in 2 bounded contexts

Let's model this scenario: We are trying to connect to different "Suppliers" via FTP. Each Supplier can have 1 or more FTP servers. We are going to download Inventory files from these FTP servers.

I can identify 2 bounded contexts in this domain:
  1. Suppliers Bounded Context where I mange the life cycle of adding or disabling/enabling a supplier.
  2.  Suppliers Communication Bounded Context where  connect and download the inventory files from the ftp servers.
In BC 1, Supplier is an entity with a model that has id, name, description,...etc. I think I'll also add a Supplier Type since we may need to co nnect to other supplier via different protocols other than ftp.

The problem is with BC 2. Is Supplier an entity? 

The FTP info (host, port, user, pass) is stored in BC 2 and I believe it's a value object. However, this value object should be tied to an entity. If I make Supplier an entity I'm guessing the only attribute it will need is the supplier id from BC 1. 

Does that make sense to have the same entity in 2 bounded contexts? Is it normal that the only attribute to be present in entity is the id?

Posted by: songoko20000 <at> yahoo.com


Many rules for reusability and testability

I have problem similar to this where I need to decide how to deal numerous rules.

I own 10 houses. There are 10 renters. At the end of the month, I check whether all the 10 renters have paid their rent. If they have not paid their rent, I have to send an eviction notice. There are many rules to be checked before sending the eviction notice.

1. Have I sent a reminder to the renter to pay the rent before the end of the month?

2. Have I given the renter a grace period of 5 days after the reminder was sent?

3. Whether or not the renter has his furniture in the house? If he does not have, send the eviction notice immediately else send a warning notification with 10 days grace period.

4. Is the renter living in the house for more than 5 years? If so, send a warning notification with a 30 days grace period to pay the rent.

5. ...

I can think of two entities here OWNER and RENTER. I can also think about

Owner owner = new Owner();

Renter renter = new Renter();

if (owner.Evict(renter))


// Let the UI know the renter has been evicted after checking all the rules.




// Let the UI know the renter h as not been evicted because certain rules failed like the renter has not been sent // a reminder.


There can be numerous rules to meet the Evict behavior. They are agile, so it can change during the development. They also need to be tested.

When I looked at some DDD examples, I see that the rules like these are baked into the Evict method. Adding a new rule requires the module that holds he Evict method need to be compiled. I would rather test HasRenterBeenSentAReminder rather than a Evict method.

What pattern I can follow to implement a kind of Business Rules Engine in DDD?


Posted by: varghese.pallathu <at> yahoo.com