views:

110

answers:

3

What good-practice-indicating idioms do you look for in a sequence of method invocations, as depicted on sequence diagrams?

+1  A: 

I would say the same as for good software-engineering:

  • Naming (of Classes and Methods not of instance names)
  • How many paramters do the methods have (if shown)?
  • Do the call-chain makes sense regarding to the detail level (e. g. is the graining to fine or to rough?)
H-Man2
+4  A: 

Look for the telltale central controller. A well-factored system will tend to have an even allocation of responsibilities among the classes. A poorly factored system instead tends to have a sequence diagram with many messages going to or from a class in the middle, which is frantically getting messages, making decisions, calling underlings, and generally running everything.

Not coincidentally, that controller class also tends to be big, have lots of procedural code, and generally look like FORTRAN in a funny hat.

Charlie Martin
A: 

See http://www.reversejava.com for a dynamic reverse engineering application which generates UML Sequence diagram and view of Participating Class diagram from any Java Application at runtime All you have to do is just run your application and sit back. Reverse Java runs in background tracing all the activities happening inside your application and creates UML diagram for you.

Rajesh Jadhav