Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

It's true, the docs aren't exactly good (and there are like, 3 versions of it floating around - which one to reference?).

But it doesn't sound like you've actually used Dojo. It's neither big, complicated or bloated. Things ARE modularized, and the core has a lot of bits that are useful outside a browser environment. If you look at jQuery, the whole thing targets being run in a browser. Dojo base has a lot of language utilities that are helpful - say if you're using it in node.



Ive used it against my wish, but it may be also because of inexperience with it which makes me judge so badly. I could have done what I was doing in jQuery far more faster and effecient, and the resulting code would have been easier to maintain for many other developers. Very few know dojo.

Also the idea of "dojoAttachPoint" as an attribute on basically any tag is questionable. If I recall only the latest html spec allows that, but dojo used it even before.


HTML validation is overrated. Lots of HTML5 features, like data attributes and the shorter doctype, where there all along and just happend to be standardized now.


data-blah is HTML 5 legal and dojo is changing its patterns to use it.

dojoAttachPoint is an attribute dojo uses in widget templates. I don't really know what you would propose to replace it (except data-attachPoint, say). If you're going to design a tempting system you need a binding mechanism, and that's what dojo does.

You can't complain too much about abusing the liberty HTML has always allowed with unrecognized attributes. Dojo cleverly leveraged the capability. And frameworks like dojo are the very reason we even have data-blah now.

Unless you are designing widget templates, you can do everything in dojo programmatically, if you choose, and keep your HTML pure. But, why?


Because I, for one, would like to keep my HTML separate from my Javascript.

Separate looks and from behaviour. The HTML is created already from another templating system server-side, its a pure hell to introduce HTML from Javascript and mix it.


That's fine. Dojo doesn't make this decision for you. Instead it gives you a full range of tools to choose for yourself how you want this to work.

Some UI widgets (Dijits) choose to use a client-side HTML fragment, but others do not have that requirement. Some of the work on projects like xstyle and put-selector seek to reduce this reliance further.

Dijits can be invoked either through extra markup in your base HTML page, or through a JS constructor. In the HTML templated widgets, there are attributes that bind DOM nodes to reference variables in your JS, so the widget knows where to insert content, or subwidgets, etc., and where to attach DOM events. The HTML isn't stored in JS, it's stored in an HTML file that gets combined through build tools (so you don't need to do this mix in process, it just works).

But again, that's an optional feature that's used primarily by the widget system and some of the widgets in Dojo.


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.


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.




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: