OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]
Re: [xml-dev] RE: An inquiry into the nature of XML and how it orients our perception of information

On Mon, Nov 23, 2009 at 7:46 AM, Costello, Roger L. <costello@mitre.org> wrote:

> The OO form frames ones thoughts in this way:
>   Book stores contain a collection of Book objects
>   and Magazine objects. The Book and Magazine types
>   inherit from an abstract Publication type.

Sorry but this is wrong. Bookstores do not *contain* a collection of
Book objects. It seems you have now spent so much time with XML, that
XML has colored your thinking to the point where you try to fit
everything into an XML model. What you describe is an XML description.
Don't worry. It happens to everyone. It's just that I'm used to seeing
people try to force XML to fit the OO or relational models instead of
the other way around. :-)

The OO description is that a bookstore contains a *pointer* to a
collection of Book objects. Very rarely would a bookstore object
actually contain the books. The distinction is subtle, but critical
most especially when attempting to serialize object graphs into XML
trees or relational tables. Two different bookstore objects can have
pointers to the same books. However, two different bookstore elements
can't contain the same books. Trees are a restricted subset of graphs,
and this is why naive approaches to serialization are doomed to fail.
(Sophisticated approaches to serialization are also doomed to fail,
but for more complex reasons.)

Elliotte Rusty Harold

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 1993-2007 XML.org. This site is hosted by OASIS