Wednesday, December 21st, 2005

Dojo: Framework? Library? Toolkit? and using CDNs…

Category: Dojo, Editorial

Alex wrote about whether Dojo is a framework or a library. He talks about how he sees it as a library:

One of the words that I hear used to describe Dojo a lot is “framework�, and it always causes me some concern when I hear it. Frameworks tend to control the way an applications is structured and manage them from the outside, but Dojo provides multiple points of entry. Internally, Dojo is just a layered set of libraries.

I think I see Dojo in the same way, but sometimes stray into “JavaScript framework” land, as once you get into Dojo you start thinking “Man, I should make that a Dojo widget”, and pretty soon you are building on top of Dojo, and when you build on something it feels more framework-y.

Alex also goes on to show the package system, which most people don’t know about. This system allows you to build the set of libraries that YOU need for your project. This can save you quite a few KB.

Talking of distribution. There has been a request to host libraries such as Dojo, Prototype, Scriptaculous, on a CDN.

The feature that would be nice here is to be able to do this via something like the Dojo package system and say:

dojo.require(“dojo.io.*”, “0.3”);

Baking versions in, and having the right stuff come down automagically. If this was shared on a CDN, then if site A had requested this, and site B needs the same thing, the browser doesn’t have to have multiple versions. It can be right there.

Posted by Dion Almaer at 9:54 am
7 Comments

+++--
3.6 rating from 19 votes

7 Comments »

Comments feed

I left a short comment on Ian’s website: I think you will get JavaScript-across-domain security errors if you load the JS-files via a CDN and load your own files from your own server. For Backbase.com we’re therefore using a 3rd party CDN service with a reverse proxy setup (Mirror Image).

Comment by Jep Castelein — December 21, 2005

You will not. You will miss out on XMLHttpRequest connectivity between client and host, but there is no need for that to cater for the needs of just setting up a system like this. Adding some callback dynamicity as does JSONP, or devising some similar, well thought out callback system, is all it takes to implement this idea.

Since I agree this ought to happen, I have developed the idea a bit further in a recent post of mine.

Comment by Johan Sundström — December 21, 2005

Ah, yes, I forgot; Ajaxian strips out hyperlinks. http://ecmanaut.blogspot.com/2005/12/central-hosting-of-all-javascript.html

Comment by Johan Sundström — December 21, 2005

[…] Back in December we talked about hosting JavaScript on CDNs. […]

Pingback by Ajaxian » Hosting JavaScript on CDNs? AOL announces the hosting of Dojo — January 30, 2006

why dojo is good, why we are going to use in project,
featers & usefulness & why we use this in any project.
Please send me reply….

Comment by amita — February 24, 2006

I think dojo and rico have many features in common.

Comment by paketim.com — May 17, 2006

Fresh Logic Studios Scripts is an object oriented JavaScript framework with a programming model similar to the Microsoft .NET Framework.

We created this to help save us some time in developing our own products and didn’t feel it was fair to keep this work all to ourselves. Inside you’ll find JavaScript implementations for a small subset of the classes provided by the .NET Framework base class libraries.

Fresh Logic Studios Scripts is lightweight, weighing in just over 10KB. Download the library, view examples and documentation @ http://scripts.freshlogicstudios.com/

Comment by Shawn Miller — October 3, 2006

Leave a comment

You must be logged in to post a comment.