[seam-dev] package naming conventions

Dan Allen dan.j.allen at gmail.com
Sat Apr 3 13:21:46 EDT 2010


Module writers,

For as much as we all enjoy discussing things like naming conventions (not),
I do feel that we need to establish some consistency across modules. Rather
than devising some arbitrary scheme, I'd rather build on the package name
choices that are coming out of the modules and try to align on what seems
natural.

Tihomir raised an important point with respect to qualifiers. When doing XML
Bean Config, the configuration is clearer if qualifiers are in their own
package so they can be bound to a unique namespace prefix. This
helps distinguish the qualifier elements from the class elements (like class
name, method, field, etc). As for other annotations, Seam has traditionally
put them in the "annotations" subpackage, which Shane has done in remoting
and security.

So far we have:

= use org.jboss.seam.[module] as your root namespace, where [module] is the
SVN folder of your module
= put qualifiers in the "qualifiers" sub-package (should it be singular
instead?)
= put annotations in the "annotations" sub-package (should it be singular
instead?)
= put event types in the "events" sub-package (should it be singular
instead?)
= where applicable, try to align your packages with those in CDI/Weld (for
instance, context implementations go in the "context" package)

We'll keep the conventions to the smallest amount possible. If you have
suggestions or changes, please bring them forward. It's up to you. But let's
remember that what we choose isn't all that important. We just don't want be
doing totally different things.

-Dan

-- 
Dan Allen
Senior Software Engineer, Red Hat | Author of Seam in Action
Registered Linux User #231597

http://mojavelinux.com
http://mojavelinux.com/seaminaction
http://www.google.com/profiles/dan.j.allen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/seam-dev/attachments/20100403/c3d027ad/attachment-0001.html 


More information about the seam-dev mailing list