4 ms·
What's wrong with the DOM? (Sorry if this is a stupid question)
by exizt88 13y ago
What's wrong with the DOM? (Sorry if this is a stupid question)
- camus 13y agoNothing wrong. But i guess DOM manipulation can be painfull sometimes. But if you are going to develop a web app you'll have to use the dom.
- ycitm 13y agoCrockford has some very interesting things to say about it: http://yuiblog.com/blog/2006/10/20/video-crockford-domtheory/ http://yuiblog.com/blog/2006/10/20/video-crockford-domtheory...
- minopret 13y agoWhat's wrong is what the DOM is and what it isn't. The DOM is the Document Object Model data structure along with the parametrized routines that operate on that data structure. It exposes every way in which the apparent simplicity of XML is far from the reality. Then the operations that it provides do little to manage the complexity. They are only relatively "primitive" operations, like getters and setters for the data structure, plus a few things like "getElementsByTagName". That gets a set of elements from which you then should or must exclude what you don't want. If you want a convenient wrapper for the DOM API, you have to find or build one.
- naradaellis 13y agoI don't necessarily disagree with you that there are problems with the DOM API. However, would you rather that higher level APIs were designed by standards committees, or would you rather they were worked on and "de facto" standardized in the wild - the situation we have now. The situation we have now is a case of worse is better I think.