Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: RFC: XML::Pastor v0.52 is released - A revolutionary way to deal with XML

by sundialsvc4 (Abbot)
on Jun 30, 2008 at 02:47 UTC ( [id://694675]=note: print w/replies, xml ) Need Help??


in reply to RFC: XML::Pastor v0.52 is released - A revolutionary way to deal with XML

Here's a little food-for-thought...

What if I know absolutely nothing about “Java's XML CASTOR? :-/

Nothing. Zero. Zip. Nada.

Abruptly (and, perhaps, un-planned by you...) I therefore have absolutely zero idea why you say that this thing-of-yours is, and I quote, “a revolutionary(!!) new way to handle XML documents in Perl.”

Now, mind you, I know absolutely nothing about Java's XML CASTOR, so... I'm actually not disputing your wisdom. I'm merely “off the bus.” I have no idea what you are talking about.

So I flip over to a few things that I do know something about. “Sure, XML::Simple is ‘simple,’ as advertised, but how does your product stand-up against, for example, XML:Twig?

But, y'know, I'm still “grabbin‘ at Twigs here,” because when all is said and done, I know nothing-at-all about what Java might be up to, and without that very-critical bit of information I simply do not have the basis to understand why ... with good reason, I am quite(!) sure ... you call this thing-o-yours “revolutionary.”

Replies are listed 'Best First'.
Re^2: RFC: XML::Pastor v0.52 is released - A revolutionary way to deal with XML
by aulusoy (Scribe) on Jun 30, 2008 at 18:12 UTC

    I must admit you have a point there. I probably took a shortcut in order to get a point across in the least number of words. For those who do know about CASTOR, just a mere sentence would ring enough bells to get the meaning acroos. For those who don't, there is now enough information in this thread I think.

    'Revolutionary' deson't necessarily mean excellent or good. That's not for me to judge anyway. Revolutionary just means that there is an abrubt change in the way things work.

    In this respect, I tend to stick to my idea. The reason is that XML::Pastor introduces a whole new way of dealing with XML by generating native Perl classes starting from a W3C XSD schema. The resulting objects are even easier to manipulate than what results from XML::Simple on one hand. Furthermore, writing back to XML conformant to the original schema is taken care of.

    If you require more information, I would suggest that you check out the documentation of XML::Pastor or even download it and play with it.

    By the way, without being too critical, I would like to say that I try to keep myself up to date on what's going on out there even when it's not related to Perl. It doesn't mean I like Java per se, but it means I would like to be open-minded to new ideas.

      A curious parenthetical comment in that last paragraph... I doubt that anyone who has been in this business for any length of time whatever “knows only about Perl.” It seems rather odd even to suggest it. Bloop! Off my (duck's) back it went. Splash.

      One thing that, I think, keeps bumping against my head on this one is that you compare to XML::Simple ... which is, even on a good day, “just that.” If you are doing heavy-lifting XML work in Perl, you probably are not using Simple. How does that affect the self-assessment you present? Does it?

      The approach that you describe is what is sometimes called “pragmatic programming.” It's “machine generated software,” and it's not that new. It may well be the fact that you describe it in such glowing terms, and yet against one of the weakest XML-support libraries in CPAN (good though it is...), that makes me squint a little bit over my new bifocals “variable focus lenses.”

        So, if what you say is correct, that is, people are interested or at least know about other technology as well, then I was not that wrong assuming that they might also know about Castor. In that case one wonders why yourself know nothing about it, although it has been around for some time now and is quite popular for dealing with XML in Java.

        Why the comparison with XML::Simple? The answer is simple. Despite its many limitations and shortcomings, I have always liked the philosophy of XML::Simple, that is, representing XML data as native Perl data. Most of the other XML modules (XML::Writer, XML::Twig, ...) don't do that. Although they may have other merits, you need to know that you are working with XML when you access XML.

        So, I have compared to the module which I believe has got the idea right in the first place. It's true that XML::Simple has got quite a few limitations. But many of those limitations are actually overcome with XML::Pastor. So, I see no reason for not using it for some heavy duty XML work (apart from the fact that the code is not that mature yet). By the way, the only area where XML::Pastor is weak compared to XML::Twig is when working with huge XML documents and mixed content. You need to revert to Twig or SAX when you are working on huge documents. Otherwise, you can do pretty much everyhting. There is even some basic namespace support.

        Coming back to the discussion about 'revolution'. It's true => code generation is not a new concept. Furthermore, XML is not new, XSD is not new, Perl is not new. However, "Dealing with XML in Perl via code generation from XSD" is a completely new way of doing things.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://694675]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (3)
As of 2024-04-19 19:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found