W3C home > Mailing lists > Public > www-dom@w3.org > July to September 1998

DOM and inheritance

From: Mark Harwood <MHarwood@softwright.co.uk>
Date: Wed, 2 Sep 1998 06:58:31 -0400 (EDT)
Message-ID: <c=GB%a=_%p=SSA_Softwright%l=EXCH001-980902105914Z-1887@exch001.softwright.co.uk>
To: "'www-dom@w3.org'" <www-dom@w3.org>
I was a little concerned about the models presented to the programmer in
the proposed DOM.
I sympathise with the need to provide an OO model with inheritance and a
flattened model. I am not sure however that the separation between the
two models is clean as it could be.
For example, the OO developer using the "element" interface does not
have access to a method to "getAttributes". For that, they are expected
to use the "non-OO" base interface "Node". I thought Node was supposed
to be the interface for non-OO developers. OO developers who are exposed
to this interface are faced with all manner of non-OO dilemmas - e.g.
"this method only applies if the node is representing _this_ type of
object." I don't beleive the developer who choses the OO model shoud
have to come into contact with a "dirty" interface like this.

When I was first getting up to speed with XML using the Microsoft Java
parsers they used a flattened model too and a colleague and I were both
set back by trying to invoke methods which were not applicable in
certain circumstances. I am sure this experience will be repeated by
other developers the world over if this approach is adopted.

Mark Harwood
Technical Architect
SSA Softwright Ltd
Langley Business Centre
Station Rd
Langley, Berks

Tel	 01753 811833
Fax	 01753 811834
Email     mharwood@softwright.co.uk
Received on Friday, 25 September 1998 11:08:38 UTC

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