Re: How to convert CSV row to Java object?
On 29-08-2010 13:17, Leonardo Azpurua wrote:
"Arne Vajh?j"<arne@vajhoej.dk> escribi? en el mensaje
news:4c79c59a$0$50441$14726298@news.sunsite.dk...
If you:
- only use "rectangular" data
- don't believe in documentation
- don't believe in type safeness
then I can not see any reason why not just use CSV instead of XML.
But a lot of people have needs for data with more advanced
structures than rows x columns, like the ability to document
the format in schema/DTD and the ability to check both
format and data values against the definition (checking
data values requires schema).
I can't see the need for such a radical dismissal.
Mine or your own:
#Since all the buzz with XML started several years ago, I've been scratching
#my head trying to understand what actual advantages it might bring when
used
#to process files whose data structures are known and agreed upon in
advance.
#So far, with the exception of being able to boast that your application is
#buzzword-compliant, I have found none.
?
I can concede that XML is very useful for many purposes, most of them
related to the non-rectangularity of data.
Given that is probably around 99% of data, then that seems as
a rather big point!
But it is not the case for roughly 95% of current usages of XML. Most data
trasfers are Point to Point, and mosty of them are based on a predefined
schema shared by both parties. And most of them are rectangular. So, 95% of
XML usages are overkill due to buzz.
I can assure you that it is not 95% of XML exchange point to point that
is rectangular.
Any competent data person will put in meta information, security
information etc. besides the rectangular pay load data.
I believe in documentation. I just don't believe that every single piece of
data needs to be documented.
Well - today most companies want everything documented and not just some
parts documented - for good reasons - they can not expect only the
people that document stuff to leave the company (and even though
developers not professional enough to document their
data formats may have problems finding a new job, then they can still
walk out in front of a bus).
And I believe in type safeness, but I don't see what real advantage XML
provides to type safeness when compared with a sound method for parsing
delimited text files.
Most parsers does a very poor job at validating data compared to
a XML schema.
If they actually do the same, then it will be awfully expensive
in development.
And besides as soon as it is cross organization, then having
the receivers code being the documentation for the format
is a DOA idea.
Arne