File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

DOJO in comparison to jQuery

 
Deepak Mittal
Greenhorn
Posts: 8
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have experimented with both DOJO and jQuery and I liked both the toolkits.

My impression so far is that DOJO is good in widgets and UI components, whereas jQuery shines in writing very concise and readable logic.

I just want to understand from you what do you think : should I be making use of Both DOJO and jQuery in my applications (use whichever makes sense per use case), or is it really like using only one of them (having both of them in the same app doesn't make a lot of sense)?
 
Peter Svensson
Author
Ranch Hand
Posts: 54
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It is a good question. I think that both Dojo and jQuery have very clean logic. Dojo is different in at least two ways;

1) Dojo is very strict on namespacing, so all functions, classes, objects, et.c. have a very clear name that relates to their place in the namespace. For example, the draggable window widget is called dojox.layout.DragPane and the function to do a CSS query is called dojo.query(). The reason for this is twofold; Firstly Dojo guarantess that it doesn not clash with any other toolkit, has overlapping functions, et.c. and secondly the namespaceing is always equivalent to directory paths, which enables intelligent and dynamic resource loading, which also can be used by custom classes and widgets.

2) Dojo has a very powerful templated widget system (I think only ExtJS has something similar), which modularizes widgets into a common structure. By extending the dijit._Widget superclass you get a lot of 'plumbing' for free, including automatic generation of element ids and widget lifecycle support.

Cheers,
PS
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64201
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
To be fair to jQuery: on point (1), jQuery also is non-intrusive into the page's namespace. It's incursion being limited to the name jQuery, and optionally, the $.
 
Peter Svensson
Author
Ranch Hand
Posts: 54
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bear, I'm sorry. You're right of course. jQuery plays nice as well.
I think I wanted to say that Dojo have a logical namespaced structure for where to put things, and got into the old Prototype argument again without switching on my head

That also means that Dojo can be considered more verbose.

Cheers,
PS
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic