[
Lists Home |
Date Index |
Thread Index
]
Dare,
for me the advantage of using XQuery over something like
E4X or Comega is not the "write faster" kind of thing, but the
declarativity
(or the lack thereof) and all the advantages that come from there
(see Mike Champion's thread this week).
In XQuery you write "what" you would like your transformation to do,
and you are not even ALLOWD to write the "how". You CANNOT specify that
you would like a cache for a certain portion of the query for example,
and thanks
god for that. This guarantees the robustness of this code in the face of
certain evolutions (that are guaranteed to happen).
If you write the same thing in a lower level of abstraction language
like
Comega or E4X, you can mix the "logic" of your application with
the "how". In this case, if you write by hand how to cache in order to
improve performance, you are bound to rewrite your application every
6 months when the hardware characteristics or the application patterns
change. If you write in C++, you are bound to rewrite your application
on every different platform, Etc, Etc.
The IT world is slowly but invariably moving towards more and more
declarativity in the programming languages. It takes much longer that
some us would like but there is an INVARIABLE move.
ALL of the IT "revolutions" (aka thing that changed dramatically
the way we program or interact with programs) that impacted me as a
programmer
involved raising the level of abstraction of programming, going further
and further away from the "how".
Invariably this first negatively impacted the performance, but then the
overwhelming
productivity advantage prevails, and then of course performance
recovers and even
surpasses (see Java, see SQL, see etc, etc, etc)
That's the main advantage of XQuery (or XSLT) over Java and Dom or Java
and SAX,
or E4X or etc etc. Not the "write 4 times less lines of code".
Best regards,
Dana
On Dec 2, 2004, at 9:37 AM, Dare Obasanjo wrote:
> Can you give me the input XML and expected output so I can see whether
> XQuery really takes 4 times less code than E4X or C-Omega? In fact, I
> have an article due this month and that would be an interesting topic
> to cover.
>
> --
> PITHY WORDS OF WISDOM
> There is nothing more satisfying that having someone take a shot at
> you, and miss.
>
> ________________________________
>
> From: Jonathan Robie [mailto:jonathan.robie@datadirect.com]
> Sent: Thu 12/2/2004 9:06 AM
> To: Dare Obasanjo
> Cc: Daniela Florescu; Michael Champion; xml-dev@lists.xml.org
> Subject: Re: [xml-dev] XML-aware programming language?
>
>
>
> Dare Obasanjo wrote:
>> Exactly, that's why as a programmer I'd rather stick with the
>> language I'm doing most of the application development with anyway
>> (i.e. C#, Javascript, etc) as opposed to dealing with the [familiar]
>> complexity of that language plus all the idiosyncracies of XQuery &
>> XML Schema as well.
>
> Hi Dare,
>
> For the examples I've compared, I wind up writing about 4 times as much
> code using that approach, and it definitely takes more time to write
> and
> maintain that code.
>
>
>
> -----------------------------------------------------------------
> The xml-dev list is sponsored by XML.org <http://www.xml.org>, an
> initiative of OASIS <http://www.oasis-open.org>
>
> The list archives are at http://lists.xml.org/archives/xml-dev/
>
> To subscribe or unsubscribe from this list use the subscription
> manager: <http://www.oasis-open.org/mlmanage/index.php>
>
|