Sorry for reviving this thread, but I've just found out your suggested DDD folder structure and it is pretty interesting!
I was separating application, domain and infrastructure inside my src folder, but your approach is way cleaner.
I just have a simple question, where do you store abstract interfaces? For example, I have a bunch of abstract classes that I use inside all my layers, in which folder would you store those?
Just to be clear, those abstractions are used by basically all my aggregates. For example, I have an "DomainAggregateService" abstract class, which is basically some global methods that every aggregate service has.
I'm thinking to give it a shot to your suggestion, and placing it in something like lib/... or something like that (while my aggregates would be inside src, since I'm using Javascript and it is pretty common to place source code inside src folder)
Abstract classes like AggregateRoot, AggregateRootCollection and interfaces like DomainEvent / Listeners etc are defined in a composer package that is imported in the project.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Sorry for reviving this thread, but I've just found out your suggested DDD folder structure and it is pretty interesting!
I was separating application, domain and infrastructure inside my src folder, but your approach is way cleaner.
I just have a simple question, where do you store abstract interfaces? For example, I have a bunch of abstract classes that I use inside all my layers, in which folder would you store those?
Just to be clear, those abstractions are used by basically all my aggregates. For example, I have an "DomainAggregateService" abstract class, which is basically some global methods that every aggregate service has.
I'm thinking to give it a shot to your suggestion, and placing it in something like
lib/...
or something like that (while my aggregates would be insidesrc
, since I'm using Javascript and it is pretty common to place source code inside src folder)Abstract classes like AggregateRoot, AggregateRootCollection and interfaces like DomainEvent / Listeners etc are defined in a composer package that is imported in the project.