Login Register

Dojo 1.0.0 available on AOL CDN

The Dojo 1.0.0 release is available on AOL's Content Delivery Network (CDN). What does this mean for you? Just put in one script tag to start using the full power of Dojo 1.0. No need to install Dojo on your server.

More information (including an example page) is available at http://build.dojotoolkit.org/1.0.0/.

If you know how the CDN builds work, just change your Dojo script tag this:

<script type="text/javascript" src="http://o.aolcdn.com/dojo/1.0.0/dojo/dojo.xd.js"></script>

Awesome

This is great, I've been looking forward to this going live, great work.

Are there any obvious gotchas with the 1.0 version?

I'm assuming you still have to upload and link to the style sheets if you want the widgets looking peachy? Anything else?

The dojo and dijit style

The dojo and dijit style sheets should be up on the CDN. Just translate the local path to the CDN path. The CSS files on the CDN also have comments removed, which helps cut down the download size. If you want the commented ones, there are .commented.js files available. For instance:

http://o.aolcdn.com/dojo/1.0.0/dijit/themes/tundra/tundra.css
http://o.aolcdn.com/dojo/1.0.0/dijit/themes/tundra/tundra.css.commented....

There is one extra usability note: there is an issue with loading dojox.gfx. It is still possible to use it, but you have to use a normal script tag to load http://o.aolcdn.com/dojo/1.0.0/dojox/gfx.js instead of dojo.require.

More layers would be cool

Hi,

I've started using the 1.0 CDN files on site, and I must admit, it's very cool. However, one nice addition would be having many many more layers generated.

Take the use case where someone simply wants to put a single widget on a page, e.g. the dojox.image.Gallery widget. This causes over 30 script includes from CDN. While these are nice and fast, it still represents 30 HTTP requests, even if they're cached.

A nice solution is to have a custom build for the CDN servers, that builds a complete layer for every single widget in both Dijit and Dojox. Users can then simply include one JS file from the CDN and get everything they need. Also, a dijit layer that just includes _Widget, and another that includes _Widget and _Templated (and all their dependencies) would be very useful.

Now, I know there is the argument that we can't cover all possibilities, and that this is less use to people who want to use many facets of Dojo on a page. However for hobbyists, and people who just want to make use of small individual portions of Dojo, this could be quite compelling.

Of course this build is just for CDN

To clarify my previous comment, of course this build profile would not be the standard one used, it would be for CDN only (and anyone else who wants to use it of course)

Shane

There are some layers

There are some layers available with the CDN build -- they are the layers in the "standard" profile build. You can see them by looking at the build.txt file for the CDN build.

In particular, using dojo.require("dijit.dijit") seems to get what you need for dijit base, _Widget, _Templated, _Container and dojo.parser.

Using dojo.require("dijit.dijit-all") gets a set of widgets built together.

As you indicated, it is a bit tricky if we introduce more layers. Doing a special layer for each widget seems like overkill, but I can appreciate that there are widgets that load a set of files specific to their type that might benefit from a unique layer. dijit.Editor and dojox.Grid come to mind. What other ones do you think really benefit from a layer (assuming that dijit.dijit would be a layer dependency for any widget layer)?

More layers = good

The dijit layer does include the parser, _Widget and _Templated, but it also includes the Layout and Form widgets by default, which many people will not want to use. It would be better if the dijit layer had just:

dojo.require("dojo.parser");
dojo.require("dijit._Widget");
dojo.require("dijit._Templated");
dojo.require("dijit._Container");

With regards to it being overkill to create a layer for each widget, I have to disagree. It's not like AOL will mind the extra megabyte or two of storage, and it will be a nice performance boost. The larger widgets, like Editor and Grid, will benefit most of course, but even smaller widgets will run more quickly.

If that is thought to be too fine grained an approach, it would at least be good to get a layered build for each of the dojox projects, including all scripts needed by any of the files in a given project.

bummed

Ouch. Was so excited about this but rapidly lost that when I found 1.0 less stable than 1.0 rc. I went from .9 to 1 beta to 1 rc with next to no problem. Lots of little things like failure to clean up debuging code. Widgets not working right. At least in the tools that I'm using this seems to be the case. Has all the taste of a rushed release. Which is sad because dojo rocks like nothing else out there.

I'll hunt down and submit more bugs next week but I've got a deadline right now.

CDN For a Production Environment?

Using the CDN makes a lot of things easier when developing, especially for those of us who have to host the dojo objects in a deployed war file. Spent a lot of time tracking down missing js files, and even found a bug in the container group.

But my question is this: Should the CDN be used in a production environment? It is AOL, of course, which should be up and running 24x7, but would like to know folks opinion on this.

Using it means you have a

Using it means you have a 3rd party dependency, and therefore have extra risk since you do not control that dependency. And AOL does not make any guarantees (see bottom of the page).

I would expect performance to be better for you if you do your own xdomain custom build and can host on servers you control. If you use lots of widgets, there tend to be a fair amount of network requests to get the files, so custom builds can help in that case.

I have used the CDN build for a production environment, but I work for AOL. However, I have no control over the CDN performance though, so in a way it is still a 3rd party dependency for me. Since AOL does not explicitly guarantee anything about the build (including its continued availability), if you do use it, be sure you have an alternate plan.

CDN Link for 1.0.1

Does anyone know when the CDN link will be available for the lastest release?

Below URL doesn't work as it did for 1.0.0

http://o.aolcdn.com/dojo/1.0.1/dojo/dojo.xd.js

There is no 1.0.1 build on

There is no 1.0.1 build on the CDN yet. I was on vacation at the time of the 1.0.1 build, and there are plans to do a 1.0.2 build in the next week or two, so I will probably just wait for that build to put up on the CDN and skip 1.0.1.