matth has asked for the wisdom of the Perl Monks concerning the following question:

Has anyone here had experience of building software that can use both Perl and Java objects to pull information from an XML data structure. And with these objects generate XML objects for further evaluation. My understanding of applied informatics tells me it is a good idea but I am happy to hear suggestions from computer scientists that can explain to me why it might be a bad idea. I want to generate a programming framework that will allow individuals to add their own bits and bobs in the language of their choice. It will enable them to use either BioPerl or BioJava. Also. Can Perl and Java objects be easily held in and pulled from the same database? If so, how?

Replies are listed 'Best First'.
Re: Programming framework theory
by rdfield (Priest) on Feb 10, 2003 at 16:56 UTC
    Storing objects from different sources/languages in the same database is easy: the hard part is getting them back out again using the other language. The easiest way to store an object is to serialise it - giving the other language next to no chance of understanding it. The hard way is to break the object's data down into it's basic constituents and store the data into lots of related tables. It does mean a lot of work on the store/retrieve methods, and they'd have to be implemented twice (once for each language). I've done similar things in languages other than Perl and Java (Gupta SQLWindows and COBOL to be precise). The latest versions of Oracle can store XML natively, which may help.

    rdfield

      The Java and Perl objects don't need to interact with each other. They only need to extract info from the same XML source and then produce common XML objects. The XML objects can then be used for whatever purpose.