26-02-2013, 11:36 AM
Domain Model Refinement
Domain Model.ppt (Size: 1.3 MB / Downloads: 79)
When to make generalization hierarchies?Why is the following a good example?
Guidelines:
Identify superclasses and subclasses when they help us understand concepts in more general, abstract terms and reduce repeated information.
Expand class hierarchy relevant to the current iteration
and show them in the Domain Model.
What about this hierarchy?
Guidelines for creating conceptual subclasses:
Subclass has additional attributes or associations of interest
Subclass behaves or is operated on, or handled or manipulated differently than superclass or other subclasses
When to add Composition notation?
Guidelines for drawing Composition (whole-part) relationships:
Obvious whole-part physical or logical assembly
Lifetime of part is bound within lifetime of whole (create-delete dependency)
Some properties of whole propagate to parts, e.g., location
Operations of whole propagate to parts, e.g., movement
But: If in doubt, leave it out.
UML package diagrams
UML packages for higher level structure than classes
Denoted by box with smaller box on top
Note dependency arrows
A dependency indicates that changes to one element may cause changes to the other
Guidelines for partitioning the domain model into packages:
Place elements together if they are in same class hierarchy, participate in the same use cases, or closely related by concept or purpose, or strongly associated
Packages can be grouped in higher-order packages
Packages may include packages
Common package as <<global>> means all packages in system have dependency to this one
General package marked {abstract} means this package is an interface, with subtypes
Guidelines: divide classes into packages; analyze dependencies; refactor to reduce dependencies