14.4. Designing Objects: What are Static and Dynamic Modeling?There are two kinds of object models: dynamic and static. Dynamic models , such as UML interaction diagrams (sequence diagrams or communication diagrams ), help design the logic, the behavior of the code or the method bodies. They tend to be the more interesting, difficult, important diagrams to create. Static models , such as UML class diagrams, help design the definition of packages, class names, attributes, and method signatures (but not method bodies). See Figure 14.1. Figure 14.1. Static and dynamic UML diagrams for object modeling.Dynamic Object ModelingPeople new to UML tend to think that the important diagram is the static-view class diagram, but in fact, most of the challenging, interesting, useful design work happens while drawing the UML dynamic-view interaction diagrams. It's during dynamic object modeling (such as drawing sequence diagrams) that "the rubber hits the road" in terms of really thinking through the exact details of what objects need to exist and how they collaborate via messages and methods.Therefore, this book starts by introducing dynamic object modeling with interaction diagrams.interaction diagrams p. 221
Static Object ModelingThe most common static object modeling is with UML class diagrams. After first covering dynamic modeling with interaction diagrams, I introduce the details. Note, though, that if the developers are applying the agile modeling practice of Create several models in parallel , they will be drawing both interaction and class diagrams concurrently.class diagrams p. 249 Other support in the UML for static modeling includes package diagrams (p. 197) and deployment diagrams (p. 621). |