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.
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.
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?
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.
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.
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.
Yes dojo is a complete library and for 99% of the use cases for a web application, it is overkill.
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.
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.