Tag Archives: cometd

CometD 2.5 Beta 1 Adds AMD Support

The CometD project just announced their first 2.5 beta, which adds AMD support to their Dojo-based JavaScript client, as well as their jQuery client with an AMD loader.

The release notes contain full details. They have set things up such that it will work with AMD syntax, and still work with the legacy dojo.require/dojo.provide syntax.

If you are using the require/provide syntax, you need to register a module path prior to requiring dojox.cometd:

dojo.registerModulePath("org", "../org");
dojo.require("dojox.cometd");

For AMD applications, either use the “tlmSiblingsOfDojo: true” configuration attribute, or use a configuration object specifying the “packages” field and map that to the location of cometd.

CometD 2.5.x ships updated demos that you can use as examples:

* Dojo 1.7 AMD-style demo: the Reload demo, the Chat demo
* Dojo 1.7 non-AMD demo: the Echo demo, the TimeSync demo

Please report any bugs you find to the CometD issue tracking system.

For Dojo 1.8, we will remove dojox/cometd from the repo, and add an svn:externals to the CometD project source code.