76 Events: statistics about Hibernate 3.2.2
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. This is the analysis of Hibernate 3.2.2.
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.
What is Hibernate?
Hibernate is a free, open source Java package that makes it easy to work with relational databases. Hibernate makes it seem as if your database contains plain Java objects like you use every day, without having to worry about how to get them out of (or back into) mysterious database tables.
Hibernate listens very carefully
What immediately catched my eye was the amount of classes with Event (76) or Listener (52) in their name. There are many events in Hibernate which can be catched. These events can have some related classes, like:
- the event itself (for example the AutoFlushEvent)
- an interface (the AutoFlushEventListener)
- a default implementation (the DefaultAutoFlushEventListener)
It almost surprised me there was no AbstractAutoFlushEventListener or a AbstractAutoFlushEventListenerFactory!
Factories
There are 57 factories, which is quite a lot outside of an industrial park. A lot of stuff can be created using factories, for example the BasicProxyFactory, the CGLIBProxyFactory, the CacheFactory, the ClassicQueryTranslatorFactory and the MapProxyFactory. I would guess this is the most popular design pattern within the Java world. Factories are everywhere.
Types and Collections
Luckily, there is also a lot of stuff directly related to the goal of Hibernate. There are 85 classes with Type in their name, and 54 have something to do with a Collection.
There are basic types like the FloatType and IntegerType. Advanced types like the OrderedMapType and the OrderedSetType. PersistentCollection and BasicCollectionLoader. These class names look quite good!
Class Cloud (click to enlarge)
Top 10 of partial class names
- Type: 85
- Event: 76
- Factory: 57
- Collection: 54
- Cache: 53
- Exception: 53
- Query: 53
- Listener: 52
- Entity: 47
- SQL: 39
Longest class name
The longest class name of Hibernate is the CollectionFilterKeyParameterSpecification, with 41 characters!
The API documentation describes this class:
A specialized ParameterSpecification impl for dealing with a collection-key as part of a collection filter compilation.
I thought API documentation was meant to clarify? At least the above contains some pointers (like the ParameterSpecification).
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!
This article is a part of the 'Java Project Statistics' series
Here are all the articles in this series:- 1942 classes: statistics about Spring 2.5
- 8.47% is a Resource: statistics about Wicket
- 37 Factories: statistics about Tomcat 6
- 76 Events: statistics about Hibernate 3.2.2
Subscribe |



How you do that cool Class Cloud?
Hi Mark,
I use Wordle.
- Daan
76 Events: statistics about Hibernate 3.2.2…
[...]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. This is the analysis of Hibernate 3.2.2.[…
Leave your response!
(What is RSS?)
.read popular posts
.recent comments
.categories
.blogroll
.now reading
Currently reading:
Recently finished:
View all books
jWeekend
jWeekend: Intensive, 1 and 2 day Java Technology, OO, JPA, Spring courses for busy people.
Recent Posts
Twitter
About
I'm Daan, and this is my blog. I'm a Java software developer, and at work we build great software for the education market. We use Scrum and are experimenting with Kanban.
We use things like Java, Spring, Hibernate, Wicket, and OSGI.
Feel free to contact me via Skype.