X

Geertjan's Blog

  • September 16, 2011

Visualizing NetBeans Module Dependencies

Geertjan Wielenga
Product Manager

Always on NetBeans Platform courses we say "one of the advantages of modularity is that you end up with a clearer picture of the architecture of your application" and then someone in the group says "great, so how do I get to see that picture", and then I say "well, that picture is mostly in your mind since there's no actual tool to create that visualization graph and please feel free to go ahead and create one since you've now spent half a day learning about NetBeans APIs", and then the person in the group says "oh".

Well, here's the start of that visualization graph, pretty messed up result, but the graph and relationships, etc, are all correct and as expected:

Suggestions for improvement welcome. The above is for Ant-based projects, of course, since Maven-based projects already have a dependency viewer.

Join the discussion

Comments ( 5 )
  • Tom Wheeler Friday, September 16, 2011

    You might also check out the visual dependency viewer Jarda wrote a few years ago:

    http://hg.netbeans.org/main/contrib/file/tip/projectdeps


  • Andrzej Olszak Friday, September 16, 2011

    It's hard for me to deduce why there are org.openide.* packages listed under the JUGEditor module? I assume that these packages are something from the RCP that the module depends on and that they are not actually not present in this module. Wouldn't it be more useful to have there just the application's packages - the only ones that the application programmer has the control over?

    Great work with the plugin, it's really good to see some architecture-targeted uses of the NB VisualLibrary. In my experience the APIs of the library are really clean, compact and powerful, which combined with a bit of static analysis of sources (e.g. recoder.sf.net library) has potential to give birth to a whole bunch of cool development/design tools for the NB IDE.


  • Geertjan Saturday, September 17, 2011

    Hi Andrzej, no, what I'm doing is creating a visualization of all the modules that each of my modules depends on, regardless of where they come from.

    Tom, thanks for the tip, the code is much cleaner than mine, will use that in a blog entry soon.


  • Mathieu Bastian Saturday, September 17, 2011

    Nice!

    In the same era I wrote a small Netbeans Plugin few months ago that allows to export the same graph as a DOT file for visualizing in GraphViz or Gephi. I wrote it for Netbeans 6.9 hopefully it's still working.

    On github

    https://github.com/mbastian/NBP-Modules-Graph


  • Jesse Glick Monday, September 19, 2011

    You could write a generic project dependency grapher using SubprojectProvider.

    Since graphs quickly become cluttered and unreadable, a dependency structure matrix would be more useful in general. IDEA has some such facility; maybe NetBeans should too. (Lattix did have a NB integration, though for Java-level rather than module-level dependencies; both are probably needed.) Maybe we could integrate dtangler?


Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.