[ACCEPTED]-how to make complex large uml class diagram into simple understandable way-class-diagram

Accepted answer
Score: 10

In general, you shouldn't represent too 25 many classes in the same diagram: you'd 24 better split the structure of your software 23 in multiple diagrams. Every diagram should 22 contain just classes interacting together. Ideally, in 21 a single diagram you should have few classes 20 that depend on each other but with few dependencies 19 on classes contained in other diagrams. If 18 you cannot divide your diagrams in this 17 way because you have too many dependencies, your 16 diagram is trying to tell you something: maybe your design has classes 15 too coupled and you need to modularize more 14 the project.

Another piece of advice: if 13 you're using UML as a tool for reasoning 12 (and not just for documentation), class 11 diagrams are useful to show the static structure 10 of your software and in particular the dependencies 9 between classes. You don't need to put every 8 detail in the diagram, so don't show every 7 attribute and method of the classes, but 6 only the most important methods. Ideally 5 you should show just the methods that can 4 suggest the behaviour of your software. Remember 3 that UML stands for Unified Modeling Language, and 2 a model is not a copy of the real thing 1 with all its details :-)

Score: 3

"Divide to conquer"!

Use different strategies 7 of structuring and breaking your diagram 6 in more manageble units:

  • Group related classes in packages and manage dependencies between packages. Show packages in separate diagrams that give your overall model kind of "navigational backbone" (like folders and files)
  • Use inheritance hierarchies to simplify your class structures
  • Use composition relationship whenever possible to couple highely related classes based on Whole-Part paradigm
  • Finally break complex diagrams in several smaller and logically meaningfull ones

Semantic value in 5 UML comes from the elements and their relationships 4 and other features and not the way the diagrams 3 are layed out. So the same semantic value from 100 classes in 1 diagarm can be achived with 10 diagrams. On the other side is the 2 second case much easier fo follow, understand, extend 1 and maintain.

Score: 2

Adding links to some examples (as requested) to 11 the answers of @Daniele and @Aleks

Links 10 are arranged in my recommended reading order:

all 9 the other "conceptual" points 8 were already answered.

BTW: good modeling 7 tools allow interactive switching of required 6 level of detail (collapse not interesting 5 classes, zoom in/zoom out, turn display 4 of properties on/off etc.) so reading one 3 complex diagram may be possible, if it is 2 not supposed to be printed on single A4 1 sheet of paper

More Related questions