ActiveState Powered by ActiveState

ActiveState Community


Extension(s) namespace

Posted by bcorfman on 2008-04-10 11:03
OS: All / Any

I see ToddW has gone with "ko.extensions.[name]" as his namespace on the TODO helper extension, while JeffG recommends "ko.extension.[name]" on the OpenKomodo blog.

I suppose it doesn't matter all that much, but what is the official pronouncement? If I'm making the change, I might as well be consistent (with something ... whatever it is). :)

Thanks,
Brandon

shanec | Thu, 2008-04-10 13:52

We have differing opinions and have not really formalized a recommendation. Here's my opinion.

Preferably, extensions do not add to the ko namespace if they are not a "system" extension. By "system" extension, I mean an extension that is shipped inside Komodo. At some point in the future, those will not appear in the extension manager. ko should be reserved as the komodo namespace itself, and avoid "pollution" from extensions since we do not necessarily know where we might add something in the future. I would suggest a namespace specific to your extension alone, perhaps using the name of the extension as the namespace.

I agree with Jeff's blog post, up to the suggestion to burry your extension in the ko namespace. This is especially true if your extension is meant to work with multiple mozilla apps.

jeffg | Thu, 2008-04-10 14:15

We probably should have had a meeting about this, I saw Todd using ko and assumed it was kosher? Brandon: sorry for the confusion, probably all related to pre-coffee coding or blogging.

--
JeffG

trentm | Tue, 2008-04-15 23:05

Yah, we should discuss it (here or one openkomodo-dev list) and formalize a best practice for this. I've been meaning to push to start a Komodo Extension developers guide somewhere (time to get the KIPS up and running).

Agree with Shane that extensions should stay out of "ko.".

My (limited) understanding from the java world is that "javax." is meant for "The extensions to standard java belong in the javax.* packages." (Source: http://mindprod.com/jgloss/javax.html No idea if that is at all authoritative.)

In any case, what do people this of: "kox.some_name_for_your_ext." (pronouced "ko-ex". E.g., "kox.todo", "kox.mozidl", etc.

bcorfman | Wed, 2008-04-16 04:59

I went with Jeff's altered recommendation on his blog -- extensions.knose. (Blog post conveys more authority than discussion thread.) It prevents me from clashing with sourcetree or others, and that's what I'm interested in. If you guys decide on something more formal, I'll change it later.

-->