You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by "Angelo C." <an...@gmail.com> on 2010/12/03 16:12:15 UTC

T5: scripting

Hi,

I need some scripting functions in t5 app, what are the options available?
looks like Groovy is easier, I have included the groovy-all-minimal into the
app, but how to use it? looking for a sample usage, say just a service class
in Groovy returning a string 'Hello', and how to call this from a page class
so that it could be rendered to the browser? thanks,

Angelo
-- 
View this message in context: http://tapestry.1045711.n5.nabble.com/T5-scripting-tp3291002p3291002.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: T5: scripting

Posted by "Angelo C." <an...@gmail.com>.
Please do, that will be of great help! Thanks.


Werner Keil wrote:
> 
> I got some great results from the Java 6 Scripting JSR with Groovy as its
> implementation in a T5 app.
> 
> We used it mainly for templating, but if you prefer simple scripting, that
> would also work.
> 
> I may add some simple snippets for those who wish to see.
> 
> Werner
> 
> On Fri, Dec 3, 2010 at 8:42 PM, Angelo C. <an...@gmail.com> wrote:
> 
> 
> 

-- 
View this message in context: http://tapestry.1045711.n5.nabble.com/T5-scripting-tp3291002p3296689.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: T5: scripting

Posted by Werner Keil <we...@gmail.com>.
I got some great results from the Java 6 Scripting JSR with Groovy as its
implementation in a T5 app.

We used it mainly for templating, but if you prefer simple scripting, that
would also work.

I may add some simple snippets for those who wish to see.

Werner

On Fri, Dec 3, 2010 at 8:42 PM, Angelo C. <an...@gmail.com> wrote:

>
> Hi,
>
> I need some scripting functions in t5 app, what are the options available?
> looks like Groovy is easier, I have included the groovy-all-minimal into
> the
> app, but how to use it? looking for a sample usage, say just a service
> class
> in Groovy returning a string 'Hello', and how to call this from a page
> class
> so that it could be rendered to the browser? thanks,
>
> Angelo
> --
> View this message in context:
> http://tapestry.1045711.n5.nabble.com/T5-scripting-tp3291002p3291002.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>

Re: T5: scripting

Posted by Paul Stanton <pa...@mapshed.com.au>.
groovy is for hippies ;)

On 7/12/2010 12:45 PM, Angelo C. wrote:
> if that's the case, probably Groovy is for scripting and test code for now.
>
>
> Thiago H. de Paula Figueiredo wrote:
>> On Mon, 06 Dec 2010 00:54:46 -0200, Angelo C.<an...@gmail.com>
>> wrote:
>>
>>
>> All the performance comparisons I've seen show Java performance to be 10x
>> of the Groovy one. Being a dynamic-typed language has its cost.
>>
>> -- 
>> Thiago H. de Paula Figueiredo
>> Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,
>> and instructor
>> Owner, Ars Machina Tecnologia da Informação Ltda.
>> http://www.arsmachina.com.br
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
>>
>>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: T5: scripting

Posted by "Angelo C." <an...@gmail.com>.
if that's the case, probably Groovy is for scripting and test code for now.


Thiago H. de Paula Figueiredo wrote:
> 
> On Mon, 06 Dec 2010 00:54:46 -0200, Angelo C. <an...@gmail.com>  
> wrote:
> 
> 
> All the performance comparisons I've seen show Java performance to be 10x  
> of the Groovy one. Being a dynamic-typed language has its cost.
> 
> -- 
> Thiago H. de Paula Figueiredo
> Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
> and instructor
> Owner, Ars Machina Tecnologia da Informação Ltda.
> http://www.arsmachina.com.br
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
> 
> 
> 

-- 
View this message in context: http://tapestry.1045711.n5.nabble.com/T5-scripting-tp3291002p3295149.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: T5: scripting

Posted by "Thiago H. de Paula Figueiredo" <th...@gmail.com>.
On Mon, 06 Dec 2010 00:54:46 -0200, Angelo C. <an...@gmail.com>  
wrote:

> was thinking of trying out GRails, now with Groovy in T5, seems that's a  
> good use. so far got some services and page class up and running  
> already, not
> sure about any difference in performance, I presume they are more or less
> same as java classes, as they are compiled into .class first.

All the performance comparisons I've seen show Java performance to be 10x  
of the Groovy one. Being a dynamic-typed language has its cost.

-- 
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
and instructor
Owner, Ars Machina Tecnologia da Informação Ltda.
http://www.arsmachina.com.br

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: T5: scripting

Posted by "Angelo C." <an...@gmail.com>.
was thinking of trying out GRails, now with Groovy in T5, seems that's a good
use. so far got some services and page class up and running already, not
sure about any difference in performance, I presume they are more or less
same as java classes, as they are compiled into .class first.


Thiago H. de Paula Figueiredo wrote:
> 
> On Fri, 03 Dec 2010 13:12:15 -0200, Angelo C. <an...@gmail.com>  
> wrote:
> 
> By the way, you can write page, component, mixin and service classes in  
> Groovy and Scala (which is not a scripting language, I know. :)).
> 
> 

-- 
View this message in context: http://tapestry.1045711.n5.nabble.com/T5-scripting-tp3291002p3293537.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: T5: scripting

Posted by "Thiago H. de Paula Figueiredo" <th...@gmail.com>.
On Fri, 03 Dec 2010 13:12:15 -0200, Angelo C. <an...@gmail.com>  
wrote:

> Hi,

Hi!

> I need some scripting functions in t5 app, what are the options  
> available?
> looks like Groovy is easier, I have included the groovy-all-minimal into  
> the app, but how to use it? looking for a sample usage, say just a  
> service class in Groovy returning a string 'Hello', and how to call this  
> from a page class so that it could be rendered to the browser? thanks,

This isn't specific to Tapestry. Just try to find out how you can invoke  
Groovy code from Java. Another option is to use JavaScript (Rhino).

By the way, you can write page, component, mixin and service classes in  
Groovy and Scala (which is not a scripting language, I know. :)).

-- 
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
and instructor
Owner, Ars Machina Tecnologia da Informação Ltda.
http://www.arsmachina.com.br

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: T5: scripting

Posted by "Thiago H. de Paula Figueiredo" <th...@gmail.com>.
On Sun, 05 Dec 2010 06:39:21 -0200, Angelo C. <an...@gmail.com>  
wrote:

> looks like not for T5, probably for an earlier version?

Definetely for Tapestry 4 or earlier.

-- 
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
and instructor
Owner, Ars Machina Tecnologia da Informação Ltda.
http://www.arsmachina.com.br

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: T5: scripting

Posted by "Angelo C." <an...@gmail.com>.
looks like not for T5, probably for an earlier version?


Wilson Ikeda wrote:
> 
> I believe that this is something that should be added to tapestry site (if
> it's not already): Tapestry - Groovy integration
> 
> http://groovestry.sourceforge.net/
> 
> 

-- 
View this message in context: http://tapestry.1045711.n5.nabble.com/T5-scripting-tp3291002p3292772.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org