BT

New Early adopter or innovator? InfoQ has been working on some new features for you. Learn more

SonarJ Community Edition Offers Architecture Analysis and Management for Java Applications

| by Srini Penchikala Follow 6 Followers on Feb 09, 2009. Estimated reading time: 4 minutes |

SonarJ Community Edition offers architecture analysis and management for small to medium size Java applications. hello2morrow, the company behind SonarJ software, recently launched the free version of the architecture analysis tool. The community edition can be used to analyze Java applications with upto 500 internal classes (approximately 50 to 60 KLOC).

Architecture management can help with clear and cycle free dependency structures as well as improve testability and reusability of code. Software architects can use SonarJ to define architecture and quality rules, which will then be monitored in the IDE (Eclipse) on the developer's workspace. Tools like SonarJ help the architects to integrate architecture management earlier in the development process.

InfoQ spoke with Alexander von Zitzewitz, CEO of hello2morrow, about the motivation behind releasing the community edition and the future road-map of SonarJ project.

What was the motivation behind the release of community edition of SonarJ?

Our old pricing model was based on the number of users using SonarJ, but independent from the project size. But the benefit of SonarJ is closely related to the size of the project. Although SonarJ was already free for open source and non-commercial use, we have been approached by many developers to offer a low cost personal license. We also saw, that many projects are still using very basic dependency checking tools like JDepend or Macker. With SonarJ we had a solution that was far superior, but only available to larger projects with a tool budget. So we were thinking about a way to make our solution available to a much larger user base without seriously eroding our revenue base.

We decided to add the project size as a second parameter to the pricing model. We also decided to make SonarJ free for projects with up to 500 classes. This limit already supports the majority of projects and equals about 50 to 60 KLOC. We wanted to make sure that the Community Edition of SonarJ could be used on serious projects. So users can reap the benefits and save time and money by avoiding all the bad consequences of structural erosion.

To make the equation complete, projects with up to 3000 classes pay less for a commercial license than before, bigger projects have to pay more. We think that this approach is much more balanced and fits well with the value provided by integrating SonarJ into the development process.

How does SonarJ compare with other tools like Structure 101?

Structure101 is a powerful tool with a good intuitive user interface. Like SonarJ it supports the definition of an architecture model. On the other hand I think that our architecture meta model and the way we visualize the architecture fits better with larger projects. SonarJ supports the concept of a larger project split into subprojects and not only supports horizontal, but also vertical slicing of projects. Although you can achieve a similar thing in Structure101 by creating two or more separate architecture models, this requires more effort and is not really intuitive. For larger projects the vertical cutting (creation of vertical slices) is a very important technique to keep the size of architectural artifacts manageable.

How does SonarJ tool help with design and architecture enforcement compared to other techniques such as using Aspects, Code Inspections or Model Driven Architecture (MDA)?

First of all using SonarJ is completely non-intrusive and can be used on any Java project, new or old. Using aspects is quite intrusive (you have to integrate AspectJ into your build process) and is not really backed by an architecture meta model. Although you can define powerful restrictions there is never a guarantee for completeness. Every architect will probably use a different style of restrictions. Moreover I think that the complexity of defining a serious set of restrictions tends to get out of control quickly. The architecture meta model behind SonarJ makes it easy to make sure, that you have a complete coverage of all the dependencies in your code.Neither the code nor the build process needs to be touched to use SonarJ.

Code Inspections are not a serious alternative to automatic checking of architectural and quality rules. It takes way too much time and there is a great risk of overlooking serious structural problems.

MDA is another strategy to create applications. If most of the code is generated the benefit of analyzing the generated code for architectural flaws is probably quite small. A good code generator will hopefully make sure, that the structure of the generated code is clean. So if you are using MDA successfully and most of your code base is generated you will probably not need SonarJ.

What is the future road map of SonarJ project?

Currently we are working on release 4.1 which is scheduled for March of 2009. The focus of this release is improved usability and some fine tuning of our architecture meta model. Later this year we think about adding plugins for other IDE's like IntelliJ or NetBeans. We also might launch a C# version of SonarJ called SonarShark.

Rate this Article

Adoption Stage
Style

Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Tell us what you think

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Lattix as a nice alternative by Han van Roosmalen

Thanks Srini,

Though I like the workings of SonarJ. I must add that it has more competitors then Structure 1on1 or JDepend.

Both with SonarJ and Lattix you will be able to create logical architecture diagrams and monitor and prevent architecture erosion during the application life cycle, which is absolutely required if you want to keep a quality rich, agile and most desired a maintanable application.

Lattix takes a slightly different approach by using a Dependency Structure Matrix and does not show detailed graphs. This means that you will see the Desired vs. the realised architecture implementation in a single matrix. This matrix scales extremely well for large systems. Personally I like this approach since the matrix is very easy to set-up and maintain. It takes about half an hour to understand the basics of both the approach as well the tool usage. In most cases SonarJ and Lattix are comparable except for the approach.

So I like to propose when evaluating an architecture tool that is not only suited for Java, C, C#, but also for Delphi, Ada, Cobol, Spring, Hibernate, Oracle (database and PL/SQL), MS SQL Server and Sybase SQL, that you at least trial Lattix as well as SonarJ and see for yourself what works best for you.

More information on Lattix and a downloadable trial can be found at: www.lattix.com

Han van Roosmalen
Software Architect
(www.software-architectuur.nl)

Re: Lattix as a nice alternative by Alexander von Zitzewitz

I agree that Lattix definitely belongs to the alternatives in our market segment and covers more platforms than we do.

But I should mention that the SonarJ Exploration View provides exactly the same information as the dependency structure matrix in a graphical way. Instead of using cells we use bows of different thickness depending on the number of dependencies. Bows on the left side represent cells in the lower left half of the matrix, bows on the right side represent cells in the upper right half.

Alexander von Zitzewitz
hello2morrow Inc.

Structure101 by Ian Sutton

As one of the guys behind Structure101 (and so not maximally objective ;-), I should comment briefly on your view of how SonarJ compares.
SonarJ supports the concept of a larger project split into subprojects and not only supports horizontal, but also vertical slicing of projects. Although you can achieve a similar thing in Structure101 by creating two or more separate architecture models, this requires more effort and is not really intuitive.

Not surprisingly, I can't agree with the last bit. Personally, I much prefer several diagrams, each telling their own little story, to attempting to fit everything into a single monolithic diagram. I also suspect that this approach scales better. But, like I say, I'm not the most objective judge of these things…

Cheers,
Ian

Re: Lattix as a nice alternative by Srini Penchikala

Hi Han,
Lattix tool looks interesting. I have used SonarJ and Structure 101 in the past, so I am curious about how Lattix compares with these tools. I will check it out.
Thanks
Srini

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

4 Discuss

Login to InfoQ to interact with what matters most to you.


Recover your password...

Follow

Follow your favorite topics and editors

Quick overview of most important highlights in the industry and on the site.

Like

More signal, less noise

Build your own feed by choosing topics you want to read about and editors you want to hear from.

Notifications

Stay up-to-date

Set up your notifications and don't miss out on content that matters to you

BT