You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by "Hensley, Richard" <Ri...@McKesson.com> on 2004/06/11 17:04:50 UTC
Alternatives to Java for component and page implementation
I'm fairly new to tapestry, having only been building a prototype
application for about a week now. I've poked around, but I can't seem to
find any activity on using Groovy or Jython or other BSF languages to build
component or page objects. I see that the BSF jar is part of the libraries,
but I haven't quite figured out why. Has anybody used a scripting language
for page implementation with Tapestry?
Richard Hensley
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
RE: Alternatives to Java for component and page implementation
Posted by "Howard M. Lewis Ship" <hl...@comcast.net>.
Just Rapid Application Development. With caching disabled, you can change everything about your page
at runtime with no recompiles. I think as Spindle and Jetty Launcher have improved, the need for
this is waning.
--
Howard M. Lewis Ship
Independent J2EE / Open-Source Java Consultant
Creator, Jakarta Tapestry
Creator, Jakarta HiveMind
http://howardlewisship.com
> -----Original Message-----
> From: Ben Mathews [mailto:bmathews@wilcoxassoc.com]
> Sent: Friday, June 11, 2004 3:48 PM
> To: 'Tapestry users'
> Subject: RE: Alternatives to Java for component and page
> implementation
>
>
> This is an interesting idea, but I'm not sure why I would use it.
>
> Doesn't it shift the detection of errors from compile time to
> run time and
> force me back to coding without all the bells and whistles
> that a good java
> ide gives?
>
> What are the selling points for using scripting like this?
>
> Ben Mathews
> Central Point, OR
>
>
> > -----Original Message-----
> > From: Jamie Orchard-Hays [mailto:jamie@dang.com]
> > Sent: Friday, June 11, 2004 12:39 PM
> > To: Tapestry users
> > Subject: Re: Alternatives to Java for component and page
> implementation
> >
> > Here's what Erik posted to our Wiki:
> >
> > "I put Rhino's js.jar into our Career application. This
> allows for rapid
> > development of listener methods using the <listener-binding> without
> > having
> > to re-deploy the application. Simply create a page
> (Test.html/.page in
> > this
> > example): "
> >
> > <span jwcid="@Border">
> > Testing!
> > <a jwcid="link">click it</a> <span jwcid="show">none</span>
> > </span>
> >
> >
> > <page-specification>
> > <property-specification name="greeting" initial-value="'initial'"
> > type="java.lang.String"/>
> > <component id="link" type="DirectLink">
> > <listener-binding name="listener">
> > page.greeting = "clicked";
> > </listener-binding>
> > </component>
> >
> > <component id="show" type="Insert">
> > <binding name="value" expression="greeting"/>
> > </component>
> > </page-specification>
> >
> > "JavaScript is used in the <listener-binding> by default.
> If you have a
> > hankering for another BSF supported language, get the
> corresponding JAR
> > added to the WAR file and say language="." appropriately. 'page',
> > 'component
> > ', and 'cycle' are objects available. Notice that in my
> example there is
> > not
> > a Java class associated with the page. I chose JavaScript
> as the default
> > so
> > that it'll be quicker morphing of listener-binding code
> into true Java
> > classes when development is done. There are Rhino
> JavaScript commands to
> > do
> > import of other classes and such - seek out the docs to see
> how to do this
> > when you need to."
> >
> > Then, in your tapestry .application file:
> >
> > <!-- for listener-binding -->
> > <property name="org.apache.tapestry.default-script-language"
> > value="javascript"/>
> >
> > Hope this helps get you going.
> >
> >
> >
> > Jamie
> >
> >
> >
> > ----- Original Message -----
> > From: "Pablo Lalloni" <pl...@afip.gov.ar>
> > To: "Tapestry users" <ta...@jakarta.apache.org>
> > Sent: Friday, June 11, 2004 3:21 PM
> > Subject: Re: Alternatives to Java for component and page
> implementation
> >
> >
> > I've succesfuly used Jython to handle listeners in the past and
> > currently we're extensively using Groovy for the same task.
> >
> > A Jython limitation is not having a free form syntax, so scripts
> > embedded in XML looked very ugly because you can't use xml
> indentation
> > on <listeners-binding>. Also Jython has a ver loooong startup time.
> > Definitely a pro is it's extensive libraries... inherited
> from python.
> >
> > So far we're happy with Groovy, given it is free-form and
> that listeners
> > are actually compiled to java classes which saves the "interpreted"
> > stigma.
> >
> > We had classloading problems when mixing javassist + bsf +
> groovy which
> > we resolved telling groovy to use reflection introspection and not
> > runtime generated introspector classes... of course this
> represents a
> > performance impact, but compared to jython it's still much better.
> >
> > Haven't try others but BSH and Judo seems promising.
> >
> > El vie, 11-06-2004 a las 12:04, Hensley, Richard escribió:
> >
> > > I'm fairly new to tapestry, having only been building a prototype
> > > application for about a week now. I've poked around, but
> I can't seem to
> > > find any activity on using Groovy or Jython or other BSF
> languages to
> > build
> > > component or page objects. I see that the BSF jar is part of the
> > libraries,
> > > but I haven't quite figured out why. Has anybody used a scripting
> > language
> > > for page implementation with Tapestry?
> > >
> > > Richard Hensley
> > >
> > >
> > >
> ---------------------------------------------------------------------
> > > To unsubscribe, e-mail:
> tapestry-user-unsubscribe@jakarta.apache.org
> > > For additional commands, e-mail:
> tapestry-user-help@jakarta.apache.org
> >
> >
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail:
> tapestry-user-help@jakarta.apache.org
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
RE: Alternatives to Java for component and page implementation
Posted by Ben Mathews <bm...@wilcoxassoc.com>.
This is an interesting idea, but I'm not sure why I would use it.
Doesn't it shift the detection of errors from compile time to run time and
force me back to coding without all the bells and whistles that a good java
ide gives?
What are the selling points for using scripting like this?
Ben Mathews
Central Point, OR
> -----Original Message-----
> From: Jamie Orchard-Hays [mailto:jamie@dang.com]
> Sent: Friday, June 11, 2004 12:39 PM
> To: Tapestry users
> Subject: Re: Alternatives to Java for component and page implementation
>
> Here's what Erik posted to our Wiki:
>
> "I put Rhino's js.jar into our Career application. This allows for rapid
> development of listener methods using the <listener-binding> without
> having
> to re-deploy the application. Simply create a page (Test.html/.page in
> this
> example): "
>
> <span jwcid="@Border">
> Testing!
> <a jwcid="link">click it</a> <span jwcid="show">none</span>
> </span>
>
>
> <page-specification>
> <property-specification name="greeting" initial-value="'initial'"
> type="java.lang.String"/>
> <component id="link" type="DirectLink">
> <listener-binding name="listener">
> page.greeting = "clicked";
> </listener-binding>
> </component>
>
> <component id="show" type="Insert">
> <binding name="value" expression="greeting"/>
> </component>
> </page-specification>
>
> "JavaScript is used in the <listener-binding> by default. If you have a
> hankering for another BSF supported language, get the corresponding JAR
> added to the WAR file and say language="." appropriately. 'page',
> 'component
> ', and 'cycle' are objects available. Notice that in my example there is
> not
> a Java class associated with the page. I chose JavaScript as the default
> so
> that it'll be quicker morphing of listener-binding code into true Java
> classes when development is done. There are Rhino JavaScript commands to
> do
> import of other classes and such - seek out the docs to see how to do this
> when you need to."
>
> Then, in your tapestry .application file:
>
> <!-- for listener-binding -->
> <property name="org.apache.tapestry.default-script-language"
> value="javascript"/>
>
> Hope this helps get you going.
>
>
>
> Jamie
>
>
>
> ----- Original Message -----
> From: "Pablo Lalloni" <pl...@afip.gov.ar>
> To: "Tapestry users" <ta...@jakarta.apache.org>
> Sent: Friday, June 11, 2004 3:21 PM
> Subject: Re: Alternatives to Java for component and page implementation
>
>
> I've succesfuly used Jython to handle listeners in the past and
> currently we're extensively using Groovy for the same task.
>
> A Jython limitation is not having a free form syntax, so scripts
> embedded in XML looked very ugly because you can't use xml indentation
> on <listeners-binding>. Also Jython has a ver loooong startup time.
> Definitely a pro is it's extensive libraries... inherited from python.
>
> So far we're happy with Groovy, given it is free-form and that listeners
> are actually compiled to java classes which saves the "interpreted"
> stigma.
>
> We had classloading problems when mixing javassist + bsf + groovy which
> we resolved telling groovy to use reflection introspection and not
> runtime generated introspector classes... of course this represents a
> performance impact, but compared to jython it's still much better.
>
> Haven't try others but BSH and Judo seems promising.
>
> El vie, 11-06-2004 a las 12:04, Hensley, Richard escribió:
>
> > I'm fairly new to tapestry, having only been building a prototype
> > application for about a week now. I've poked around, but I can't seem to
> > find any activity on using Groovy or Jython or other BSF languages to
> build
> > component or page objects. I see that the BSF jar is part of the
> libraries,
> > but I haven't quite figured out why. Has anybody used a scripting
> language
> > for page implementation with Tapestry?
> >
> > Richard Hensley
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
Re: Alternatives to Java for component and page implementation
Posted by Jamie Orchard-Hays <ja...@dang.com>.
Here's what Erik posted to our Wiki:
"I put Rhino's js.jar into our Career application. This allows for rapid
development of listener methods using the <listener-binding> without having
to re-deploy the application. Simply create a page (Test.html/.page in this
example): "
<span jwcid="@Border">
Testing!
<a jwcid="link">click it</a> <span jwcid="show">none</span>
</span>
<page-specification>
<property-specification name="greeting" initial-value="'initial'"
type="java.lang.String"/>
<component id="link" type="DirectLink">
<listener-binding name="listener">
page.greeting = "clicked";
</listener-binding>
</component>
<component id="show" type="Insert">
<binding name="value" expression="greeting"/>
</component>
</page-specification>
"JavaScript is used in the <listener-binding> by default. If you have a
hankering for another BSF supported language, get the corresponding JAR
added to the WAR file and say language="." appropriately. 'page', 'component
', and 'cycle' are objects available. Notice that in my example there is not
a Java class associated with the page. I chose JavaScript as the default so
that it'll be quicker morphing of listener-binding code into true Java
classes when development is done. There are Rhino JavaScript commands to do
import of other classes and such - seek out the docs to see how to do this
when you need to."
Then, in your tapestry .application file:
<!-- for listener-binding -->
<property name="org.apache.tapestry.default-script-language"
value="javascript"/>
Hope this helps get you going.
Jamie
----- Original Message -----
From: "Pablo Lalloni" <pl...@afip.gov.ar>
To: "Tapestry users" <ta...@jakarta.apache.org>
Sent: Friday, June 11, 2004 3:21 PM
Subject: Re: Alternatives to Java for component and page implementation
I've succesfuly used Jython to handle listeners in the past and
currently we're extensively using Groovy for the same task.
A Jython limitation is not having a free form syntax, so scripts
embedded in XML looked very ugly because you can't use xml indentation
on <listeners-binding>. Also Jython has a ver loooong startup time.
Definitely a pro is it's extensive libraries... inherited from python.
So far we're happy with Groovy, given it is free-form and that listeners
are actually compiled to java classes which saves the "interpreted"
stigma.
We had classloading problems when mixing javassist + bsf + groovy which
we resolved telling groovy to use reflection introspection and not
runtime generated introspector classes... of course this represents a
performance impact, but compared to jython it's still much better.
Haven't try others but BSH and Judo seems promising.
El vie, 11-06-2004 a las 12:04, Hensley, Richard escribió:
> I'm fairly new to tapestry, having only been building a prototype
> application for about a week now. I've poked around, but I can't seem to
> find any activity on using Groovy or Jython or other BSF languages to
build
> component or page objects. I see that the BSF jar is part of the
libraries,
> but I haven't quite figured out why. Has anybody used a scripting language
> for page implementation with Tapestry?
>
> Richard Hensley
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
Re: Alternatives to Java for component and page implementation
Posted by Pablo Lalloni <pl...@afip.gov.ar>.
I've succesfuly used Jython to handle listeners in the past and
currently we're extensively using Groovy for the same task.
A Jython limitation is not having a free form syntax, so scripts
embedded in XML looked very ugly because you can't use xml indentation
on <listeners-binding>. Also Jython has a ver loooong startup time.
Definitely a pro is it's extensive libraries... inherited from python.
So far we're happy with Groovy, given it is free-form and that listeners
are actually compiled to java classes which saves the "interpreted"
stigma.
We had classloading problems when mixing javassist + bsf + groovy which
we resolved telling groovy to use reflection introspection and not
runtime generated introspector classes... of course this represents a
performance impact, but compared to jython it's still much better.
Haven't try others but BSH and Judo seems promising.
El vie, 11-06-2004 a las 12:04, Hensley, Richard escribió:
> I'm fairly new to tapestry, having only been building a prototype
> application for about a week now. I've poked around, but I can't seem to
> find any activity on using Groovy or Jython or other BSF languages to build
> component or page objects. I see that the BSF jar is part of the libraries,
> but I haven't quite figured out why. Has anybody used a scripting language
> for page implementation with Tapestry?
>
> Richard Hensley
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
Re: Alternatives to Java for component and page implementation
Posted by Geoff Longman <gl...@intelligentworks.com>.
isn't it <listener-specification> ? Never used it myself
Geoff
----- Original Message -----
From: "Jamie Orchard-Hays" <ja...@dang.com>
To: "Tapestry users" <ta...@jakarta.apache.org>
Sent: Friday, June 11, 2004 11:24 AM
Subject: Re: Alternatives to Java for component and page implementation
> Only for handling listeners when prototyping. It's been a while since I did
> this and can't remember the syntax off the top of my head.
>
> Jamie
> ----- Original Message -----
> From: "Hensley, Richard" <Ri...@McKesson.com>
> To: "'Tapestry users'" <ta...@jakarta.apache.org>
> Sent: Friday, June 11, 2004 11:04 AM
> Subject: Alternatives to Java for component and page implementation
>
>
> > I'm fairly new to tapestry, having only been building a prototype
> > application for about a week now. I've poked around, but I can't seem to
> > find any activity on using Groovy or Jython or other BSF languages to
> build
> > component or page objects. I see that the BSF jar is part of the
> libraries,
> > but I haven't quite figured out why. Has anybody used a scripting language
> > for page implementation with Tapestry?
> >
> > Richard Hensley
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
Re: Alternatives to Java for component and page implementation
Posted by Jamie Orchard-Hays <ja...@dang.com>.
Only for handling listeners when prototyping. It's been a while since I did
this and can't remember the syntax off the top of my head.
Jamie
----- Original Message -----
From: "Hensley, Richard" <Ri...@McKesson.com>
To: "'Tapestry users'" <ta...@jakarta.apache.org>
Sent: Friday, June 11, 2004 11:04 AM
Subject: Alternatives to Java for component and page implementation
> I'm fairly new to tapestry, having only been building a prototype
> application for about a week now. I've poked around, but I can't seem to
> find any activity on using Groovy or Jython or other BSF languages to
build
> component or page objects. I see that the BSF jar is part of the
libraries,
> but I haven't quite figured out why. Has anybody used a scripting language
> for page implementation with Tapestry?
>
> Richard Hensley
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org