Domain Model n Visualization of entities and relationships

  • Slides: 27
Download presentation
Domain Model n Visualization of entities and relationships n In UP presented as Class

Domain Model n Visualization of entities and relationships n In UP presented as Class Diagrams – n n Classes, Relationships, Attributes in the domain Important analysis artifacts – Driven by use case – Stipulates initial design ideas in contracts – Stipulates final design in Interactions – Provides visual dictionary Moves through different perspectives – Conceptual: from use case – Design: from Interactions – Implementation: implementation details 1 Copyright © 2004 Cezary Z Janikow

Domain Model: when n Start in Inception n Most efforts to detail in Elaboration

Domain Model: when n Start in Inception n Most efforts to detail in Elaboration 2 Copyright © 2004 Cezary Z Janikow

Domain Model 3 Copyright © 2004 Cezary Z Janikow

Domain Model 3 Copyright © 2004 Cezary Z Janikow

Domain Model: partial POS example (conceptual) 4 Copyright © 2004 Cezary Z Janikow

Domain Model: partial POS example (conceptual) 4 Copyright © 2004 Cezary Z Janikow

Class Diagram n Static view of the domain n Presents domain conceptual classes n

Class Diagram n Static view of the domain n Presents domain conceptual classes n And not proposed implementation or design classes 5 Copyright © 2004 Cezary Z Janikow

Conceptual Class n Symbol n Intension: definition n Extension: set of elements 6 Copyright

Conceptual Class n Symbol n Intension: definition n Extension: set of elements 6 Copyright © 2004 Cezary Z Janikow

Domain Model vs. Design Model n Same names and notation lower the representation gap

Domain Model vs. Design Model n Same names and notation lower the representation gap 7 Copyright © 2004 Cezary Z Janikow

Domain Model vs. Data Model? n n Domain Model – Concepts, entities, can be

Domain Model vs. Data Model? n n Domain Model – Concepts, entities, can be abstract – Relations – Attributes Data Model – How data is stored into persistent storage – Pure data, in files or databases 8 Copyright © 2004 Cezary Z Janikow

Domain Model: how to create? 1. Find conceptual classes – Refine existing model and/or

Domain Model: how to create? 1. Find conceptual classes – Refine existing model and/or use patterns – Explore concepts in the Category List See Table 9. 1 – Explore Noun Phrases Lexical/linguistic analysis of use cases and other text documents See pate 142 2. Add associations 3. Add attributes 9 Copyright © 2004 Cezary Z Janikow

Conceptual classes in POS n Class or Attribute? – Use the 3 object properties

Conceptual classes in POS n Class or Attribute? – Use the 3 object properties to test – Remember design will change things if needed 10 Copyright © 2004 Cezary Z Janikow

Description Classes n Class that describes something else – Example: Item object represents physical

Description Classes n Class that describes something else – Example: Item object represents physical object Description of the object is separate In the design perspective, we need to retain description even if sold out on items (and thus no item objects) 11 Copyright © 2004 Cezary Z Janikow

Rules for having Description classes – If descriptions are independent of the exietence of

Rules for having Description classes – If descriptions are independent of the exietence of items – If deleting an object deletes information that may need to be maintained – If it reduces duplications or adds clarity 12 Copyright © 2004 Cezary Z Janikow

Associations n Relationships between classes – Stemming from relationships on objects Transient (for some

Associations n Relationships between classes – Stemming from relationships on objects Transient (for some duration that we need to investigate details of) Persistent n n Derived from Analysis or the Association List (Table 9. 2) In the conceptual model, association is just a statement about the relationships – If message need to be passes, it will persist in the design model (from Interactions) Visibility and navigability will have to be established 13 Copyright © 2004 Cezary Z Janikow

Association Notations 14 Copyright © 2004 Cezary Z Janikow

Association Notations 14 Copyright © 2004 Cezary Z Janikow

Associations n Naming – n Verb Phrases Roles – Each end – Having Names

Associations n Naming – n Verb Phrases Roles – Each end – Having Names for the roles of the two classe/objects (sometime this is called “roles”) Multiplicity How many objects participate Navigability How one object will find the other object to send a message 15 Copyright © 2004 Cezary Z Janikow

Multiplicity 16 Copyright © 2004 Cezary Z Janikow

Multiplicity 16 Copyright © 2004 Cezary Z Janikow

Multiplicity 17 Copyright © 2004 Cezary Z Janikow

Multiplicity 17 Copyright © 2004 Cezary Z Janikow

Multiple Associations n Two classes can have multiple relations 18 Copyright © 2004 Cezary

Multiple Associations n Two classes can have multiple relations 18 Copyright © 2004 Cezary Z Janikow

Conceptual Domain Model in POS 19 Copyright © 2004 Cezary Z Janikow

Conceptual Domain Model in POS 19 Copyright © 2004 Cezary Z Janikow

Attributes n Logical data value of an object n Carefully distinguish attributes from objects

Attributes n Logical data value of an object n Carefully distinguish attributes from objects – Do not use to relate classes or objects Use associations instead – Use as classes if Composed of multiple elements (has attributes-states) There are operations (behavior) Has units of quantity 20 Copyright © 2004 Cezary Z Janikow

Attributes: notation 21 Copyright © 2004 Cezary Z Janikow

Attributes: notation 21 Copyright © 2004 Cezary Z Janikow

Multiplicity vs. derived attribute 22 Copyright © 2004 Cezary Z Janikow

Multiplicity vs. derived attribute 22 Copyright © 2004 Cezary Z Janikow

Multiplicity vs. derived attribute 23 Copyright © 2004 Cezary Z Janikow

Multiplicity vs. derived attribute 23 Copyright © 2004 Cezary Z Janikow

Attributes: examples 24 Copyright © 2004 Cezary Z Janikow

Attributes: examples 24 Copyright © 2004 Cezary Z Janikow

Attributes: examples 25 Copyright © 2004 Cezary Z Janikow

Attributes: examples 25 Copyright © 2004 Cezary Z Janikow

Attributes: examples of quantities 26 Copyright © 2004 Cezary Z Janikow

Attributes: examples of quantities 26 Copyright © 2004 Cezary Z Janikow

POS Domain Model w/attributes 27 Copyright © 2004 Cezary Z Janikow

POS Domain Model w/attributes 27 Copyright © 2004 Cezary Z Janikow