PDA

View Full Version : new namespace convention



sjivan
4 Jan 2007, 7:06 AM
On his blog, Jack wrote :

I've already introduced a new namespace in 0.40, Ext. (e.g. Ext.BasicDialog instead of YAHOO.ext.BasicDialog)

Can you use the Java package convention instead ? ie ext.BasicDialog instead of Ext.BasicDialog?

moraes
4 Jan 2007, 10:37 AM
Can you use the Java package convention instead ? ie ext.BasicDialog instead of Ext.BasicDialog?
I prefer anything that follows a more or less strict convention, and if the convention is "namespaces and classes start with uppercase", it's probably better to use Ext.

Btw, I see the Ext namespace as a move to drop the YAHOO namespace one day. Is this correct? I think this would make sense. Yes, it would break compatibility but it is a find & replace operation to put everything working again.

Also, it would be nice to have a "code conventions" page on the wiki (I'm sorry but I'm in a rush this month due to a release, but when things calm down I'll be back and contribute with some wiki pages ;-)).

jack.slocum
5 Jan 2007, 9:43 AM
I would love to use ext instead of Ext, but it may clash with local variables. Ext is already pushing it but I doubt there will be variables named Ext (at least I am hoping). Package names should be lowercase (and all sub packages will be) but the root namespace has to be capital to prevent conflicts with local variables.

Btw, I see the Ext namespace as a move to drop the YAHOO namespace one day. Is this correct? I think this would make sense. Yes, it would break compatibility but it is a find & replace operation to put everything working again.

Yes the YAHOO namespace is going away. I can't wait! It will remain backwards compatible though, as I will alias Ext as YAHOO.ext and keep code working.

sjivan
5 Jan 2007, 10:11 AM
Btw, I see the Ext namespace as a move to drop the YAHOO namespace one day. Is this correct? I think this would make sense. Yes, it would break compatibility but it is a find & replace operation to put everything working again.

Yes the YAHOO namespace is going away. I can't wait! It will remain backwards compatible though, as I will alias Ext as YAHOO.ext and keep code working.

Since YUI-ext is morphing into a full blown library which uses some YUI classes / concenpts rather than an extension of YUI, does a package name "Ext" make that much sense? It's kinda a general non defining namespace. Have you considered coming up with a real name for this project? If not, does "YuiX" have a better ring than "Ext"? Just thinking out loud.

Sanjiv

moraes
5 Jan 2007, 10:19 AM
Since YUI-ext is morphing into a full blown library which uses some YUI classes / concenpts rather than an extension of YUI, does a package name "Ext" make that much sense? It's kinda a general non defining namespace. Have you considered coming up with a real name for this project? If not, does "YuiX" have a better ring than "Ext"? Just thinking out loud.
I was thinking about this yesterday, Sanjiv, and after questioning the meaning of the name I concluded that "Ext" could actually be a good name, unless there is already a javascript library with a similar name. Because YUI-ext provides a series of tools to extend Javascript itself and our power to make nice looking applications. Well, I think that Ext is fine, sexy and short. Unless there was some other very nice name (like "Koopaloopa" :lol:), how would we call it?

just my 0.02. ;-)

PS: remember that YuiX still makes reference to YUI, so I guess this is not an option.

jack.slocum
6 Jan 2007, 6:15 AM
sjivan,

I'm with moraes, I really like Ext. It's short and sweet. Also, I think it allows the existing "brand" awareness for yui-ext to not be completely destroyed.

Like moraes noted, the meaning is a little different than "Extensions". The idea is to have a new tag line along the lines of "Extending the web experience" or "Extended JavaScript Components" or "Extend your web application" (I am open to suggestions). :)

indy
28 Jan 2007, 10:53 AM
(I am open to suggestions). :)

Hi Jack. What you think of name JSUI ( JavaScript User Interface ) ? :wink:

http://62.149.229.7/126/images/js-ui.gif

jack.slocum
28 Jan 2007, 12:11 PM
I thought about different things with UI, the only problem is it "feels" like a Yahoo UI rip off in some way.

ilazarte
29 Jan 2007, 6:44 PM
second vote for Ext. I like it because it sounds foundational and no-frills :)