List Info

Thread: Name space convention




Name space convention
user name
2006-08-10 22:47:40
Hi all,
  I am working on the report part of the CardDav draft
implementation
and I have a question about the name space, file/class
naming
conventions in Cosmo. Its more of a general question about
namespace/file naming in java programming language. 

Here is the question:

Say I have a package "a" and package
"b" with similar classes, for
example say "package a" has X.java, Y.java and
"b" also has similar
classes with same functionality as X.java and Y.java. Is it
good to name
the file as bX.java and bY.java in the package b? Right now
the cosmo
convention is to use this kind of approach (I think its
there to avoid
the confusion.
Eg:
org.osaf.cosmo.dav.caldav.Caldav*

For me it will be like

org.osaf.cosmo.vcard.VCard*
and 
org.osaf.cosmo.vcard.model.VCard*

I find it rather hard to see a directory full of VCard*, is
it a good
practice? 

On the contrary I agree that it might resolve some confusion
apart from
looking at the package name space while instantiating the
classes.

_______________________________________________
cosmo-dev mailing list
cosmo-devlists.osafoundation.org
http://lists.osafoundation.org/mailman/listinfo/cosmo-d
ev
Name space convention
user name
2006-08-10 23:47:30
On 8/10/06, Vinubalaji Gopal <vinuosafoundation.org>
wrote:

> Say I have a package "a" and package
"b" with similar classes, for
> example say "package a" has X.java, Y.java
and "b" also has similar
> classes with same functionality as X.java and Y.java.
Is it good to name
> the file as bX.java and bY.java in the package b? Right
now the cosmo
> convention is to use this kind of approach (I think its
there to avoid
> the confusion.
> Eg:
> org.osaf.cosmo.dav.caldav.Caldav*

we use this convention so that when referring to a class
it's easy to
understand the context of the class even if the class name
is not
package qualified. we also use it to distinguish the class
from its
superclass or an interface its implementing (eg
DavResource).
_______________________________________________
cosmo-dev mailing list
cosmo-devlists.osafoundation.org
http://lists.osafoundation.org/mailman/listinfo/cosmo-d
ev
[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )