1 / 20

Domain Model Visualizing Concepts

Domain Model Visualizing Concepts. Chapter 9 Applying UML and Patterns Craig Larman. Comments on diagrams.

noura
Télécharger la présentation

Domain Model Visualizing Concepts

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Domain Model Visualizing Concepts Chapter 9 Applying UML and Patterns Craig Larman

  2. Comments on diagrams • Now that we are starting to look at diagrams, I want to emphasize that this is a class on analysis and design, not diagramming. While it may look good on your resume that you can use UML, your career depends on being able to translate ideas into good systems. That is much more difficult.

  3. Domain Model Relationships Domain Model Business Model Classes, attributes, associations Elaboration on some terms Domain objects Use Case Model Glossary Requirements Interaction Diagrams Design

  4. A Domain Model • illustrates meaningful conceptual classes in a problem domain. • is a representation of real-world concepts, not software components. • is NOT a set of diagrams describing software classes, or software objects and their responsibilities.

  5. A Domain Model is the most important OO artifact • Its development entails identifying a rich set of conceptual classes, and is at the heart of object oriented analysis. • It is a visual representation of the decomposition of a domain into individual conceptual classes or objects. • It is a visual dictionary of noteworthy abstractions.

  6. Domain Model UML Notation • Illustrated using a set of class diagrams for which no operations are defined. It may contain: • Domain Objects or Conceptual Classes • Associations between conceptual classes • Attributes of conceptual classes

  7. A Domain Model is not a Software Artifact Software Artifacts: A Conceptual class: vs.

  8. Think of Conceptual Classesin terms of: • Symbols – words or images • Intensions – its definition • Extensions – the set of examples to which it applies • Symbols and Intensions are the practical considerations when creating a domain model.

  9. Decomposition: • A central distinction between Object-oriented analysis and structured analysis is the division by objects rather than by functions during decomposition. • During each iteration, only objects in current scenarios are considered for addition to the domain model.

  10. Conceptual Class Identification: • It is better to overspecify a domain with lots of fine-grained conceptual classes than it is to underspecify it. • Discover classes up front rather than later. • Unlike data modeling, it is valid to include concepts for which there are no attributes, or which have a purely behavioral role rather than an informational role.

  11. Identify Conceptual Classesby Category List: Common Candidates for classes include: Tangible objects, Descriptions, Roles, Places, Transactions, Containers, Systems, Abstract nouns, Rules, Organizations, Events, Processes, Written Materials, Catalogs, Records, Financial Instruments and Services

  12. Identify Conceptual Classesby Noun Phrase: • Identify Nouns and Noun Phrases in textual descriptions of the domain. • Fully dressed Use Cases are good for this type of linguistic analysis. It’s not strictly a mechanical process: • Words may be ambiguous • Different phrases may represent the same concepts.

  13. Sales Domain example - ‘Purchase Items’ Use Case • We find concepts such as Register, Sale, Item, Customer, Receipt etc. in this use case. Should we include Receipt in the Model? • Con: As a report of a sale, it’s duplicate info. • Pro: Business Rules for a Return require that the customer has a receipt. • Suggestion: Include it in the iteration where the Return Use Case is covered.

  14. Steps to create a Domain Model • Identify Candidate Conceptual classes • Draw them in a Domain Model • Add associations necessary to record the relationships that must be retained • Add attributes necessary for information to be preserved • Apply existing Analysis Patterns

  15. Apply the Mapmaker Strategy • Use existing names for things, the vocabulary of the domain • Exclude irrelevant features • Do not add things that are not there

  16. A Common Mistake - Classes as Attributes • Rule: If we do not think of a thing as a number or text in the real world, then it is probably a conceptual class. • If it takes up space, then it is likely a conceptual class. Examples: • A Store is not an attribute of a Sale • A Destination is not an attribute of a flight

  17. Specification or Description Conceptual Classes • A Class that records information about an item. • Even if all Instances of the item are sold out, the description remains. • Avoids duplication of recording the descriptive information with each instance of the item.

  18. Description of a Service Example (Flight) Flies-to vs. Described -by Describes -flights-to

  19. Monopoly Concepts (candidates) Monopoly Game Player Piece Square Die Board

  20. UML Notation: Multiple Perspectives • UML describes raw diagram types, such as class diagrams. It does not impose a specific method or process. • UP, the Unified Process, applies raw UML to defined methodology models. UML can be used for 3 different perspectives: • Essential – describe the real world • Specifications – software abstractions, such as components and their interfaces • Implementation – specific language (Java)

More Related