You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by ant elder <an...@gmail.com> on 2006/03/24 17:42:53 UTC

Where should JavaScript componentType samples go?

I'd like to make some more complete samples for the JavaScript componentType
so where should they go?

JavaScript works a bit differently from Java so I think there should be
separate samples for things like:
- basic helloworld
- properties
- service references
- a couple for E4X (if thats going)
- importing packages and classes (for  SDO)
- how to do initialization when a script is loaded
- probably some others...

Are these tests or samples? Should they be in the JavaScript project or
Samples project?

I'm inclined to keep them in the JavaScript project as testcase/samples
instead of keeping on adding things to Samples.

I'd also quite like to have them coded just like a user would, using a J2SE
client doing new TuscanyRuntime/getModuleContext/locateService, and with an
sca.module file for each one so its obvious what SCDL is required. Thats not
possible though if they're all in the JavaScript project as each project can
only have the single sca.module file in the top level of the project. That
was discussed here:
http://mail-archives.apache.org/mod_mbox/ws-tuscany-dev/200602.mbox/%3c44030F98.2030408@apache.org%3e

An alternative would be to have a JavaScript sub project in samples and add
all these samples as sub projects to that.

Any comments or suggestions?

   ...ant

Re: Where should JavaScript componentType samples go?

Posted by ant elder <an...@gmail.com>.
I agree, shorter names are more readable.

I used shorter names for the JavaScript samples, have a look and see if
thats better or you can suggest better names or structure:
http://svn.apache.org/repos/asf/incubator/tuscany/java/samples/JavaScript/

   ...ant

On 4/7/06, Jean-Sebastien Delfino <js...@apache.org> wrote:
>
> Jean-Sebastien Delfino wrote:
>
> [snip]
> > ant elder wrote:
> >> Thats what I'll start doing then, its easy enough to move them if
> >> anyone has
> >> a different suggestion.
> >>
> >> If they're separate projects must they really use the
> >> org.apache.tuscany.samples.javascript... package names or could that be
> >> something shorter? Some of those long names are quite hard to read in
> >> the
> >> scdl.
> >>
> >>
> [snip]
> > I've been wondering about that for the java samples as well. Currently
> > we have very long package names like
> > org.apache.tuscany.samples.bigbank.account.services.stockquote for
> > example. I think it would be nicer if we could just have stockquote,
> > or sample.stockquote. What do people think?
> >
> I was doing some tests with our samples today and bumped again into very
> long package names like
> org.apache.tuscany.samples.bigbank.account.services.stockquote. I would
> like to make the package names in the samples shorter, something like
> sample.stockquote. Any opinions?
>
> --
> Jean-Sebastien
>
>

Re: Where should JavaScript componentType samples go?

Posted by Jean-Sebastien Delfino <js...@apache.org>.
Jean-Sebastien Delfino wrote:

[snip]
> ant elder wrote:
>> Thats what I'll start doing then, its easy enough to move them if 
>> anyone has
>> a different suggestion.
>>
>> If they're separate projects must they really use the
>> org.apache.tuscany.samples.javascript... package names or could that be
>> something shorter? Some of those long names are quite hard to read in 
>> the
>> scdl.
>>
>>
[snip] 
> I've been wondering about that for the java samples as well. Currently 
> we have very long package names like 
> org.apache.tuscany.samples.bigbank.account.services.stockquote for 
> example. I think it would be nicer if we could just have stockquote, 
> or sample.stockquote. What do people think?
>
I was doing some tests with our samples today and bumped again into very 
long package names like 
org.apache.tuscany.samples.bigbank.account.services.stockquote. I would 
like to make the package names in the samples shorter, something like 
sample.stockquote. Any opinions?

-- 
Jean-Sebastien


Re: Where should JavaScript componentType samples go?

