Practical tips for constructing Object diagrams from applications.
- Don't begin constructing an object by merely jotting down classes and inheritance. Understand the problem first. The content of an object model is driven by it's relevance.
- Keep the model as simple as possible. Avoid needless complications.
- Carefully choose names. Choosing the right name is one of the most difficult step in object oriented design. Choosing the right names not only avoids confusion but also improves the clarity in the program structure. Names should be descriptive, crisp, and unambiguous. Names should not be biased with only a certain aspect of the object, but rather have an comprehensive way of approach.
- Try to avoid too deep nested generalizations
- Don't be surprised if your object diagram requires revision. Object models often require multiple iterations to clarify names, repair errors, add details and correctly capture structural constraints.
- Try to get others review your model. Object models can be a focal point for stimulating the involvement of others.
- Always document your object models. The object diagrams specify the structure of a model but cannot describe the reasons behind it. The written explaination guides the reader through the model and explains the reason behind it. The written explaination guides the reader through the model and explains the subtle reasons why the model was structured in the particular way. The written explaination clarifies the meaning of the names in the model and should convey the reason for each class and relationship.
Adapted from the book Object - Oriented Modeling and Design
Top comments (1)
Constructing object diagrams from applications requires a clear understanding of the system’s structure and relationships. Start by identifying key objects and their attributes within the application's class hierarchy, then illustrate the links and associations between these objects, focusing on real instances and their current states. Use intuitive naming for each object and limit the number of objects to avoid complexity. Tools that automate diagram generation can also simplify this process, especially for larger systems. For personalized guidance and more practical tips, consulting with experts like Expert Mistri can provide valuable insights into effective diagram construction and system design best practices.