On 9/8/06, ant elder <[EMAIL PROTECTED]> wrote:

Yes we should be able to do the same type of thing with Java. Is the PHP
SDO
API the same as the C++ API or is it simplified?

I think for most if not all the Java based scripting languages we can just
expose the Java SDO API to the scripting language (at one point we had a
JavaScript version of the Big Bank sample account module that did this),
but
there are probably ways to use the dynamic nature of the script languages
to
come up with a simplify SDO API.

   ...ant

On 9/7/06, Simon Laws <[EMAIL PROTECTED]> wrote:
>
> > In PHP we have an implementation of SDO that is fully based on the C++
> SDO
> > implementation. I'm not sure if it will be instructive in the java
space
> but
> > we have pretty much just wrapped the C++ SDO interfaces and exposed
them
> as
> > native PHP objects. I guess you would have to do a similar thing in
Ruby
> or
> > any other extension for that matter. The solution will depend on how
you
> > construct extensions to your scripting language. In PHP it just so
> happens
> > you have to do it in C/C++ but I would hope you can do it in Java for
> JVM
> > based environments.
> >
>
>
> S
>
>

The SDO API in PHP is fairly similar to the C++ SDO but is simplified and
in particular it tries to take avantage of the features of PHP so that it is
comfortable to use for the PHP programmer. For example, a typical user of
the XML DAS might do

$xmldas->addTypes("company.xsd");
$document = $xmldas->loadFile("company.xml");
$company = $document->getRootDataObject();
$company_name = $company->name;     // property access style
$company_name = $company['name'];   // associative array access style
$company_name = $company[0];        // index array access style

The trick is make the experience as natural for the script developer
as possible so we have, for example,  provided all the normal PHP
object access styles.

Also our user space implementation of the relational DAS is quite
different from the current java implementation.

Regards

Simon

Reply via email to