[hibernate-dev] api/spi/internal package split
Steve Ebersole
steve at hibernate.org
Sun Mar 27 11:02:58 EDT 2011
OK, now that we have been doing this for a few months and have some actual
experience, I wanted to circle back and talk about this notion of splitting up
packages to denote api/spi/internal intent.
Not so much "should we do it". I think we absolutely should to help do osgi
stuff a little later and now (new major rev) is the time to be changing up
packages.
Not, more I mean the specifics of how we will do this. Currently we took the
approach (mostly) that these distinctions are leaves (as in plural leaf) in
the package name. So for example, we have:
1) org.hibernate.service (api)
2) org.hibernate.service.spi
3) org.hibernate.service.internal
On the plus side this keeps related stuff grouped together. Everything under
org.hibernate.service we know relates to the notion of services. Everything
under org.hibernate.engine we know deals with the internal engine. etc
On the downside (imo) this creates lots of packages. To see what I mean, just
take a look at https://github.com/hibernate/hibernate-
core/tree/master/hibernate-core/src/main/java/org/hibernate/service
The only other option I saw was to make api/spi/internal the top level
packaging construct:
1) org.hibernate.service (still api)
2) org.hibernate.spi.service
3) org.hibernate.internal.service
What's been everyone's experience(s) here?
---
Steve Ebersole <steve at hibernate.org>
http://hibernate.org
More information about the hibernate-dev
mailing list