The Elements of UML 2.0 Style


umlstyle 作者是Scott W. Ambler,裏面有17個章節,308條準則。


當然也有可能是出書的時期(May 9, 2005),多數的工具尚未完備。

100. Center Class Names
122. Center Names on Associations
165. Avoid Activation Boxes


129. Make Associations Bidirectional Only When Collaboration Occurs in Both Directions
130. Indicate Direction Only on Unidirectional Associations
132. Redraw Inherited Associations Only When Something Changes


161. Include a Prose Description of the Logic
185. Apply Robustness Diagram Visual Stereotypes

159. Layer Object Lifelines (Layering is a common approach to object-oriented design.)
169. Focus on Critical Interactions
178. Model a Return Value Only When You Need to Refer to It Elsewhere in a Diagram
186. Do Not Use Communication Diagrams to Model Process Flow

像sequence diagram 通常用在:
Validate and flesh out the logic and completeness of a usage scenario.
Give you a feel for which classes in your application are going to be complex, which in turn is an indication that you may need to draw state machine diagrams for those classes.

Communication Diagrams 通常被用在:
provide a bird’s-eye view of a collection of collaborating objects, particularly within a real-time environment;
explore the roles that objects take within a system, as well as the different relationships in which they are involved when in those roles.

State Machine:
UML state machine diagrams depict the dynamic behavior of an entity based on its response to events,
showing how the entity reacts to various events based on its current state.
explore the complex behavior of a class, actor, subsystem,or component;

再寫下去可能會影響著作權,不過,既然我們寫code時都需要有Coding Style,那麼畫 UML 想當然爾也需要UML Style啦!