Good ol' James, trying to pick the best of both
worlds.
I am with you buddy.  

--- James Margaris <[EMAIL PROTECTED]> wrote:

> Currently the code checked in is not a part of any
> namespace and is not
> prefixed with anything. We need some way to make
> sure our names don't
> collide with other names. (For example our Hashtable
> is going to collide
> with any other Hashtable class)
> 
> Typically the way this is done is either with a
> prefix like XapHashtable
> or with a "namespace" like
> org.apache.xap.util.Hashtable.
> 
> Prefix approach:
> Pros: Smaller code size, easier to type in.
> Cons: For large codebases doesn't divide code into
> logical units.
> 
> 
> Namespace approach:
> Pros: Divides code into logical packages. Works with
> auto-complete in
> some Javascript editors.
> Cons: Larger code size. Unlike in Java you can't
> import a package and
> use items from it, you have to refer to them by the
> full package name
> every time you create a new one. So you would have
> to do: new
> org.apache.xap.util.Hashtable(). This can get pretty
> verbose, and be a
> pain to type in and also make the code larger.
> 
> So I think there are two questions here. 
> 
> 1: What is the preferred approach.
> 2: For the preferred approach, what is a reasonable
> namespace/prefix?
> 
> My opinion is that a namespace approach is a lot
> more scalable and
> helpful for large projects, which this is. From
> there I would say
> org.apache.xap or simply xap as the base namespace
> makes sense.
> 
> My preference purely from a coding perspective would
> be simply xap as it
> will make the code a bit smaller and more
> manageable. Unlike in java the
> namespace being "com.XXX" or "org.XXX" is not a
> standard or a de-factor
> standard. Yahoo simply does YAHOO.xxx and Dojo does
> dojo.xxx.
> 
> I'm not how acceptable it would be to have Apache
> APIs that are don't
> begin with org.apache, maybe someone with more
> experience can speak to
> that.
> 
> This would be a good thing to resolve quickly
> because changing it all
> later is going to be more and more painful as more
> code is added.
> 
> Again to summarize, my preference would be a
> namespaced approach with
> "xap" as the namespace root rather than
> "org.apache.xap"
> 
> Opinions?
> 
> James Margaris
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

Reply via email to