8 August 2025
Domain Modelling PDF
Note
You can get this in PDF form by clicking here.
Framework Overview
The Four Steps
Step 1: Collect Written Materials
- Gather project briefs, stakeholder interviews, user stories, "given, when, then" scenarios
- Aim for clear descriptions of what the system needs to do
Step 2: Identify Nouns
- Nouns are "things" - both concrete and abstract
- Map to domain objects and their properties
- Use "is a, has a" technique to distinguish objects from properties
- Create a refined list, removing duplicates and choosing the best representations
Step 3: Identify Verbs
- Verbs are "doing words" that describe system behavior
- Focus on user or system actions (not state changes)
- In traditional OOP: verbs typically become methods on classes
- In microservices: help identify business domains and service boundaries
Step 4: Identify Domain Events
- Important occurrences that other parts of the system need to know about
- Look for linguistic patterns suggesting something happened:
- Past-tense verbs: "submitted," "approved"
- Temporal indicators: "when," "after," "once"
- Conditional phrases: "if successful," "upon completion"
- Trigger phrases: "causes," "triggers," "results in"
- State changes: "becomes active," "is marked as"
Worked Example: Video Streaming Platform
Written Description
The video streaming platform hosts movies and TV shows, and may have multiple episodes for each TV show. The system should, for each title, store the title's name and genre. No two titles have the same name.
A subscriber can stream any available content within their subscription tier. A streaming session automatically times out after six hours of inactivity.
When a subscriber ends a session, that streaming slot immediately becomes available.
Use the written description above to follow along with the worked example in the video.