[Tutor] Expletive Deleted

Alan Gauld alan.gauld at freenet.co.uk
Sun Jun 11 09:55:17 CEST 2006


> I think XML is a tool that allows non-programmers to look at 
> structured
> data and have it a in human readable form that gives us a chance of
> understanding that structure.

Thats not a great reason to choose a file format IMHO.
Tools can be written to display data in a readable format.
For example SQL can be used to view the data in a database.
File formats should be designed to store data, compactly
and with easy access.

> The other strength that I can see is this:  Once data is in this 
> format,
> and a tool has been written to parse it,  data can be added to the
> structure (more elements) and the original tool will not be broken 
> by
> this.  Whatever it is parsed for is found and the extra is ignored.

But this is a very real plus point for XML.
And this IMHO is the biggest single reason for using it, if you have
data where the very structure itself is changing yet the same file
has to be readable by old and new clients then XML is a good choice.

> Without a doubt, the overhead XML adds over say, something as simple 
> as
> CSV is considerable, and XML would appear to be rather more hard to 
> work
> with in things like Python and PERL.

Considerable is an understatement, its literally up to 10 or 20 times
more space and that means bandwidth and CPU resource to
process it.

Using XML as a storage medium - a file - is not too bad, you suck
it up, process it and foirget the file. MY big gripe is that people 
are
inceasingly trying to use XML as the payload in comms systems,
sending XML messages around. This is crazy! The extra cost of the
network and hardware needed to process that kind of architecture
is usually far higher than the minimal savings it gives in developer
time.
[As an example I recently had to uplift the bandwidth of the
intranet pipe in one of our buildings from 4Mb to a full ATM pipe
of 34Mb just to accomodate a system 'upgrade' that now used XML.
That raised the network operations cost of that one building
from $10k per year to over $100k! - The software upgrade by
contrast was only a one-off cost of $10K]

> So, I think XML has it's place but I will not fault anyone for 
> trying to
> make it easier to get code to work.

Absolutely agree with that. Just be careful how you use it and
think of the real cost impact you may be having if its your choice.
Your customers will thank you.

Alan Gauld
Author of the Learn to Program web site
http://www.freenetpages.co.uk/hp/alan.gauld 




More information about the Tutor mailing list