Daan is a software developer with a strong focus on interaction design. Mainly developing in Java. He likes Agile methodologies, and has worked many years with Scrum. Besides work, he absolutely loves experimenting with new (or old!) technology. Daan's blog can be found at http://stuq.nl. Daan has posted 8 posts at DZone. You can read more from them at their website. View Full User Profile

1942 Classes: Statistics About Spring 2.5

  • submit to reddit

Frameworks are growing with every release. Classes are changed, removed and added. In this series I zoom in on some well known projects and analyze their class names with completely meaningless statistics. First: Spring 2.5.

To get these statistics, I wrote a script that analyzed all classes. They get chopped up on word boundaries, so for ContextAwareFactoryBean the words Context, Aware, Factory and Bean are counted. From the output I generated a Class Cloud.

Spring is a framework of Factories, Beans, and Exceptions

There are 1942 classes currently in Spring. Of those, 213 classes contain the word Factory. Even more classes contain the word Bean. Spring is clearly a framework that loves factories and beans. There is even a FactoryBean class.

Another high score partial class name is the Exception. Exactly 197 classes have that in their class name. From the humble BindException to the fine-grained JdbcUpdateAffectedIncorrectNumberOfRowsException.

Class Cloud (click to enlarge)

Spring 2.5 statistics Class Cloud

Top 10 of partial class names

  • Bean: 239
  • Factory: 213
  • Exception: 197
  • Abstract: 158
  • Context: 112
  • Source: 97
  • Utils: 89
  • Transaction: 85
  • Resolver: 79
  • Request: 78

Longest class name

The grand prize goes to two classes: AbstractInterruptibleBatchPreparedStatementSetter and AbstractTransactionalDataSourceSpringContextTests

Both have a length of 49 characters!

Stay tuned for more useless statistics for other well known projects! If you have suggestions for which projects you want to see, please let me know in the comments!

From http://stuq.nl

Published at DZone with permission of its author, Daan van Etten.

(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)


Jeroen Wenting replied on Tue, 2008/12/02 - 5:08am

and to think Spring was created because EJB was too big, cumbersome, complex, and heavyweight :)

Ronald Miura replied on Tue, 2008/12/02 - 8:36am

I agree with you, completely useless :)

Yevgeny Nyden replied on Tue, 2008/12/02 - 9:44am in response to: Jeroen Wenting

[quote=jwenting]and to think Spring was created because EJB was too big, cumbersome, complex, and heavyweight :)[/quote]

... still, I don't think you can consider the core Spring functionality "...too big, cumbersome, complex, and heavyweight" comparing it to what EJB used to be (prior v3).

Mario León replied on Tue, 2008/12/02 - 11:49am

This are funny and useless statistics, that's for sure ;)

Brian S O'Neill replied on Tue, 2008/12/02 - 12:04pm

How about Java 6?


Daan van Etten replied on Tue, 2008/12/02 - 2:29pm

Just finished the statistics about Wicket: 8.47% is a Resource: statistics about Wicket

Daan van Etten replied on Tue, 2008/12/02 - 2:29pm in response to: Brian S O'Neill

@Brian: Nice!

Jeroen Wenting replied on Wed, 2008/12/03 - 5:47am in response to: Yevgeny Nyden


[quote=jwenting]and to think Spring was created because EJB was too big, cumbersome, complex, and heavyweight :)[/quote]

... still, I don't think you can consider the core Spring functionality "...too big, cumbersome, complex, and heavyweight" comparing it to what EJB used to be (prior v3).


Depends on how you see it. Spring of course does far more than EJB ever did, and as such can be larger.
But one has to wonder whether it might not be better to split it into several (sub)projects that are (more or less) independent, a more modular structure than is currently the case where you have to Spring the trap on the entire elephant (which was one of the main criticisms of EJB1/2) rather than take just the bits you want without having to bother about the rest.

Personally, I have used Spring in its 1.x and 2.0x incarnations, but really only the IOC/DI container. And even for that you have to work your way through hundreds if not thousands of pages of books and documentation in order to really figure out how it all works if you want something that's a bit different from what the defaults provide.

Liam Knox replied on Thu, 2008/12/04 - 6:19am

I really think you posted this on the wrong site, shouldnt this be on



Martin Flores replied on Thu, 2008/12/04 - 10:57am

Hi Brian - nice work. Apart from Srping and Wicket do you are working in another statistics right now?

Daan van Etten replied on Thu, 2008/12/04 - 2:43pm in response to: Martin Flores

Hi martinicr,

I'm currently working on the Tomcat statistics. If you have requests for other projects, let me know!

Daan (not Brian ;-)) 

Martin Flores replied on Thu, 2008/12/04 - 3:36pm

Oops... sorry... you know the names confusion. So believe it or not we found your class cloud very interesting for that reason a couple of friends and me... (classic java geeks) are thinking to put your graph in a t-shirt so I would be interesting count with several versions of class cloud. We work with Spring, Struts2, Hibernate, Tomcat... so if you are planning to create more cloud classes will be happy to create a collection jajaja.



Daan van Etten replied on Thu, 2008/12/04 - 4:13pm

Hi martinicr, what a great idea! If you like, you can send me your email address. I'll start working on the stats for the projects you mentioned.

When I finish the clouds I will send them to you. (My email is my first name @ stuq nl)

Niels De Feijter replied on Fri, 2008/12/05 - 2:47am

Hi Daan,

Very nice! Are you planning to share you script with the rest of the world? I would love to hang the walls of our software architect's cubicle with pictures generated from our own products :)


Daan van Etten replied on Fri, 2008/12/05 - 3:07am

Hi ndefeijter, I plan to share it in some way in the future. First finish this (busy) month. Daan

Comment viewing options

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