Quoting Randy Belknap ([EMAIL PROTECTED]):
> > I totally believe in XML/SGML technology and have been actively using
> > it for years. I make a good chunk of my living as an XML consultant.
> >
> > I can tell you this about it: it isn't an appropriate approach to
> > take on 80% of the sites that you will build. In the other 20%,
> > it's irreplacable.
> >
>
> Can you elaborate on this? Can't XML represent any data that a bean
> could contain?
It's not a theoretical problem. You can ALWAYS use XML, in theory. It's
a cost problem. XML adds overhead on every front: parsing, post-processing,
adherence to additional interfaces, and sometimes your data just doesn't
easily fit. You have to spend time working out a sensible DTD, making
sure that what you do is DOM compliant, etc.
Now in many projects you already had to do that kind of thing anyway: you
are interoperating with several different systems, and you would have had
to define a standard data format anyway, for example. Or your data is
so loosely structured to begin with that it doesn't easily fit into
a flat model. In these cases XML only wins--it costs you only a little
beyond what you would have had to do, and gains you many benefits.
These kinds of things tend to be very "exciting" because they represent
problems that computers weren't formerly solving--it's always a lot of
fun to break new ground and do amazing new things.
However, most traditional computing applications just don't need the
things that XML brings to the table. Data interchange may not be all that
important, because the data is already in a standard database and nobody
imagines it will ever leave. The data is ordinary relational data and
doesn't really need the levels of nesting that XML brings. And the
application is straight forward: throw up a form, show the data, and
collect the results.
Now these kinds of applications can be "boring" in that they are the kinds
of things that people always do all the time. You aren't breaking a whole
lot of new ground when you set up a system like that. It' s not as sexy.
But it does represent 80% of what people do with websites (well who am
I to assign actual websites--this is what MOST people do most of the time).
In those cases you could use XML if you want, but you'll only increase
the cost of your development and slow down your application. You'll waste
a lot of time working out a DTD that would live up to all possible future
variants of your application--meanwhile your competitor already has a
boring old website up and is taking in business.
The XML/SGML world offers a lot of exciting new ways to do things, and
it's easy to get carried away and think that it's a solution to every
problem on the planet. It's not. It's just a solution to several important
new problems that couldn't previously have been solved. That's what makes
it exciting--but don't get so intoxicated that you use it where it's
not appropriate.
Justin
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html