The Artima Developer Community
Sponsored Link

Weblogs Forum
How Useful Are Code Metrics?

32 replies on 3 pages. Most recent reply: May 1, 2006 9:10 AM by Chris Chedgey

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 32 replies on 3 pages [ « | 1 2 3 ]
Jay Sachs

Posts: 30
Nickname: jaysachs
Registered: Jul, 2005

Re: Again, talking out of my *ss Posted: Apr 28, 2006 5:48 PM
Reply to this message Reply
Advertisement
> /* In what way did you customize the XSL?
> */
>
> Sounds like a job for SAX to me. But I'm sure you thought
> of that. Is there a reason to avoid SAX, or are you just
> trying to not roll your own? (which is a good thing to
> avoid).

The latter. JDepend comes with a pretty simple XSLT to transform the JDepend XML to DOT. If I had to start writing Java, I'd be more inclined to start customizing JDepend directly.

Jay Sachs

Posts: 30
Nickname: jaysachs
Registered: Jul, 2005

Re: How Useful Are Code Metrics? Posted: Apr 28, 2006 5:52 PM
Reply to this message Reply
> Now that I think more about it, I would rather just take
> java.* and javax.* off the diagram entirely, probably, as
> well as some other packages like log4j and such.

That's straightforward to do with a jdepend.properties file. I exclude everything not in the current project.

> But I did
> kind of want to combine everything under
> com.artima.jivecoupled.* under one package. We have a rule
> that certain packages can't talk to jivecoupled, because
> that's the legacy stuff that calls into Jive, which we're
> replacing. I don't care so much about the structure of
> jivecoupled itself, but would like to see one jivecoupled
> box on the diagram to make sure nothing depends on it that
> shouldn't.

You might be able to do that with the XSLT, creating a subgraph around the package(s) you're interested in.

> I am also planning on setting up some kind of script or
> tool that will enforce these package layerings by looking
> at the code, so it will be caught that way. But I somehow
> also would like to look at a dependency graph generated
> from the code.

I think you could do that by using XPath expressions into the JDepend output. We use that to detect cycles. It's pretty straightforward using either Ant or Maven.

Chris Chedgey

Posts: 14
Nickname: chgrs
Registered: Apr, 2006

Re: How Useful Are Code Metrics? Posted: May 1, 2006 9:10 AM
Reply to this message Reply
Bill, our beta is available (though not on the web yet). I think it will let you do what you want - please let me know if you'd like to give it a whirl.
http://chris.headwaysoftware.com

Flat View: This topic has 32 replies on 3 pages [ « | 1  2  3 ]
Topic: How Useful Are Code Metrics? Previous Topic   Next Topic Topic: Is Test-First Development an Impediment to Creative Flow?

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use