Hi,
In this video Greg Young seems to say it's not worth using DDD on a internet site (around 13min30)
At work we are building a Single-Page-Application with ReactJS + mobile apps that rely on a backend API.
Can it be considered as an "internet site" like Greg Young mention?
Our business is not that complex, there's no "domain experts" as we are kind of all developers in the company for now.
I don't think we don't have multiple contexts in which the same word may have different meanings.
We really want to explore CQRS / event-sourcing as we need:
- a full audit trail for UX but also for future analytics
- 100% offline capabilities (it's easier to sync with clients with an event log).
- to iterate fast on UX screens without impacting the whole system and with better performances that we have now
Some things I really like about DDD:
- The model has no dependency, it is easy to test it's behavior
- The transaction boundaries of Aggregate Roots that seems to prevent concurrency issues
I'm not at all an expert in DDD. I don't know if DDD is suitable for an application with a simple (for now at least) domain.
Yet with this simple domain, I struggle how to design the aggregate roots so that a transaction can be managed by a single Aggregate Root (or I end up with a big fat single AggregateRoot)
My domain is very similar to a set of unix file systems with users:
- A filesystem is a tree of nodes of type folders and files
- Each user owns 1-* file systems
- Each user can give access to his file systems to other users at any node level so that all the subtree of this node is available for read/write/manage
- The permissions given to an user on a given node can be overrriden but any child node's permission
- Move of files inside a filesystem is allowed if you can write on both the moved node and the target node
- Move of files from one filesystem to another is possible if you are admin on both the move node and the target node
Obviously it's not that simple but here are the core requirements of our domain.
Do you see any aggregate root here?
I don't know how to split that filesystem set into multiple aggregate roots, particularly with the "move accross filesystems" because if I create an aggregate root for a filesystem, that move wouldn't be transactional.
I don't really know how to solve this kind of problem with DDD. Maybe I should consider it like real physical drives, where the moved node is first copied on the target node, and then deleted in its original place?
Do you think my domain is well suited for DDD?
If not, what do you recommend so that I can still use CQRS / event-sourcing and so that there won't be concurrency issues when issuing the events?
Do you have any useful readings about that?
Maybe it's kind of premature to think so much about concurrency as we don't have so much load right now and could probably deal with a more optimistic model that works not so bad in most CRUD apps... until it fails and some data gets overriden at some point.
Please give me your thoughts ;)