Posted by Jean-Sebastien Delfino <js...@apache.org>.
ant elder wrote:
> Thats what I'll start doing then, its easy enough to move them if anyone has
> a different suggestion.
>
> If they're separate projects must they really use the
> org.apache.tuscany.samples.javascript... package names or could that be
> something shorter? Some of those long names are quite hard to read in the
> scdl.
>
>    ...ant
>
>
> On 3/24/06, Jean-Sebastien Delfino <js...@apache.org> wrote:
>   
>> ant elder wrote:
>>     
>>> I'd like to make some more complete samples for the JavaScript
>>>       
>> componentType
>>     
>>> so where should they go?
>>>
>>> JavaScript works a bit differently from Java so I think there should be
>>> separate samples for things like:
>>> - basic helloworld
>>> - properties
>>> - service references
>>> - a couple for E4X (if thats going)
>>> - importing packages and classes (for  SDO)
>>> - how to do initialization when a script is loaded
>>> - probably some others...
>>>
>>> Are these tests or samples? Should they be in the JavaScript project or
>>> Samples project?
>>>
>>> I'm inclined to keep them in the JavaScript project as testcase/samples
>>> instead of keeping on adding things to Samples.
>>>
>>> I'd also quite like to have them coded just like a user would, using a
>>>       
>> J2SE
>>     
>>> client doing new TuscanyRuntime/getModuleContext/locateService, and with
>>>       
>> an
>>     
>>> sca.module file for each one so its obvious what SCDL is required. Thats
>>>       
>> not
>>     
>>> possible though if they're all in the JavaScript project as each project
>>>       
>> can
>>     
>>> only have the single sca.module file in the top level of the project.
>>>       
>> That
>>     
>>> was discussed here:
>>>
>>>       
>> http://mail-archives.apache.org/mod_mbox/ws-tuscany-dev/200602.mbox/%3c44030F98.2030408@apache.org%3e
>>     
>>> An alternative would be to have a JavaScript sub project in samples and
>>>       
>> add
>>     
>>> all these samples as sub projects to that.
>>>
>>> Any comments or suggestions?
>>>
>>>    ...ant
>>>
>>>
>>>       
>> Ant, +1 from me, the more samples we have the better! I like the idea of
>> having a javascript sub project with samples as sub-projects, mainly
>> because I think it's what app developers will do: one project per SCA
>> module.
>>
>> --
>> Jean-Sebastien
>>
>>
>>     
>
>   
I've been wondering about that for the java samples as well. Currently 
we have very long package names like 
org.apache.tuscany.samples.bigbank.account.services.stockquote for 
example. I think it would be nicer if we could just have stockquote, or 
sample.stockquote. What do people think?

-- 
Jean-Sebastien


Re: Where should JavaScript componentType samples go?

Posted by ant elder <an...@gmail.com>.
Thats what I'll start doing then, its easy enough to move them if anyone has
a different suggestion.

If they're separate projects must they really use the
org.apache.tuscany.samples.javascript... package names or could that be
something shorter? Some of those long names are quite hard to read in the
scdl.

   ...ant


On 3/24/06, Jean-Sebastien Delfino <js...@apache.org> wrote:
>
> ant elder wrote:
> > I'd like to make some more complete samples for the JavaScript
> componentType
> > so where should they go?
> >
> > JavaScript works a bit differently from Java so I think there should be
> > separate samples for things like:
> > - basic helloworld
> > - properties
> > - service references
> > - a couple for E4X (if thats going)
> > - importing packages and classes (for  SDO)
> > - how to do initialization when a script is loaded
> > - probably some others...
> >
> > Are these tests or samples? Should they be in the JavaScript project or
> > Samples project?
> >
> > I'm inclined to keep them in the JavaScript project as testcase/samples
> > instead of keeping on adding things to Samples.
> >
> > I'd also quite like to have them coded just like a user would, using a
> J2SE
> > client doing new TuscanyRuntime/getModuleContext/locateService, and with
> an
> > sca.module file for each one so its obvious what SCDL is required. Thats
> not
> > possible though if they're all in the JavaScript project as each project
> can
> > only have the single sca.module file in the top level of the project.
> That
> > was discussed here:
> >
> http://mail-archives.apache.org/mod_mbox/ws-tuscany-dev/200602.mbox/%3c44030F98.2030408@apache.org%3e
> >
> > An alternative would be to have a JavaScript sub project in samples and
> add
> > all these samples as sub projects to that.
> >
> > Any comments or suggestions?
> >
> >    ...ant
> >
> >
> Ant, +1 from me, the more samples we have the better! I like the idea of
> having a javascript sub project with samples as sub-projects, mainly
> because I think it's what app developers will do: one project per SCA
> module.
>
> --
> Jean-Sebastien
>
>

Re: Where should JavaScript componentType samples go?

Posted by Jean-Sebastien Delfino <js...@apache.org>.
ant elder wrote:
> I'd like to make some more complete samples for the JavaScript componentType
> so where should they go?
>
> JavaScript works a bit differently from Java so I think there should be
> separate samples for things like:
> - basic helloworld
> - properties
> - service references
> - a couple for E4X (if thats going)
> - importing packages and classes (for  SDO)
> - how to do initialization when a script is loaded
> - probably some others...
>
> Are these tests or samples? Should they be in the JavaScript project or
> Samples project?
>
> I'm inclined to keep them in the JavaScript project as testcase/samples
> instead of keeping on adding things to Samples.
>
> I'd also quite like to have them coded just like a user would, using a J2SE
> client doing new TuscanyRuntime/getModuleContext/locateService, and with an
> sca.module file for each one so its obvious what SCDL is required. Thats not
> possible though if they're all in the JavaScript project as each project can
> only have the single sca.module file in the top level of the project. That
> was discussed here:
> http://mail-archives.apache.org/mod_mbox/ws-tuscany-dev/200602.mbox/%3c44030F98.2030408@apache.org%3e
>
> An alternative would be to have a JavaScript sub project in samples and add
> all these samples as sub projects to that.
>
> Any comments or suggestions?
>
>    ...ant
>
>   
Ant, +1 from me, the more samples we have the better! I like the idea of 
having a javascript sub project with samples as sub-projects, mainly 
because I think it's what app developers will do: one project per SCA 
module.

-- 
Jean-Sebastien