2

Classes have 10-20 links with one another and you can't see anything in that mess of a diagram

Unfortunately we finished coding already and if we change the class diagram we have to redo the whole thing

2
  • 3
    You are describing a scenario of high coupling and low cohesion. However, without seeing the diagram or a prototypical example of your codebase, it's hard to give any kind of advice. Is it possible to share the UML diagram, albeit with different names if that's a concern?
    – IAE
    Commented Apr 6, 2014 at 23:18
  • I agree with the high coupling comment. I would also consider reorganizing it into packages. I forget the name of the diagram but you essentially group classes logically into packages that use each other. You document the relationships between groups of classes, then each package has its own class diagram documenting only the classes in that package. But without more information it is impossible to provide a good answer.
    – user22815
    Commented Apr 7, 2014 at 0:04

1 Answer 1

3

If you have reversed engineered code into a class diagram and your class diagram is too complex, that probably indicates a very complex design. There's really two approaches - rethink your design and implementation or reduce what you are showing on your model.

You could produce alternate views of the software, using multiple class diagrams to show pieces of the system instead of the entire system. You can also consider removing some information that may not be useful depending on the intent. As an example, showing all private members may not add value, so they could be removed from the diagram to reduce the apparent complexity. You can also consider other diagram types to better document your system - the class diagram is one of 14 diagrams in UML 2.2.

However, if your design is overly complex, then the best course of action would be to slowly refactor your project into something that has a simpler design. This does take time and effort, though, in both redesigning, carrying out the refactoring, and then updating and executing tests to ensure that everything continues to work. It's also something that shouldn't be combined with adding new functionality, so it could slow down development. However, having a cleaner design and implementation would allow others to more quickly understand and begin working on the system in the future.

Without a more complete understanding of your requirements and design (which is likely to be beyond the scope of a question/answer format), there's no way to say if your design is overly complex or not. Some systems truly are complex in nature and just require different methods of capturing the design clearly, while others should have their design reevaluated and maintained as appropriate for the project.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.