Agile Zone is brought to you in partnership with:

Kirk is a software developer who has filled most roles on the software developer team. He is the author of Java Design: Objects, UML, and Process (Addison-Wesley, 2002) and he contributed to No Fluff Just Stuff 2006 Anthology (Pragmatic Bookshelf, 2006). His most recent book, Java Application Architecture: Modularity Patterns with Examples Using OSGi was published in 2012. Kirk is a DZone Zone Leader and has posted 77 posts at DZone. You can read more from them at their website. View Full User Profile

Question on Module Design

  • submit to reddit

Like last year, in my Agile Architecture - Technologies and Patterns session at SpringOne2GX, I asked the attendees the same three questions surrounding class, package, and module design. This year, I had roughly 80 folks attend the session, and here is the rough breakdown of the hands shown after each of the questions.

  • How many spend time designing classes, both the behavior of a class and the relationships between classes? About 80% of attendees raised their hands.
  • How many spend time designing packages, both the behavior of a package and the relationship between packages? Roughly 20% raised their hands.
  • How many spend time designing JAR files, both the behavior of a JAR and the relationship between JAR files? Again, about 20% raised their hands.

These are consistent responses to what I see elsewhere, as well. I was hopeful that since I was attending the Spring conference, a few more developers were leveraging OSGi and actually spending some time on module design. But that doesn’t look to be the case. Maybe modularity isn’t sexy enough? I suppose that’s just a bit more fodder for the argument that there is no migration path for modularity, and that we need better tools, tutorials, and educational materials to help us design modular software. Fact is, I had more than one person stop to ask me where they can find more information. And that’s why recently, I’ve been focusing my talks on what we can do today, right now, to design more modular software.

I know we’ll be there someday. After my OOPSLA tutorial this week, Alex Buckley stopped by and we chatted for a while on modularity in JDK 7. Whether it’s Jigsaw, OSGi, or both, we can’t be sure. But one thing is certain - modularity is coming to the Java platform, and while it might not be all that cool and exciting right now, it’s going to play a significant role in how we architect and design applications going forward.


Published at DZone with permission of its author, Kirk Knoernschild.


Pether Sorling replied on Sun, 2009/11/01 - 5:57am

To bad most developers don't care about designing package structures.

I Think XRadar is an excellent tool to define & validate the architecture, view example Xradar report  from my current project.



Christoph Beck replied on Sun, 2009/11/01 - 9:13am

For those interested in modularity, package and JAR design, STAN might be of interest. STAN is a structure analysis tool for Java, fully integrated into Eclipse. The latest 2.0 beta also provides OSGi bundle dependency graphs.

Pether Sorling replied on Sun, 2009/11/01 - 10:04am in response to: Christoph Beck

Normally use maven-depgraph-plugin to view jar dependencies. But will take a closer look at STAN.

Can also recommend Architecture rules , used it successfully to validate package design in projects before Xradar came along.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.