Archive for June, 2005

Activity Diagram Guidelines

Wednesday, June 15th, 2005
  • Place the start point in the top-left corner.

  • Include an ending point.

  • Simplify operations requiring flow charts.

  • Question “black-hole” activities.

  • Question “miracle” activities.

  • Reflect the previous activity by using decision points.

  • Avoid superfluous decision points.

  • Ensure that each transition leaving a decision point has a guard.

  • Do not overlap guards.

  • Ensure that guards on decision points form a complete set.

  • Ensure that exit transition guards and activity invariants form a complete set.

  • Apply an [otherwise] guard for “fall-through” logic.

  • Model guards only if they add value.

  • Ensure that forks have corresponding joins.

  • Ensure that a fork has only one entry transition.

  • Ensure that a join has only one exit transition.

  • Avoid superfluous forks.

  • Order swimlanes in a logical manner.

  • Apply swimlanes to linear processes.

  • Have less than five swimlanes.

  • Consider swimareas for complex diagrams.

  • Reorganize into smaller activity diagrams when swimareas include several activities.

  • Consider horizontal swimlanes for business processes.

  • Model the key activities in the primary swimlane.

  • Place shared action objects on swimlane separators.

  • Apply state names when an object appears several times.

  • Reflect the life-cycle stage of an action object in its state name.

  • Show only critical inputs and outputs.

  • Depict action objects as smaller than activities.

  • ]]>

    Sequence Diagram Guidelines

    Wednesday, June 15th, 2005
  • Strive for left-to-right ordering of messages.

  • Layer classifiers.

  • Give an actor the same name as a class, if necessary.

  • Include a prose description of the logic.

  • Place proactive system actors on the left-most side of your diagram.

  • Place reactive system actors on the right-most side of your diagram.

  • Avoid modeling object destruction.

  • Don’t sweat activation boxes.

  • Name objects when you reference them in messages.

  • Name objects when several of the same type exist.

  • Apply textual stereotypes to classifiers consistently.

  • Apply visual stereotypes sparingly.

  • Focus on critical interactions.

  • Justify message names beside the arrowhead.

  • Create objects directly.

  • Apply operation signatures for software messages.

  • Apply prose for messages involving human and organization actors.

  • Prefer names over types for parameters.

  • Indicate types as parameter placeholders.

  • Apply the > stereotype for use case invocations.

  • Do not model obvious return values.

  • Model a return value only when you need to refer to it elsewhere on a diagram.

  • Justify return values beside the arrowhead.

  • Model return values as part of a method invocation.

  • Indicate types as return-value placeholders.

  • Indicate the actual value for simple return values.

  • ]]>

    Package Diagram Guidelines

    Wednesday, June 15th, 2005

    1. Create class package diagrams to logically organize your design.

    2. Create UML component diagrams to physically organize your design.

    3. Place inheriting packages below base packages.

    4. Vertically layer class package diagrams.

    5. Create use case package diagrams to organize your requirements.

    6. Include actors on use case package diagrams.

    7. Horizontally arrange use case package diagrams.

    8. Give packages simple, descriptive names.

    9. Make packages cohesive.

    10. Indicate architectural layers with stereotypes on packages.

    11. Avoid cyclic dependencies between packages.

    12. Reflect internal relationships in package dependencies.

    ]]>

    Class Diagram Guidelines

    Wednesday, June 15th, 2005
  • Identify responsibilities on domain class models.

  • Indicate visibility only on design models.

  • Indicate language-dependent visibility with property strings.

  • Indicate types on analysis models only when the type is an actual requirement.

  • Be consistent with attribute names and types.

  • Model association classes on analysis diagrams.

  • Do not name associations that have association classes.

  • Center the dashed line of an association class.

  • Use common terminology for class names.

  • Prefer complete singular nouns for class names.

  • Name operations with a strong verb.

  • Name attributes with a domain-based noun.

  • Do not model scaffolding code.

  • Do not model keys.

  • Never show classes with just two compartments.

  • Label uncommon class compartments.

  • Include an ellipsis ( . . . ) at the end of incomplete lists.

  • List static operations/attributes before instance operations/attributes.

  • List operations/attributes in decreasing visibility.

  • For parameters that are objects, list only their type.

  • Develop consistent operation and attribute signatures.

  • Avoid stereotypes implied by language naming conventions.

  • Indicate exceptions in an operation’s property string.

  • Reflect implementation language constraints in interface definitions.

  • Name interfaces according to language naming conventions.

  • Prefer “lollipop” notation to indicate realization of an interface.

  • Define interfaces separately from your classes.

  • Do not model the operations and attributes of interfaces in your classes.

  • Model relationships horizontally.

  • Model collaboration between two elements only when they have a relationship.

  • Model a dependency when the relationship is transitory.

  • Tree-rout similar relationships to a common class.

  • Always indicate the multiplicity.

  • Avoid a multiplicity of “*”.

  • Replace relationship lines with attribute types.

  • Do not model implied relationships.

  • Do not model every dependency.

  • Center names on associations.

  • Write concise association names in active voice.

  • Indicate directionality to clarify an association name.

  • Name unidirectional associations in the same direction.

  • Word association names left to right.

  • Indicate role names when multiple associations between two classes exist.

  • Indicate role names on recursive associations.

  • Make associations bi-directional only when collaboration occurs in both directions.

  • Redraw inherited associations only when something changes.

  • Question multiplicities involving minimums and maximums.

  • Apply the sentence rule for inheritance.

  • Place subclasses below superclasses.

  • Beware of data-based inheritance.

  • A subclass should inherit everything.

  • Apply the sentence rule for aggregation.

  • Be interested in both the whole and the part.

  • Place the whole to the left of the part.

  • Apply composition to aggregates of physical items.

  • Apply composition when the parts share their persistence life cycle with the whole.

  • Don’t worry about the diamonds.

  • ]]>

    Use Case Diagram Guidelines

    Wednesday, June 15th, 2005
  • Name use cases using domain terminology.

  • Imply timing considerations by stacking use cases.

  • Place your primary actor(s) in the top-left corner of the diagram.

  • Draw actors on the outside edges of a use case diagram.

  • Name actors with singular, domain-relevant nouns.

  • Associate each actor with one or more use cases.

  • Name actors to model roles, not job titles.

  • Use > to indicate system actors.

  • Don’t allow actors to interact with one another.

  • Introduce an actor called “time” to initiate scheduled events.

  • Indicate an association between an actor and a use case if the actor appears within the use case logic.

  • Avoid arrowheads on actor-use case relationships.

  • Apply > when you know exactly when to invoke the use case.

  • Apply > when a use case may be invoked across several use case steps.

  • Apply > associations sparingly.

  • Generalize use cases when a single condition results in significantly new business logic.

  • Do not apply >, >, or >.

  • Avoid more than two levels of use case associations.

  • Place an included use case to the right of the invoking use case.

  • Place an extending use case below the parent use case.

  • Apply the “is like” rule to use case generalization.

  • Place an inheriting use case below the base use case.

  • Apply the “is like” rule to actor inheritance.

  • Place an inheriting actor below the parent actor.

  • Indicate release scope with a system boundary box.

  • Avoid meaningless system boundary boxes.

  • ]]>

    Bad Behavior has blocked 45 access attempts in the last 7 days.