W3C home > Mailing lists > Public > www-dom@w3.org > October to December 1999

Re: The DOM is not a model, it is a library!

From: David Brownell <david-b@pacbell.net>
Date: Thu, 07 Oct 1999 11:04:01 -0700
Message-ID: <37FCE091.F7B23FD5@pacbell.net>
To: DOM Mailing List <www-dom@w3.org>
Michael Champion wrote:
> I agree that it would be best all around if everyone implemented every
> interface and method in the spec.  This position is traditionally what the
> DOM working group, and standards bodies in general, have strongly advocated.

Modulo the fact that some modules are optional, yes -- if you
claim to support a module, partial support is ruled out.

> I submit that the DOM can still be useful if anyone can use hasFeature() to
> define a subset of features that they support that is presumed to be useful
> FOR THEIR TARGET DOMAIN.  Now people define subsets more or less on their
> own, with no mechanism for sub-communities to define common subsets of the
> API or to query to see if the subset they need is supported. 

Better IMHO would be to rework the "core" a bunch, removing most of the
"convenience" functions and creating interfaces from which the current
core would derive.  (That's fully conformant with evolution in IDL.)

Then a new conformance feature point would be "core" ... which would
be rid of expensive stuff like getElementByTagname, half the attributes
now hanging off node, "Attr" with children, and so on.

An issue is that one really doesn't want to have classes with lots
of methods that throw "not supported" exceptions.  That implies two
classes of useless baggage:  the interface to those methods, and the
implementations that throw those exceptions.  They all cost in space,
maintainance, and user expectation.  Best to have a truly minimal
core, which doesn't incur those costs.

- Dave
Received on Thursday, 7 October 1999 14:04:27 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 20 October 2015 10:46:06 UTC