[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Storing Lots of Fiddly Bits (was Re: What is XML for?)

  • From: uche.ogbuji@f...
  • To: Paul Prescod <paul@p...>
  • Date: Mon, 08 Feb 1999 19:58:54 -0700

reality dom 2
> > I don't think it makes sense to build a business-object model on top of DOM,
> > but I do think it makes sense to define an exchange protocol that selializes
> > objects to XML representations using DOM as a programmatic interface.
> 
> I agree. I'll point out, however, that it is REALLY EASY to generate XML
> directly. In your opinion does the DOM actually make it easier?
>
> If you use a "reverse SAX" interface (instead of a DOM-building interface)
> then you could pipe together data consumers and if any of them ever needed
> a DOM, it could build it.

I think it depends on several things:

1) The language in which you're implementing the serialization.  In Python, 
with its rich string handling and dynamic programming features, I might prefer 
to generate XML directly, but in Java or C++, I might prefer to go through DOM.

2) Your environment.  I have often ended up using DOM because I'm working in a 
distributed environment, using CORBA, and it makes it very easy and natural to 
just call DOM interfaces across the ORB as a sort of serialization.  4DOM 
actually came about because we already had a CORBA-ready API for manipulating 
HTML-based views of an object across an ORB, and we wanted to expand this so 
we could take advantage of XML.  The W3C's work provided a natural 
spring-board.  Of course, on the same machine, it's probably easier and faster 
to use an events-based approach (SAX and your "reverse SAX", something like 
which I remember having cobbled together, in fact).

3) Your object structure.  Some of the advocates of DOM as the universal 
object-model note that they are working in domains that fall into natural tree 
structures.  In this case, there is clearly less impedance mis-match in using 
the DOM interface, and one can even smartly use the Builder pattern to connect 
abstraction to serialization interface if he's _very_ confident in the quality 
of the design.  Alas the reality is that such natural tree-representations are 
not as common in real-life as some would have us believe.  Business object 
models, as you rightly pointed out, more often take on the pattern of a graph 
(bi-directional, cyclic, and all those other tree-killers).

> > I think it also makes sense to use the DOM to develop a user-interface layer
> > for such objects, possibly using the same WDDX or XML-RPC mappings in
> > association with a set of style-sheets (although this is just one of many
> > possible mechanisms).
> 
> Yes, it makes sense to use XML as an "interchange language" between your
> business objects and your user interface. On the other hand, if that
> interface is meant to be editable the information loss associated with
> "dumbing down" to XML may not be acceptable. 

I agree with this, but in my opinion, user-interface hasn't caught up with 
object-modeling practice in any case.  XML does cause "dumbing-down", but not 
much more than other user-interface options.  How does one go from a typical 
object model, with as many degrees of freedom as most object models entail, to 
presenting a linear form as an effective editing interface?  I don't claim to 
have any visionary ideas here, but I get the sense that the next big 
breakthrough (or hype-engine) in the object community will have to be at the 
fundamental UI level.  Or did it already pass us by in the (over-wrought) 
forms of OpenDOC or Pink?


-- 
Uche Ogbuji
FourThought LLC, IT Consultants
uche.ogbuji@f...	(970)481-0805
Software engineering, project management, Intranets and Extranets
http://FourThought.com		http://OpenTechnology.org



xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@i...
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To (un)subscribe, mailto:majordomo@i... the following message;
(un)subscribe xml-dev
To subscribe to the digests, mailto:majordomo@i... the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@i...)


PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.