Download presentation
Presentation is loading. Please wait.
1
Domain Modelling Paul Stovell
2
Architecture: Implicit or Explicit? Architecture exists implicitly But if you don’t define it, it probably sucks
3
Scope of this presentation UI Data Stores (Database, Web Service, etc.)
4
Domain Modelling Step 1: Understand the problem domain Step 2: Architect around it
5
Object-Oriented Design Encapsulation Polymorphism Inheritance Abstraction
6
Design Patterns Gang of Four Concepts Judgement As simple as possible, but no simpler
7
Object Oriented not Class Oriented
8
Domain Model What’s in a domain model? Stateful Objects Services Responsibilities: Maintaining their own state Responsibilities: Maintaining their own state Responsibilities: Doing stuff Responsibilities: Doing stuff
9
Entities : Stateful Objects Have a real-world identity
10
Value Objects : Stateful Objects Have no real-world identity Value objects with same values are interchangeable
11
Value Objects : Stateful Objects Value objects are subjective
12
Domain Services : Stateless Responsibilities: Doing stuff Generally stateless
14
Relationship Bias Most real-world relationships are one-way
16
Aggregates Recognise that some things don’t exist without others
17
Aggregates Timesheet TimesheetEntry Customer Aggregate Timesheet
18
Locking Timesheet TimesheetEntry Customer Coarse-Grained Lock
19
Aggregates Timesheet TimesheetEntry Customer Aggregate
21
Context and Boundaries “Object models don’t scale”
22
Contexts and Boundaries Sales Application Context Tech Support Application Context Boundary
23
Gateways Abstract the coordination of services and stateful objects Like your manager: they boss people around but don’t do any work themselves
25
Domain Models + SOA UI Service Agents Web Services Business Logic Database Service Messages UI Service Agents Web Services Business Logic Database Service Messages
26
Domain Models + SOA UI Service Agents Web Services Domain Services Database Domain Objects UI Service Agents Web Services Domain Services Database Domain Objects
27
Recap What’s in a domain model? – Stateful Objects Entities Value Objects – Services Simplified by: – Relationship Bias – Aggregates Scales thanks to: – Contexts and Boundaries – Gateways
28
I’m still awake! Where can I get more? Head first design patterns Eric & Elizabeth Freeman Domain Driven Design Eric Evans Patterns of Enterprise Application Architecture Martin Fowler
29
CHEERS! Paul Stovell www.paulstovell.net paul.stovell@readify.net July 5 th SDNUG (AMP Building) Binding Oriented Programming www.sdnug.org
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.