On 9/1/06, ant elder <[EMAIL PROTECTED]> wrote:
I've a couple of questions based on I'd like to also have a Python container
for the Java runtime, and from the perspective of how the the existing
JavaScript and Groovy containers work that we already have for the Java
runtime.
In the implementation.python element do you really need separate path and
class attributes? This is likely because I don't know anything about Python
or the C++ runtime work but for comparison a JavaScript impl looks like:
<js:implementation.jsscript="org/apache/tuscany/container/javascript/function/HelloWorld.js"/>
We could probably do that - I was following the style of
implementation.cpp which uses the path attribute to find the .dll,
.componentType and .h files. In the Python case we need to find the
module (.py) and the .componentType file, so internally splitting
relative/path/to/MyModule would probably work, and I guess makes
things slightly simpler for users.
For references, could you just use the .componentType side file to define
references as an alternative to using new annotations? For JavaScript, if
the .componentType side file defines a reference then the JavaScript
container uses the dynamic nature of the language to automatically define a
variable with the same name as the reference. I don't have a great example
but you can see this in the e4x.js testcase where the script uses a variable
named extHelloWorldService which is the name of the reference defined from
the .componentType side file:
http://svn.apache.org/repos/asf/incubator/tuscany/java/sca/containers/container.javascript/src/test/resources/org/apache/tuscany/container/javascript/function/e4x.js
http://svn.apache.org/repos/asf/incubator/tuscany/java/sca/containers/container.javascript/src/test/resources/org/apache/tuscany/container/javascript/function/e4x.componentType
I like this style, but I've got no idea if we could make it work
within Python - I'll have to take a look. That's my favourite of all
the options so far, so thanks!
Andy
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]