Modeling Tips

A model captures the essence of a system or part of a system. Modeling, as part of the software development process, reflects requirements and guides design and coding. It is very much a creative activity that communicates at a profound level.

Here are some modeling best practices.

Multiple Models with Domain Model the Key

For all but the smallest of projects, creating more than one model will produce the best overall picture of a system. Think of the separate models as "views" of the system from different perspectives. Multiple perspectives provides a more informed vision. The models are less cluttered and more cohesive.

The most important model is one that shows the "real-world" concepts of the system, the domain model. The domain model is often reflected in many of the system's subsystems, for example, the storage and user interface subsystems. An automobile as an example domain would have concepts/classes for automobile, body, engine, brakes, etc. Real-world does not necessarily mean something you can touch, like a car. A domain model for a web server, an abstract system, would encompass server, requests, responses, files, etc.

What other models are useful? For software development, the next most important models are the execution and management models. The elements of these models provide the basis for running, controling and monitoring the system (see also below).

Here is a partial list of software models:

Important Concepts First

Work on the most important aspects of the system first, put aside detail. This is a matter of both focus and commitment. Focus is needed for careful examination of the system and accurate creation of model elements to reflect its state and behavior. Commitment is just as important because modeling will always entail conflicting and compeating requirements and demand answers to questions of including or excluding features.

Modeling works at such a conceptual level that each element of the model has enormous weight. Decisions at modeling time have far ranging implications for development resource consumption. That this is so is mostly good news as a model can quickly convey an overall picture. The fact that detials are glossed over, though, means plenty of work ahead and model reviewers must be understanding of this. For example, adding a tag class to a photo website system domain model implies requirements for mechanisms to store, search, and display tags, all from a single box!

Modeling stimulates creativity while providing some structure to help focus on the system and communicate with others. Remember that design will follow modeling and progress by elaborating the concepts of the model. It's more important to get the important things right than belabor the details.

Cohesive and Uniform Distributition

The best tests for the quality of a given model are:

Use the Building Blocks

These are the elements of modeling with Modeler:

classes Classes contain all the state and behavior. Only important classes are shown and they have simple, direct names. Attributes and operations are not necessary except where deemed illuminating. Most important and containing classes should appear higher in the diagram. No utility classes!
relationships is-a Indicates generalization/specialization (place general on top). These relationships are very important as they show common behavior and code sharing possibilities.
has-a This type of relationship usually depicts some sort of containment, composition, ownership (owner or container on top), or long-term connection. Mark as composite if associated object is intregral to or owned by the aggregating object. It is a good idea to show the multiplicities. For clarification, the relationship can be labeled with a hint of the usage (read from top to bottom class).
dependency A class is dependent on another class if it uses that class, i.e. invokes operations(s) on it, but does not maintain a connection to the object after its own operation completes. As with has-a relations these can be labeled to provide usage hints (read in direction of arrow).