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

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Re: On a more pleasant note

[ Lists Home | Date Index | Thread Index ]
  • From: Tyler Baker <tyler@infinet.com>
  • To: Tim Bray <tbray@textuality.com>
  • Date: Fri, 17 Sep 1999 16:54:33 -0400

Tim Bray wrote:

> There's been a lot of angst around here recently.  On a countervailing note:
> I am building this big hairy complicated app in which a web server traverses
> an extremely complex database, extracts some dense information structures,
> sends them to a client, and the client does some nifty rendition tricks.
>
> Building the database is hard.  Traversing the database is hard.  Doing the
> rendition on the client is hard.  But generating the message on the server
> takes one little C subroutine (printf calls, nothing fancy), and extracting
> the information from it on the client (using an XML parser, it doesn't
> matter which) is one little Java routine.  The client-side worked first
> time, the server-side on the second (I wasn't escaping some &'s properly,
> which the XML parser on the client caught first time through).  All the
> rest is done by Apache and Linux and Windows and TCP/IP and HTTP and
> java.net.URL and the XML parser.  It took maybe an hour to build both sides.
>
> Seems to me that this is the right way to build distributed applications.

For your problem domain of a traditional client/server app, yah this setup seems to work great
for you. Since most people building web applications will likely have a setup that mirrors
yours, your success story is reassuring. On the other hand, I am using XML for an entirely
different distributed application some might consider groupware oriented that does not depend
on some 24/7 server running all the time. Probably a lot more complicated than your 2 hour
setup, but for this app XML I think has been a wonderful complement to object serialization as
it is a much nicer data format for potential application interoperability later down the line.

>  -Tim
>
> PS: In the XML I'm sending out from the server, I am embedding some human
> readable text encoded, obviously enough, in HTML.  What would be a good way
> to distinguish it from my own XML tags so that I can extract it and feed
> it to the HTML renderer?  Any suggestions?

Well there is always the comment hack. If a comment starts with some magic string you define,
then simply trim off the rest of the data in the comment as your HTML. You will of course need
to make sure that you handle nested comments appropriately. Of course I am sure you have
already thought of this as this I guess is pretty obvious and there are probably obvious
pitfalls I can't think off the top of my head right now. But if I had 30 seconds to find a
solution, that would be what I would try first (-:

Tyler


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