4

I have written an application with approximately 500 classes in java , Now I know this has been asked plenty of times here, but I still couldn't find a proper resource or tutorial for creating a data flow diagram for my entire project.

Any help/tutorial/resource or code sample would be appreciated.

Altavista
  • 253
  • 5
  • 12
  • UML diagram? There are many options. Unless you mean something else by "data flow." – noahlz Oct 05 '12 at 09:16
  • The general meaning of data flow, nothing extra ordinary. – Altavista Oct 05 '12 at 09:19
  • Duplicate? http://stackoverflow.com/questions/10474008/how-to-create-data-flow-diagrams-using-java – noahlz Oct 05 '12 at 09:20
  • No. I need to create simple DFD not by writing AWT code . – Altavista Oct 05 '12 at 09:27
  • 1
    Try IntelliJ Idea, as far as I remember it has data flow analysis. – Marko Topolnik Oct 05 '12 at 09:35
  • I don't think thats so easily possible, since you would have to inspect method implementations. What you might be able to do, is that you can inspect the object composition of some of your objects. And when you find that instance A has instance B as the value of property foo, then you can construct a flow from `A -> foo -> B`. – SpaceTrucker Oct 05 '12 at 09:35

3 Answers3

1

You might be able to derive data flows from your unit tests. If you have a instance A and a mock B and you expect instance C to be passed in as a prameter to B.bar(Object) when you call A.foo(C). In such cases you get data flow from one object to another.

The second thing to do is to inspect you application configuration. If you find that instance D is configured with instance E, which itself is configured with instance F you can chain together the data flows, that you have derived from your unit tests.

But i don't know of any implementation for this. But both parts seem to be relatively easy to implement. In the first part you need to hook on to your mocking framework. The second part is easy if you are using dependency injection.

EDIT:
If you got all that data together, you can for example use the Eclipse UML API to create the diagrams.

SpaceTrucker
  • 13,377
  • 6
  • 60
  • 99
1

Here is another try on that using Eclipse:

MoDisco is able to create an emf model of your Java project. That emf model will be the basis for creating the data flow diagrams. With ATL you can transform that model into an appropriate model for visualization. For visualization you can either choose an UML activity diagram. That has the advantage of being able to work with existing UML technologies. Another possibility is to use Zest or GraphML and yEd to create a visualization.

SpaceTrucker
  • 13,377
  • 6
  • 60
  • 99
0

Grab full version of IntelliJ idea - it has data flow diagramms and other nice analyze tools. You will get 30 day license on the sport so you can see it this is option for you.

Konstantin Pribluda
  • 12,329
  • 1
  • 30
  • 35