[hibernate-dev] api/spi/internal package split

Emmanuel Bernard emmanuel at hibernate.org
Mon Mar 28 13:36:05 EDT 2011


I'd say I like the current approach better than using spi / internal as top level.

The only think I would change is rename internal to some shorter version:
 - impl
 - private
 - hidden
 - ?

Another discussion we had on HSearch is whether or not use internal on the package name that is always bound to be private. For example say org.hibernate.search.util only contains private stuff, should we have org.hibernate.search.util.internal or can we keep org.hibernate.search.util

My opinion is that we should be consistent and use org.hibernate.search.util.internal

On 27 mars 2011, at 17:02, Steve Ebersole wrote:

> 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
> _______________________________________________
> hibernate-dev mailing list
> hibernate-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/hibernate-dev





More information about the hibernate-dev mailing list