Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Essential Dojo

Tags:

json

dojo

I'm starting to use Dojo; this is (essentially) my introduction to AJAX. We have a Java backend (torque / turbine / velocity) and are using the jabsorb JSON-RPC library to bridge Java and Javascript.

What do I need to know? What is the big picture of Dojo and JSON, and what are the nasty little details that will catch me up? What did you spend a couple of days tracking down, when you started with Dojo, that you now take for granted? Thanks for any and all tips.

like image 583
Carl Manaster Avatar asked Jun 12 '09 18:06

Carl Manaster


2 Answers

The first thing to do is get familiar with the Dojo Object Model. JavaScript does not have a class system so the Dojo toolkit has created a sort of "by convention" object model that works rather well but is very different to how it works in Java for example.

The reason I suggest getting familiar with it is so you can dig into the code base whenever you start experiencing issues. The documentation available has improved significantly over the past year, but every now and then I find myself having to work out a bug in my code by learning exactly how the Dojo code involved works.

Another tip is to make use of the custom build feature which will significantly improve performance once your application is ready.

As a general tip on DHTML programming, use firebug (a plug-in for Firefox). It allows JavaScript debugging, DOM inspection, HTML editing in real-time and a whole lot more. I've become totally reliant on it now when I'm working in DHTML!

Good luck!

like image 114
Dónal Boyle Avatar answered Oct 22 '22 08:10

Dónal Boyle


I too just dove head first into Dojo, they have a good API documentation at http://api.dojotoolkit.org/. Even Dojo Campus has some good examples of the plug ins.

If you ask me O'Reilly's Dojo: The Definitive Guide is the best Dojo book on the market.

I also would like any tips and pointers from the Dojo masters.

Cheers

like image 38
d34dIO Avatar answered Oct 22 '22 06:10

d34dIO