Wednesday, May 17th, 2006
Category: Articles
, Dojo
, Examples
, Library
<
>p
>A common complaint issued against
Dojo is the lack of quality documentation, particularily as development moves so quickly and old docs become out of date. While there is some work going on to add inline “javadoc” style docs to the code, there is a new
HelloWorld article available, written by Lance Duivenbode. It walks through Dojo’s event, IO, and widget systems.
Lets hope its a first step in a series of more in hands-on articles for Dojo.
- Java 7 Hello World: A Simple Program for the JDK
This tutorial simply demonstrates how to write, compile and run a simple Java program. The second in a series of tutorials on Java 7, the main goal...
- Hot skills: Dojo encourages Ajax innovation
What is it? In April 2006, a reviewer provided a round-up of 50 different Ajax frameworks and toolsets - and the number has certainly increased since...
- Writing a WF "Hello World" application
Windows Workflow Foundation makes it easier for developers and their colleagues to build workflow-enabled apps. What better way to get started than a...
- Ajax Learning Guide
Chances are, you've been doing JavaScript and XML developer work in Lotus Domino for quite some time. This old/new approach is causing quite a stir in...
- Ajax Learning Guide
Are you a Web developer? The time has come to rethink your entire approach to developing Web applications. Find out about the Ajax approach...
3.5 rating from 135 votes
Good to see some Dojo docs.
I hate to bring up the Dojo Doco issue again, but after seeing Alex’s talk last week, I now realise there’s another audience for which the doco is critical. Not end-developers, but toolkit/library manufacturers. There’s a lot of potential in Dojo’s packaging as a de facto industry standard, but toolkit manufacturers need a clear message in order to incorporate it into their own products.
If I understand correctly, a product like Mochikit – which does take advantage of Dojo packaging – can still be used completely independently of Dojo and without any interference. Furthermore, the overhead of including the Dojo bootstrap etc is only 5kb of compressed Javascript, so the performance is almost always going to better than pulling down several separate, uncompressed, JS files for a given library.
re: tests
The new dojo web site at http://www.dojotoolkit.org has a very nice interface for the tests.
I tried to try some demos on dojotoolkit.org, but they completely hang my IE (100% CPU ad infinitum). Don’t tell me they didn’t test these demos in IE?
I believe in Dojo, much, much more than in those other libraries whose name I try to avoid. And Alex seems very intelligent, judging from his talks.
But I can’t understand why they would publish something that doesn’t work. (tested at a collegues machine as well).
I’ve just had similar experiences in IE.
nearly 200Kb of javascript for a crappy button and a simple xmlhttprequest is just daft.
My IE 6.0 also hangs ad infinitum when calling for any “View Demo” from “see it in action” tab on new 3.0 powered site. Shame on Dojo to release such erroneous behavior.
We’re looking into it. It works with some versions of IE 6, and crashes other versions of IE 6… lots of fun.
Obviously it’s not just a button, but demos of all of the widgets in dojo. We’ll get it licked asap.
Dylan,
My version of IE is 6.0.2900.2180.xpsp_sp2_gdr.050301-1519.
(The same I’ve found reported on Dojo-interest).
Operating System: Microsoft Windows XP
Windows version: 5.1
Build number: 2600 Service Pack 2
Regards
Things seem to be worse than I thought.
1. Each time I resize IE6 window with http://www.dojotoolkit.org (with default “news & announcements” tab active), browser reloads picture http://www.dojotoolkit.org/dojo/src/widget/templates/soriaButton-r.gif (as I can see from messages in status line – BTW unaccessible by “access denied” when typed directly into URL).
2. After activating “see it in action” tab, and just hovering thru buttons below Categories, the same picture is tried to be downloaded as long as mouse pointer scans thru buttons. This is weird.
3. After resizing browser window, all buttons below “Categories” title DISAPPEAR.
Hope my observation will be helpful.
From the article: “Using document.getElementById will not work since the DOM has been modified by Dojo. ”
I guess it loses points because this is clearly not “Unobtrusive Javascript.” I mean, hell, it modifies the DOM? Apparently I’d have to either commit to Dojo 100% or I can’t use it at all. I clearly can’t use it in conjunction with all the other code I’ve written, since the code I write relies heavily on getElementById()
Currently, I cannot reproduce issues 1. and 2. mentioned earlier in my post. Issue 3 (and “of course” hanging IE after calling demo) still remain.
I can’t even get to the page to read the Hello World article. With all due respect, I think the brilliant developers of Dojo are in serious need of Product Manager that’s been around the development block a few times.
I was on the path to using Dojo and DWR but now I am having serious second thoughts.
It is nice to see that all my issues reported earlier regarding IE hanging and other suspicious behavior, now disappeared.
The whole Dojo demo looks nice and great.
Cheers,
“Using document.getElementById will not work since the DOM has been modified by Dojo. â€
I believe what he’s referring to is that the dojo button cannot be found with getElementById(), but I’m certain everything “non-dojo” can be. So your scripts should still work unless you try referring to the dojo widgets without using the dojo functions (why would anyone do that?)
-Sandra
Utterly at a loss. I’ve copied the code exactly after failing to get my own example working. Even when copying the code exactly it fails to work. No debug output, no javascript errors – it just doesn’t give an alert box in ANY browser.
I’m sick to the back teeth with Dojo. I’ve been trying for the past 2 months to work with it and the confusing and incomplete documentation hasn’t helped at all. Whats worse is when you DO use a ‘good’ article and go to the extent of copying it entirely – it still fails with no explanation whatsoever.
I’m using Prototype.
@Doug: Same experience here…
In fact I was trying to launch dojo-0.3.1-Ajax on my development server
win xp sp2, apache 2.0.54, mod_rewrite, php5, mysql5.
I was unable to run it…I’ve got “Fatal: Unable to load modules” error in both FireFox & OPERA browsers.
After that I have downloaded 0.3.0-Ajax and installed it. It works correctly.
The problem is that there is no documentation available and pieces of code available in the internet from site to site doesn’t make much sense. Very uncomfortable with that, as working with dojo REQUIRES to debug the code, change templates & css code and always ALWAYS guess WHAT AND HOW IT’S PROBABLE IMPLEMENTED.
-100
Well… This tutorial doesn’t work.
There are 2 errors in the code :
1 ) The event “connected” to the helloPressed function is onclick not onClick (surprising mistake from a javascript library coder…)
2 ) It’s not actually an error but you can write both
“dojo.event.connect(helloButton, ‘onClick’, ‘helloPressed’)” and
“dojo.event.connect(helloButton, ‘onClick’, dj_config, ‘helloPressed’)”
Don’t ask me why…
“Using document.getElementById will not work”
Actually, it works … (of course you have to add the id attribute)
Maybe this tutorial is out of date, hopefully it will be fixed soon
“I’m using Prototype.”
I wish my company chose Prototype… :)
Well well …
You must use dojo.byId(“helloPressed”) instead of dojo.widget.byId(“helloPressed”)…
That’s not a satisfying solution because it returns the DOM Element, not the dojo widget. But they do it that way in the test files.
Visit
http://www.jyog.com
I had searched a lot over net to find a running example on Ajax and DOJO tutorial together, but could not find. Then I developed one tutorial on the same and sharing with you.
http://binodsuman.blogspot.com/2009/04/ajax-using-dojo-tutorial.html
Thanks,
Binod Suman
http://binodsuman.blogspot.com
One simple example on Dojo.
http://binodsuman.blogspot.com/2009/04/dojo-tutorial.html
Thanks,
Binod Suman
http://binodsuman.blogspot.com