Best Practices

Objects before Classes

  • Think about objects and links instead of classes and association.

  • It is easier to understand concrete examples than abstract concepts.

Use a Simplified UML Syntax

  • Use an adapted subset of the UML syntax, some concepts are not meant to be used in domain analysis: visibility, active classes, etc.

  • Use specializations to avoid duplicate attributes and associations.

  • Name association roles accordingly and use precise cardinalities.

  • Avoid the complexity of ternary and quaternary associations.

  • Be attentive to class, attribute, and role names.

Use UML Diagrams

  • Describe Actions using:

    • Object diagrams (snapshots).

    • Sequence diagrams.

  • Describe Use Cases using Activity Diagrams.

  • Describe different states of a conceptual class using State Machines.

  • Do not try to exploit all UML modeling possibilities.

Be Coherent

  • Sequence diagrams (scenarios) are always attached to Use Cases.

  • Each Use Case should be described by a main and several alternative or exception scenarios.

  • When an object receives a message, its class must defined the operation corresponding to that message.

  • State machines are always attached to Classes. Attributes and Operations used by states and transitions must be defined in the corresponding Class.

  • Each transition should be described by a scenario.

Distinguish Attributes and Associations

  • Use associations to relate two conceptual classes.

  • If the attribute type is a data type, it may be shown in the attribute box.

relate with associations

Avoid representing Complex Concepts as Primitive Types.

  • If the attribute has other attributes, it is a conceptual class.

avoid complex attributes

Avoid Attributes as Foreign Keys.

  • Relate concept classes directly.

avoid foreign keys

Distinguish Roles and Classes

  • If the concept type depends on other concepts, consider using roles.

  • Roles of a Professor on a giver Course: instructor, grader, course builder, teaching assistant.

match player