atom feed5 messages in org.codehaus.sonar.userRe: [sonar-user] any plan for includi...
FromSent OnAttachments
Stefano FornariJan 15, 2009 11:26 am 
Freddy MalletJan 16, 2009 12:56 pm 
Stefano FornariJan 16, 2009 2:09 pm 
Buckel, WolfgangJan 19, 2009 2:07 am 
Freddy MalletJan 19, 2009 1:45 pm 
Subject:Re: [sonar-user] any plan for including jdepend metrics out of the box?
From:Stefano Fornari (stef@gmail.com)
Date:Jan 16, 2009 2:09:37 pm
List:org.codehaus.sonar.user

Hi Freddy, thanks for your answer first of all.

Let me start saying that I've never looked at the cyclic dependencies. What I think make JDepend extremely interesting is that is the only metric I know, and for sure available in sonar (and maybe even maven) that tells something about the design of a bunch of classes, as opposed to be a mere code metric based on coding style. It gives you a strong smell about your classes and how they are related each other. If you are going far from the ideal line you need to look at your design and see why. Very likely you will discover dependencies that your module should not have or that are bad designed. This goes very well together with maven because such dependencies are good candidates to become separate maven projects, which forces you to think about the relationships between the modules and your abstractions.

Is there any other metric that gives the same kind of information?

Regards, Stefano

Freddy Mallet wrote:

Hi Stefano,

We've studied jDepends integration (SONAR-94[1]) and don't want to just copy/past the JDepend Maven report as we think it is a bit useless. Indeed, each time I ask the following question to people around me : "Why do you use JDepend reports ?", the answer is always the same "To identify cyclic dependencies !". Even if, cyclic dependencies are definitely architectural flaws and should be hunted, JDepends has been initially developed from Robert Martin's thoughts about OO design quality metrics [2] which go far beyond the simple detection of cyclic dependencies.

Nevertheless, there's a big issue with those OO quality metrics as their values are often incorrect when working only at a Maven project or module level. Take the example of "Afferent Coupling" metric which is the number of other packages that depend upon classes within the package and which is an indicator of the package's responsibility. We have in Sonar a maven module "Sonar plugin API" whose "Abstractness" metric value is important but whose "Afferent Coupling" metric value is weak (with jDepend). Yet this module is highly used by others Maven module and its "Afferent Coupling" is in reality very high.

We've concluded that Robert Martin's OO metrics shouldn't be calculated at a project level but at a portfolio of projects level which is far more complicated.

On the other hands, we can also simply use JDepend to understand interactions between package (as Structure 101 can do). We can imagine to do such integration in Sonar and for instance to display a graphic on a project showing interaction between packages.

What's your expectations Stefano ?

Freddy

[1] - http://jira.codehaus.org/browse/SONAR-94 [2] - http://www.google.fr/url?sa=t&ct=res&cd=1&url=http%3A%2F%2Fwww.objectmentor.com%2Fresources%2Farticles%2Foodmetrc.pdf&ei=Y9iER8mwOqS6QNzRlOIP&usg=AFQjCNEkD0ytLR4RsHBdUDYgCkz-iXzzwg&sig2=p_vyZcHRNUmyGZWVg5y9Ag

On Thu, Jan 15, 2009 at 8:27 PM, Stefano Fornari <stef@gmail.com>wrote:

Thanks in advance.

Sonar , embrace Quality http://sonar.codehaus.org