• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

DOJO in comparison to jQuery

 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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)?
 
Author
Posts: 54
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Posts: 54
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic