Presentation is loading. Please wait.

Presentation is loading. Please wait.

Domain Model: Visualizing concepts

Similar presentations


Presentation on theme: "Domain Model: Visualizing concepts"— Presentation transcript:

1 Domain Model: Visualizing concepts
Larman chapter 9

2 Domain Model The Domain Model is the most important artifact in OOA
The domain model is a representation of real-world conceptual classes NOT of software components Class Bicycle

3 Domain Model

4 Domain Model

5 Identify different concepts in the problem domain
Conceptual classes in the Sale Domain:

6 Domain Model guideline
It is better to overspecify a domain model than to underspecify it ! A Domain Model is not absolutely correct or wrong it is a tool of communication

7 Domain Model strategies to identify conceptual classes
Use a conceptual class category list (p ) Identify noun phrases  based upon fully dressed use cases (p )

8 Domain Model Candidate conceptual classes for the Sales Domain:
Register Item Store Sale Payment ProductCatalog ProductSpecification SalesLineItem Cashier Customer Manager Receipt???

9 Domain Model Candidate conceptual classes for the Sales Domain:
Receipt??? Report of a sale – duplicates information found elsewhere  exclude receipt Special role in terms of business rules (the right to return bought items)  include it

10 Domain Model representational gap

11 The NextGen POS Domain Model

12 Associations An association is a relationship between types (or more specifically, instances of those types) that indicates some meaningful and interesting connection

13 UML notation for associations

14 Associations - multiplicity

15 Domain Model Naming associations
Name an association based on TypeName-VerbPhrase-TypeName format where the verb-phrase creates a sequence that is readable and meaningful in the model context Paid-by or PaidBy

16 Domain Model Naming associations

17 NextGen POS Domain Model Associations

18 Need-to-know vs. comprehension
Emphasize need-to-know associations, but add choise comprehension-only associations to enrich critical understanding of the domain

19 Attributes Attribute = a logical data value of an object.
Include the following attributes in a domain model : Those for which the requirements (ex. Use cases) suggest or imply a need to remember information. Ex. A receipt normally has a date and time.

20 Simple attributes Make it an attribute if it is naturrally thought of as number, string, boolean, time…. Otherwise represent it as a separate conceptual class rather than as an attribute If in doubt, define something as a sepate conceptual class rather than as an attribute.

21 No attributes as foreign keys
Do not use attributes as foreign keys. Use associations to relate an object to another object.

22 Attributes in the NextGen Domain Model

23 A partial domain model


Download ppt "Domain Model: Visualizing concepts"

Similar presentations


Ads by Google