Week 9 Part IV · Domain Logic and Security
Instructor lesson plan: lecture (2 h) and practice (2 h).
domain modeluse-case servicesevent sketchesworkflow examples
| 0:00-0:20 | 20 min | Ubiquitous languageNaming concepts from the business domain, not from UI screens or database tables. |
| 0:20-0:45 | 25 min | Aggregates and invariantsConsistency boundaries and transaction decisions. |
| 0:45-1:05 | 20 min | Domain services and application servicesDistinguishing business calculations from orchestration. |
| 1:05-1:15 | 10 min | Break |
| 1:15-1:40 | 25 min | Domain eventsExpressing something meaningful that happened, without inventing distributed complexity. |
| 1:40-2:00 | 20 min | Workflow examplesReviewing business behavior through use cases. |
Students often think: all rules belong in services.
Set it straight: invariants that protect an entity or aggregate should live with that model when possible.
| 0:00-0:25 | 25 min | Language reviewTeams rename vague concepts and write a glossary. |
| 0:25-1:00 | 35 min | Aggregate designIdentify one aggregate and encode its invariants. |
| 1:00-1:10 | 10 min | Break |
| 1:10-1:45 | 35 min | Workflow examplesAdd examples for successful and failed business workflows. |
| 1:45-2:00 | 15 min | Project-integration briefDocument aggregate boundaries and business rules. |