IBM has released a preview of a new free tool called Structural Analysis for Java (SA4J). The tools aims to automatically detect and pinpoint architectural weaknesses. This tool is a collaboration between the expertise of Rational with IBM's testing and analysis know-how. It uses algorithms to hunt out antipatterns.
"SA4J provides mathematically proven ways of determining the quality of the architecture, and this assessment can be used as a basis for deciding whether to reuse or modify existing Java code. If code is marked as unstable, even the smallest change in the architecture can result in unexpected delays in development as well as potentially more defects."
Links:
IBM looks to boost Java apps analysis
IBM releases new Java structure analysis tool
Structural Analysis for Java Home Page
-
IBM releases new Java structure analysis tool (16 messages)
- Posted by: Dion Almaer
- Posted on: March 01 2004 10:32 EST
Threaded Messages (16)
- What happened to SmallWorlds? by Alok Singh on March 01 2004 14:57 EST
- Architectural flaw detected by geoff hendrey on March 01 2004 15:32 EST
- This sounds like SmallWorlds II by Eric Stephens on March 01 2004 16:07 EST
- Yep, it is SmallWorlds by Alok Singh on March 01 2004 05:15 EST
- In other news... by Jim LoVerde on March 01 2004 15:01 EST
- IBM releases new Java structure analysis tool by Erik Bengtson on March 01 2004 15:11 EST
- IBM releases new Java structure analysis tool by scot mcphee on March 01 2004 15:34 EST
- IBM releases new Java structure analysis tool by James Hardy on March 01 2004 23:47 EST
- Great Tool... and a small Java shortfall by Nikolay Botev on March 02 2004 06:07 EST
- Not very stable by Charles Zhao on March 02 2004 13:06 EST
- Re: Not very stable by Jan Koops on March 03 2004 01:57 EST
- Not very stable by Mark N on March 03 2004 23:18 EST
- Re: Not Very Stable by Brian Lee on March 04 2004 10:01 EST
- An efficiency measurement tool that crashes! Wow. by Venkatesh Addanki on March 04 2004 09:15 EST
- An efficiency measurement tool that crashes! Wow. by Goran Begic on March 04 2004 11:52 EST
- Use DependencyFinder and read Robert Martin by Scott Stirling on March 02 2004 14:08 EST
-
What happened to SmallWorlds?[ Go to top ]
- Posted by: Alok Singh
- Posted on: March 01 2004 14:57 EST
- in response to Dion Almaer
Is this tool from the SmallWorlds codebase? After IBM bought the company, I haven't heard anything about the SmallWorlds product suite? As a former user, I think SmallWorlds was one the best graphical code analysis tools ever. -
Architectural flaw detected[ Go to top ]
- Posted by: geoff hendrey
- Posted on: March 01 2004 15:32 EST
- in response to Alok Singh
Architectural flaw detected: You are using Entity Beans!
hehehehe -
This sounds like SmallWorlds II[ Go to top ]
- Posted by: Eric Stephens
- Posted on: March 01 2004 16:07 EST
- in response to Alok Singh
After reading the BIOs of the software authors, one could presume that this is the follow-on to SmallWorlds after IBM bought it. -
Yep, it is SmallWorlds[ Go to top ]
- Posted by: Alok Singh
- Posted on: March 01 2004 17:15 EST
- in response to Eric Stephens
I guess it is Smallworlds, UI hasn't changed at all. Seems to be faster than the previous version. Still need to see how it performs with a larger code base. But, glad to see it availble again. -
In other news...[ Go to top ]
- Posted by: Jim LoVerde
- Posted on: March 01 2004 15:01 EST
- in response to Dion Almaer
IBM develops internal version of JDepend, packages it with a windows only installation tool, and releases it with accompanying fanfare and marketecture.
Oh wait, sorry for the duplicate posting. ;)
(On the plus side, hopefully this gets more people thinking about the importance of minimizing dependencies as it relates to future enhancements and maintenance. In a word: "architecture".) -
IBM releases new Java structure analysis tool[ Go to top ]
- Posted by: Erik Bengtson
- Posted on: March 01 2004 15:11 EST
- in response to Dion Almaer
just tested it. it's a tool that will help a lot on redesigning apps. -
IBM releases new Java structure analysis tool[ Go to top ]
- Posted by: scot mcphee
- Posted on: March 01 2004 15:34 EST
- in response to Dion Almaer
Anyone care to share their thoughts on this tool versus Jdepend and Pasta/Optimal Advisor? I really like Optimal Advisor but we could never get it to work under AIX as it seemed to be reliant on Sun.* classes that don't exist on IBM's AIX JDK. -
IBM releases new Java structure analysis tool[ Go to top ]
- Posted by: James Hardy
- Posted on: March 01 2004 23:47 EST
- in response to scot mcphee
Is this to compete with Wily and JProbe? Is the most common error message, you are using Websphere, run:) This looks interesting, as I have to use websphere a lot. -
Great Tool... and a small Java shortfall[ Go to top ]
- Posted by: Nikolay Botev
- Posted on: March 02 2004 06:07 EST
- in response to Dion Almaer
I have been trying to sell a project to rewrite a very poorly designed component of one of our clients' Enterprise Apps.
Now I can actually show my boss that this particular component has a stability rating of 62% according to SA4J, compared to 96% of the entire system.
And, now on the other end... I have been playing with it for a while, and I noticed something - this system cannot account for all relationships between object - in particular, it cannot weigh the dependency on constants: in the above system there are several instances of classes containing a large number of constants used throughout the application.
Due to the fact that Java resolves constants during compile time and does not store constant reference info in the .class files, the only thing that SA4J shows is that package A uses package B (i.e. a class in package A references a constant from a class in package B - I am guessing that the Java stores info about the "import B.*" declaration in the .class file).
...Anyway, I think this is a great tool, and luckily tiger comes right on time to save us from having to resort to poor practices like that with the introduction of enums. So that instead of writing (C/C++ style, in our case derived from a Win32 API practice):
class Constants
{
// SomeThings
final ST_A;
final ST_B;
...
// OtherThings
final OT_A;
final OT_B;
...
}
we can do
enum SomeThing
{
A,
B
}
enum OtherThing
{
A,
B
}
and even distribute those enums into different packages (where they would most naturally belong).
I know somebody might say we could have done the same thing with two classes, but the fact of the matter is this was not really the accepted practice so far, at least if you adhere the practices the core J2SDK APIs - just look at the Calendar class for an example... -
Not very stable[ Go to top ]
- Posted by: Charles Zhao
- Posted on: March 02 2004 13:06 EST
- in response to Dion Almaer
It crashes on a 40M ear file. -
Re: Not very stable[ Go to top ]
- Posted by: Jan Koops
- Posted on: March 03 2004 01:57 EST
- in response to Charles Zhao
I had to raise the heap to 768M and correct the W32-batch-file (Wrong main class stated in there) to get it our project analyzed (15k classes). For large code-bases you may also have a look at the Sotograph (www.sotograph.de), which simply fills a database with the metadata of your classes. You can then run your own or predefines queries on this db. -
Not very stable[ Go to top ]
- Posted by: Mark N
- Posted on: March 03 2004 23:18 EST
- in response to Charles Zhao
It crashes on a 40M ear file.
Maybe that it crashed on your app is analysis enough? :)
40Mb? Wow. What you got in there? -
Re: Not Very Stable[ Go to top ]
- Posted by: Brian Lee
- Posted on: March 04 2004 10:01 EST
- in response to Mark N
40Mb is not that big. Considering you'll have all the libraries used, all the wars , etc. 100Mb still wouldn't be that big. Think about all the images in just one war. -
An efficiency measurement tool that crashes! Wow.[ Go to top ]
- Posted by: Venkatesh Addanki
- Posted on: March 04 2004 09:15 EST
- in response to Charles Zhao
Wonder if they ran the tool on itslef first to see how efficient it is before using on other's applications. -
An efficiency measurement tool that crashes! Wow.[ Go to top ]
- Posted by: Goran Begic
- Posted on: March 04 2004 11:52 EST
- in response to Venkatesh Addanki
In fact yes. :) Interesting comments... It's always good to hear different opinions. The more constructive the better. ;-)
Goran -
Use DependencyFinder and read Robert Martin[ Go to top ]
- Posted by: Scott Stirling
- Posted on: March 02 2004 14:08 EST
- in response to Dion Almaer
A free tool that has all the salient features that SA4J does is DependencyFinder: http://depfind.sourceforge.net/. JDepend is similar, but not as accurate in dependency analysis, and doesn't have a GUI or a flexible suite of tools like DependencyFinder. Pasta (http://javacentral.compuware.com/pasta/), a free tool from Compuware, is similar and provides some refactoring support (that you'd probably never want to use), but the output graphs are nice looking. These all report on the same metrics that Robert Martin devised, and have varying degrees of finesses in displaying and reporting on the dependencies in your code. In my experience, DependencyFinder is by far the best.
Tools like this have been around for years for C++ and Java. Package dependency analysis and metrics based on packages' directional relationships and contents of abstract classes, interfaces, and concrete classes goes back to Robert Martin's 1996 "C++ Report" articles: http://www.objectmentor.com/resources/listArticles?key=date&date=1996. All rehashed in his recent "Agile Software Development: Principles, Patterns and Practices" book.