Wednesday, March 7, 2012

Analyze Dependencies in VisualWorks using DTangler

I have published package “Epigent DTangler Dependency Analysis” (version 1.14) to the Cincom Store Public Repository. This package allows using DTangler in VisualWorks Smalltalk to analyze dependencies on packages and bundles. I want to thank the authors of DTangler for assisting me with this work.


DTangler is an open source tool for analyzing component dependencies. It provides a Dependency Structure Matrix (DSM) UI to visualize large, complex systems:

DTangler on bundle Tools-IDE”
The tool adds menu item “DTangler Analyze Dependencies” to the package and bundle popup menu in the System Browser. The dialog below is opened when selecting the menu:

DTangler Launch Screen
Follow these steps to test the tool:
  1. Install DTangler from this page.
  2. Load package “Epigent DTangler Dependency Analysis”.
  3. Set the installed location of DTangler using Epigent.DTanglerDependencyAnalysis.ExecutableInterface class dTanglerFolderName: Alternatively, set the location from the “DTangler Launch Screen”.
  4. Select a bundle or a set of packages in the System Browser. Right click and select  “DTangler Analyze Dependencies”.

To load “Epigent DTangler Dependency Analysis” from a Cincom base image, evalutate the script below:

Compiler evaluate: 'Parcel loadParcelByName: ''StoreForPostgreSQL''.
Store.StoreDevelopmentSystem reconnectAction: #reconnect.
Store.RepositoryManager addRepository: (Store.ConnectionProfile new
        name: ''Public Store Repository'';
        driverClassName: #PostgreSQLEXDIConnection;
        environment: ''store.cincomsmalltalk.com:5432_store_public'';
        userName: ''guest'';
        password: ''guest'';
        tableOwner: ''BERN'';
        yourself).
Store.DbRegistry connectTo: (Store.RepositoryManager repositories
detect: [:each | each name = ''Public Store Repository'']).'.
Compiler evaluate: '(Store.Package mostRecentVersionOfPundleWithName: ''Epigent DTangler Dependency Analysis'') loadSrc.'.


3 comments:

Travis Griggs said...

Runar, this definitely looks cool. This is a topic of great interest to me, getting Smalltalkers and their technology to do a better job of building modular software. Module boundaries and dependencies is something you have to embrace to do it right, you can't hide behind the crutch of the object soup that is the image.

Sadly... I tried to download the DTangler stuff. It dl'ed, but doesn't start on OSX. The Console spews some stuff and a NoClassDefError and dies. There's probably some Java dependency not met on my stock OSX 10.7 system. But the download/install instructions don't point out any required dependencies. This is ironic at best. :)

Runar Jordahl said...

Which version of my package do you use? Version 1.15 corrects one bug with starting up DTangler.

Try starting DTanger stand-alone before starting it from VisualWorks.

Could you try with version 1.15 of my package, and mail me back the error?

Marko Oikarinen said...

DTangler is designed to have minimal dependencies to make it easy to integrate to development environments. All you need is Java runtime 1.5 or newer. The non-GUI console dtangler is just one jar. The GUI version uses the forms-1.2.0.jar which is included in the download.

NoClassDefError is probably due to us not testing the startup script dsmgui.sh on OSX, sorry 'bout that.

You should be able to start dtangler GUI if you run java with options that put the two jars (forms-1.2.0.jar, dtangler-gui.jar) in the classpath and use org.dtangler.swingui.app.Main as the main class.