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

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Storing application state as XML

[ Lists Home | Date Index | Thread Index ]
  • From: Ketil Z Malde <ketil@ii.uib.no>
  • To: XML-Dev Mailing list <xml-dev@ic.ac.uk>
  • Date: 17 Jun 1999 13:52:35 +0200


Hi,

I must admit I don't have the time to follow this list as diligently
as I'd like, so it is possible that my questions have been answered
already.  I'll submit them nevertheless. :-)

We have a rather complex application which stores its state using the
standard MFC serialize stuff (well, actually a somewhat hacked
version, but that's beside the point).  Now, this limits our freedom
in (or at least severely complicates) redesigning internal class
structure while maintaining backwards file compatibility, and we've
been pondering an XML format instead.

There are of course other advantages, like accessing the information
from other applications, or generating HTML and whatnot.

The question is whether this, in general, is a good idea, and whether
people have done this, and if so, to what degree of success, and by
what methods.

I can see two ways of doing this:

1) Use a DOM-based document, which can be passed around, much the way
a CArchive class is, and modifying the Serialize() to fill in the
relevant nodes in the document tree

	or

2) Encapsulating the document (DOM or otherwise) in a separate class,
which traverses the application's classes and picks whatever
information is relevant in whatever sequence it desires.

The advantage of model 1 is a structure quite similar to what already
exists, most of the code base could be left alone, I think.

On the other hand, if our existing classes are well designed, all the
relevant information should be accessible through the public:
interfaces, and it should be easier to build the document in a
flexible way.  E.g. the placement of various information might not be
obvious from the class' perspective.

So, before we jump the gun, I'd like to hear from people who have done 
this, and are willing to share their experiences, or otherwise
contribute suggestions and ideas.

Thanks for listening,

-kzm
-- 
If I haven't seen further, it is by standing in the footprints of giants

xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
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@ic.ac.uk the following message;
(un)subscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)






 

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

Copyright 2001 XML.org. This site is hosted by OASIS