HandbookVII the BasilicaModelling the domain
VIIthe Basilica, Build the right thingModelling the domain
In plain words
A domain model is a plain list of the things your business deals with, like members, events and RSVPs, what each one knows, and how they relate.
Where you see it
Guildhall's agent made a single users table with a role column, so nobody can be an admin in one guild and a plain member in another. Twenty minutes listing the nouns and how they link (a person belongs to many guilds, with a role in each) would have caught it before any table existed.
What goes wrong
- Letting the tables design themselves
Ask for a feature and the agent creates tables to fit that one feature. Ten features later you have overlapping tables nobody planned.
- Three words for one thing
Members on screen, users in the code, customers in the emails. Agree one word per thing and put the list in your rules file, so the agent uses it too.
- Forgetting how many
"A note has a tag" and "a note has many tags" need different tables. Say one or many on each side of every link.
What to tell your agent
Quick check
Sign in to earn +10 XP for itQuill users want to put one note in several folders. How should the domain model say it?