Login Register

Namespace feature for DojoML has landed

Namespace support in markup provides an exciting new way to extend Dojo. By creating your own namespace, you can package new widgets for Dojo so they may be embedded in a page with familiar XML markup: <acme:button>Drop Anvil!</acme:button> Similarly, these namespaces may be specified on the dojoType attribute: <button dojoType="acme:button">Drop Anvil!</button> See the namespaces test for an example, or consult the documentation in the Wiki currently under development. In addition, namespaces now define mappings from widget names to JavaScript packages, such that dojo.require() statements are no longer necessary when using DojoML! You still must include dojo.widget.* for parser bootstrapping. This feature is on the trunk for 0.4. Special thanks to Shane O'Sullivan (IBM Ireland) for this patch. The old style custom widgets will be deprecated.

[...] The latest code drop

[...] The latest code drop for Dojo will surely lead to it’s dominance over mankind as we know it…. cue self patting on back [...]

[...] A quick note to say

[...] A quick note to say that my first code submission to the Dojo Toolkit project has been accepted and merged into the tree.  More info here, and the original changeset can be seen here. Proof that I do actually work occasionally Explore posts in the same categories: Uncategorized [...]

The demo page 'froze' a bit

The demo page 'froze' a bit as it was loading, taking awhile; is this the XML parser looking for the namespaced tags? How is this stuff implemented? It taxed the CPU for awhile, which doesn't bode well since there weren't really too many widgets on the page.

No, the namespaces code is

No, the namespaces code is not responsible for the pause. The issue is that the test dojo.js file does not have anything built in to it, as would be done in a production build, so each file has to be loaded separately via ajax calls. The maximum extra overhead the namespace can cause is one extra Ajax request per namespace (not per widget), and this can also be removed with a custom build that includes your namespace descriptor file in dojo.js. The dojo namespace is implemented using a hash lookup, so that's obviously very fast. The test namespace, myns, is implemented using simple string concatenation, eg "Check" -> "myns.widget.Check", so that too is very fast. There is nothing like loading lots of unneccessary files or trawling through directories going on. The purpose of having a namespace descriptor file is to avoid that. Shane

Changeset [4587] may have

Changeset [4587] may have helped a bit, as the table that drives the dojo namespace, src/namespaces/dojo.js, was not included in the build, so at least that one XHR hit was occurring in any case. But that should be a significant drag on the CPU... Are the demos driven by nightlies?

FYI, there's a limitation on

FYI, there's a limitation on IE that everyone should be aware of. Basically, IE is incapable of correctly parsing namespaced tags and their contents in vanilla HTML documents. It works for empty tags, but gets a bit confusing for compound cases. See the docs here for details: http://dojo.jot.com/WikiHome/UserManual/WidgetNamespaces The good news is that the dojoType attribute can be used consistently across all browsers, and the tags can be specified using namespace syntax (namespace:tagname) as a result of this same patch.

Peller, Does that apply to

Peller, Does that apply to IE7 too?

Guyz... What's this all

Guyz... What's this all about!? Can anyone give any place, where can we find the html-markup used by dojo?

I'm looking for attributes

I'm looking for attributes used by dojo with html tags

who - are you asking how

who - are you asking how Dojo widgets are embedded in HTML, or are you asking for the spec for all the widget names and their arguments? For the former, see http://manual.dojotoolkit.org/WikiHome/DojoDotBook/Book114 For the latter -- what you probably meant -- well, we're working on specing out all our widgets. I think that's supposed to live here: http://manual.dojotoolkit.org/WikiHome/DojoDotBook/Book102 But for the most part, the attributes are well documented in the code in src/widgets/*.js