We're redesigning a website. Right now it uses Dojo, a large (and complex) Javascript framework. One person insists that we need Dojo because of things like (random examples) client-side validation, cross-browser compatibility, and client-side data storage.

After doing some checking, it seems like most of the things that Dojo provides are already built into HTML5. In fact it seems like there's a lot of overlap: Both provide client-side storage, client-side validation, and are at least partly supported by all major browsers.

Would using HTML5 constructs eliminate the need for us to load this huge, complex and troublesome Javascript framework? In general, does HTML5 take care of a lot of what Javascript frameworks were written for 10 or 15 years ago?

  • 1
    How long is apiece of string? Which exact features do you want? Can HTML 5 provide them? If you switch to HTML, you may (probably) will need to add some JS later, but it can be lightweight & not a full-blown framework. But his is definitely a YMMV question. Feb 10 '15 at 9:51
  • I'm sure you're correct (your string analogy is particularly good). I asked simply because it seems Dojo goes to great lengths to build a "DOM on top of a DOM" with its dijit-widget structure and its validation handling. If we could go back to just using one DOM with HTML5, we would essentially cut our client-side code in half. Feb 10 '15 at 15:55

It depends quite a bit on the complexity of your application. But the general advantage in using a framework is that they generally target all major browsers, and are quite backward-compatible. Whereas if you rely on HTML5 only some features might only work with the latest browsers or not at all.

I just tried <input type="datetime"/> for example. Doesn't work in Firefox 34. But I am sure Dojo has a nice dropdown picker.

Now, maybe Dojo is a bit too complex for your application. So you could check out jQuery and jQueryUI, which are a bit more lightweight.

  • 1
    Does <input type="datetime"/> work in Firefox 35? No, but it doesn't work in the latest version of Chrome either. Sure, avoid features that are not in the latest browsers. But seriously, is browser obsolescence really a problem anymore? If I want to, I can set Firefox up so that it updates to the latest version automatically, and I think this is the way it comes out of the box. Same with Chrome. Feb 10 '15 at 4:04

Not the answer you're looking for? Browse other questions tagged or ask your own question.