Hacker News new | ask | show | jobs
by untog 5309 days ago
jQuery often uses "data-blah" as an attribute- that isn't any more or less valid than "dojoAttachPoint".

And the general point is that Dojo can do a lot more than jQuery- for one, it works outside of the browser. A library like MooTools is the same. jQuery is, at it's heart, a DOM manipulation tool. Dojo and the others are more complete libraries that aren't just for HTML.

1 comments

It is not required by jQuery to use "data-blah" in any html tag. Developing a dojo widget requires me to break html validation. I can perfectly fine use jquery without the data-blah attributes.

Yes dojo is a complete library and for 99% of the use cases for a web application, it is overkill.

I also think that using html tags is a poor practice. That said, Dojo does not require it for anything.

I use dojo daily, and I find everything to be well-written and high quality. It's the documentation that has always been a train wreck. Their idea of improving the documentation is reorganizing it on a new website.

It is modular, you only use the modules you need, and you only load the javascript you need. As for data-*, you only use that if you want, it is a feature provided by another module. If you don't like it then don't use that feature and don't load that module ('dojo/parser'). You can create widgets programatically like in jQuery (and thats what I do).
So to answer the original question:

Does anyone actually think dojo has a future compared to the power that jquery gives to make your own "widgets" but far simpler than dojo?

The answer is: yes, it has a future in a wide range of places. But in the subset of DOM manipulation, it might be more appropriate to use jQuery.