You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Bill Lear <ra...@zopyra.com> on 2003/06/13 15:04:13 UTC

Re: simple tapestry examples

On Friday, June 13, 2003 at 13:46:36 (-0100) Peter Lappo writes:
>Hi,
>Can anyone point me to some simple tapestry
>examples using 3.0-beta-1. I've looked at the examples in the release but
>I'm looking for
>something smaller which I can use as a template to grow my application.

Recently posted:

>http://pwp.netcabo.pt/lneves/projects/petshop-0.3.tar.gz
>
>(just extract it to a directory somewhere and issue a "ant run" command ant 
>point your browser to "http://localhost:8081/petshop/")

and also this:

>I have published a small "Customer Registration" demo application .war
>file at http://mywebpages.comcast.net/hkrishnaswamy/.


Bill

Re: Tapestry vs JSF

Posted by Eitan Suez <ei...@uptodata.com>.
hi,

   i'm catching up on a really long list of mailing list messages
   and came across your comparison with JSF on the tapestry
   mailing list.

   thanks for taking the time to do this!  there's a lot of
   propaganda out there.  not knowing much about jsf,
   this kind of information really helps arm me for
   my next attempt to explain to someone why they should
   consider tapestry over another jsp-based framework.

/ eitan

Mindbridge wrote:

> Hi,
> 
> I just want to add a couple of things to Howard's post.
> 
> JSF is a set of APIs, wrapped by Taglibs, for use (mostly) in JSP pages.
> 
> JSF claims to be a component framework, but its JSP and Taglib roots are
> simply dragging it back and preventing it from really achieving its goals.
> 
> Here is just _one_ example -- defining components.
> 
> In order to define a new component in Tapestry you need to do:
> 
> 1. Declare the component specification (parameters, etc) in a .JWC file
> 2. Create the component template and save it into a .HTML file
> 3. [optional] Write the component logic into a Java Bean
> 4. [optional] Declare the component in the application or in a library
> 
> Also, the UI of the component is defined in a template that is easy to
> understand and modify by a web designer or another developer; components and
> pages are pretty much the same -- there is little fundamental difference
> between the two -- the concepts that a developer has to deal are just a
> single set.
> 
> 
> In contrast, here is the procedure you must follow to define a new JSF
> component according to the JSF tutorial:
> 
> ----------------------8<-------------------------
> 1. Write a tag handler class that extends javax.faces.webapp.FacesTag. In
> this class, you need:
>     . A getRendererType method, which returns the type of your custom
> renderer, if you are using one (explained in step 4).
>     . A getComponentType method, which returns the type of the custom
> component.
>     . An overrideProperties method, in which you set all of the new
> attributes of your component.
> 
> 2. Create a tag library descriptor (TLD) that defines the custom tag.
> 
> 3. Create a custom component class
> 
> 4. Include the rendering code in the component class or delegate it to a
> renderer (explained in step 6).
> 
> 5. If your component generates events, queue the event on the FacesContext.
> 
> 6. Delegate rendering to a renderer if your component does not handle the
> rendering.
>     a. Create a custom renderer class by extending
> javax.faces.render.Renderer.
>     b. Register the renderer to a render kit.
>     c. Identify the renderer type in the component tag handler.
> 
> 7. Register the component
> 
> 8. Create an event handler if your component generates events.
> 
> 9. Declare your new TLD in your JSP page and use the tag in the page.
> ---------------------->8-------------------------
> 
> In addition, the UI of new components is defined very differently and is
> much more dificult to understand than the UI of JSP pages. Typically this is
> done in the Java code itself -- there has been no effort to make the
> code/HTML separation as in Tapestry.
> 
> Given all this, I can only conclude that JSF essentially _discourages_
> developers from building his own components, and instead use standard ones
> provided by a "guru" who has time and can expend the effort to do and test
> all of the above.
> 
> Writing components-based apps for JSF is like writing OO code in C -- it is
> certainly possible, but it is much more difficult than doing it by using a
> language designed for that purpose.
> 
> 
> Just to conclude -- there is a big _conceptual_ difference between the two
> frameworks in general:
> 
> Tapestry was built from the ground up with a specific philosophy in mind -- 
> "objects, methods, properties" rather than strings and URLs, and if I may
> add, "simplicity, modularity, scalability" rather than a complex political
> marriage of different technologies. During the design of Tapestry Howard has
> not been afraid to throw away what does not work and utilize only ideas that
> make life for developers easier.
> 
> On the other hand JSF constitutes a blank refusal to let go of legacy
> technologies that are limited in scope, have proved problematic in
> large-sclae development, and instead come up with something new and
> effective. It simply piles up complexity on top of the existing approaches
> and refuses to acknowledge the errors of the past. At the end, tools may
> compensate a little for the complexity of JSF development, but they simply
> cannot resolve the fundamental issues.
> 
> 
> Frankly, I am quite disappointed with JSF -- it will probably cause more
> problems than it will resolve. It could have been a far better framework if
> it had not voluntarily taken upon the above design limitations. Pity that
> Sun will try to ram it down everybody's throat, but it is questionable how
> much people can take if it is their productivity that suffers.
> 
> Best regards,
> -mb


Re: Tapestry vs JSF

Posted by Harish Krishnaswamy <hk...@comcast.net>.
I am having so much fun Tapestry that I cannot even imagine going back 
tag based approach.

-Harish

Mindbridge wrote:

>Hi,
>
>I just want to add a couple of things to Howard's post.
>
>JSF is a set of APIs, wrapped by Taglibs, for use (mostly) in JSP pages.
>
>JSF claims to be a component framework, but its JSP and Taglib roots are
>simply dragging it back and preventing it from really achieving its goals.
>
>Here is just _one_ example -- defining components.
>
>In order to define a new component in Tapestry you need to do:
>
>1. Declare the component specification (parameters, etc) in a .JWC file
>2. Create the component template and save it into a .HTML file
>3. [optional] Write the component logic into a Java Bean
>4. [optional] Declare the component in the application or in a library
>
>Also, the UI of the component is defined in a template that is easy to
>understand and modify by a web designer or another developer; components and
>pages are pretty much the same -- there is little fundamental difference
>between the two -- the concepts that a developer has to deal are just a
>single set.
>
>
>In contrast, here is the procedure you must follow to define a new JSF
>component according to the JSF tutorial:
>
>----------------------8<-------------------------
>1. Write a tag handler class that extends javax.faces.webapp.FacesTag. In
>this class, you need:
>    . A getRendererType method, which returns the type of your custom
>renderer, if you are using one (explained in step 4).
>    . A getComponentType method, which returns the type of the custom
>component.
>    . An overrideProperties method, in which you set all of the new
>attributes of your component.
>
>2. Create a tag library descriptor (TLD) that defines the custom tag.
>
>3. Create a custom component class
>
>4. Include the rendering code in the component class or delegate it to a
>renderer (explained in step 6).
>
>5. If your component generates events, queue the event on the FacesContext.
>
>6. Delegate rendering to a renderer if your component does not handle the
>rendering.
>    a. Create a custom renderer class by extending
>javax.faces.render.Renderer.
>    b. Register the renderer to a render kit.
>    c. Identify the renderer type in the component tag handler.
>
>7. Register the component
>
>8. Create an event handler if your component generates events.
>
>9. Declare your new TLD in your JSP page and use the tag in the page.
>---------------------->8-------------------------
>
>In addition, the UI of new components is defined very differently and is
>much more dificult to understand than the UI of JSP pages. Typically this is
>done in the Java code itself -- there has been no effort to make the
>code/HTML separation as in Tapestry.
>
>Given all this, I can only conclude that JSF essentially _discourages_
>developers from building his own components, and instead use standard ones
>provided by a "guru" who has time and can expend the effort to do and test
>all of the above.
>
>Writing components-based apps for JSF is like writing OO code in C -- it is
>certainly possible, but it is much more difficult than doing it by using a
>language designed for that purpose.
>
>
>Just to conclude -- there is a big _conceptual_ difference between the two
>frameworks in general:
>
>Tapestry was built from the ground up with a specific philosophy in mind -- 
>"objects, methods, properties" rather than strings and URLs, and if I may
>add, "simplicity, modularity, scalability" rather than a complex political
>marriage of different technologies. During the design of Tapestry Howard has
>not been afraid to throw away what does not work and utilize only ideas that
>make life for developers easier.
>
>On the other hand JSF constitutes a blank refusal to let go of legacy
>technologies that are limited in scope, have proved problematic in
>large-sclae development, and instead come up with something new and
>effective. It simply piles up complexity on top of the existing approaches
>and refuses to acknowledge the errors of the past. At the end, tools may
>compensate a little for the complexity of JSF development, but they simply
>cannot resolve the fundamental issues.
>
>
>Frankly, I am quite disappointed with JSF -- it will probably cause more
>problems than it will resolve. It could have been a far better framework if
>it had not voluntarily taken upon the above design limitations. Pity that
>Sun will try to ram it down everybody's throat, but it is questionable how
>much people can take if it is their productivity that suffers.
>
>Best regards,
>-mb
>
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>
>  
>



Re: Tapestry vs JSF

Posted by Mindbridge <mi...@yahoo.com>.
Hi,

I just want to add a couple of things to Howard's post.

JSF is a set of APIs, wrapped by Taglibs, for use (mostly) in JSP pages.

JSF claims to be a component framework, but its JSP and Taglib roots are
simply dragging it back and preventing it from really achieving its goals.

Here is just _one_ example -- defining components.

In order to define a new component in Tapestry you need to do:

1. Declare the component specification (parameters, etc) in a .JWC file
2. Create the component template and save it into a .HTML file
3. [optional] Write the component logic into a Java Bean
4. [optional] Declare the component in the application or in a library

Also, the UI of the component is defined in a template that is easy to
understand and modify by a web designer or another developer; components and
pages are pretty much the same -- there is little fundamental difference
between the two -- the concepts that a developer has to deal are just a
single set.


In contrast, here is the procedure you must follow to define a new JSF
component according to the JSF tutorial:

----------------------8<-------------------------
1. Write a tag handler class that extends javax.faces.webapp.FacesTag. In
this class, you need:
    . A getRendererType method, which returns the type of your custom
renderer, if you are using one (explained in step 4).
    . A getComponentType method, which returns the type of the custom
component.
    . An overrideProperties method, in which you set all of the new
attributes of your component.

2. Create a tag library descriptor (TLD) that defines the custom tag.

3. Create a custom component class

4. Include the rendering code in the component class or delegate it to a
renderer (explained in step 6).

5. If your component generates events, queue the event on the FacesContext.

6. Delegate rendering to a renderer if your component does not handle the
rendering.
    a. Create a custom renderer class by extending
javax.faces.render.Renderer.
    b. Register the renderer to a render kit.
    c. Identify the renderer type in the component tag handler.

7. Register the component

8. Create an event handler if your component generates events.

9. Declare your new TLD in your JSP page and use the tag in the page.
---------------------->8-------------------------

In addition, the UI of new components is defined very differently and is
much more dificult to understand than the UI of JSP pages. Typically this is
done in the Java code itself -- there has been no effort to make the
code/HTML separation as in Tapestry.

Given all this, I can only conclude that JSF essentially _discourages_
developers from building his own components, and instead use standard ones
provided by a "guru" who has time and can expend the effort to do and test
all of the above.

Writing components-based apps for JSF is like writing OO code in C -- it is
certainly possible, but it is much more difficult than doing it by using a
language designed for that purpose.


Just to conclude -- there is a big _conceptual_ difference between the two
frameworks in general:

Tapestry was built from the ground up with a specific philosophy in mind -- 
"objects, methods, properties" rather than strings and URLs, and if I may
add, "simplicity, modularity, scalability" rather than a complex political
marriage of different technologies. During the design of Tapestry Howard has
not been afraid to throw away what does not work and utilize only ideas that
make life for developers easier.

On the other hand JSF constitutes a blank refusal to let go of legacy
technologies that are limited in scope, have proved problematic in
large-sclae development, and instead come up with something new and
effective. It simply piles up complexity on top of the existing approaches
and refuses to acknowledge the errors of the past. At the end, tools may
compensate a little for the complexity of JSF development, but they simply
cannot resolve the fundamental issues.


Frankly, I am quite disappointed with JSF -- it will probably cause more
problems than it will resolve. It could have been a far better framework if
it had not voluntarily taken upon the above design limitations. Pity that
Sun will try to ram it down everybody's throat, but it is questionable how
much people can take if it is their productivity that suffers.

Best regards,
-mb




Tapestry vs JSF

Posted by worookie <wo...@hotmail.com>.
I read a news from TheServerSide:
http://www.theserverside.com/resources/article.jsp?l=JavaOneDayOne_03
whichs says JSF is kind of copying from WebObjects/Tapestry.

So, if JSF becomes part of the J2SE/J2EE standard a couple of years later,
what will the role of Tapestry look like?

Will Tapestry become the first implementation of JSF?

-WORookie

Re: simple tapestry examples

Posted by Harish Krishnaswamy <hk...@comcast.net>.
Hm.. guess that's one place to put it! Thanks for pointing it out. I 
have added a Tapestry Resources section to the Wiki Home Page at 
http://tapestry.sourceforge.net/wiki/index.php/HomePage. Guess we can 
start maintaining a list here.

Thanks
Harish

Peter Lappo wrote:

>I'd have thought the wiki is the place?
>http://tapestry.sourceforge.net/wiki/ 
>then I wouldn't have bothered you!
>
>At 10:47 13/06/2003 -0400, Harish Krishnaswamy wrote:
>  
>
>>Would it be too much to ask for a references section on the Tapestry website where we can put links to these references ?
>>
>>Thanks
>>Harish
>>
>>Bill Lear wrote:
>>
>>    
>>
>>>On Friday, June 13, 2003 at 13:46:36 (-0100) Peter Lappo writes:
>>>
>>>
>>>      
>>>
>>>>Hi,
>>>>Can anyone point me to some simple tapestry
>>>>examples using 3.0-beta-1. I've looked at the examples in the release but
>>>>I'm looking for
>>>>something smaller which I can use as a template to grow my application.
>>>>  
>>>>        
>>>>
>>>Recently posted:
>>>
>>>
>>>
>>>      
>>>
>>>>http://pwp.netcabo.pt/lneves/projects/petshop-0.3.tar.gz
>>>>
>>>>(just extract it to a directory somewhere and issue a "ant run" command ant point your browser to "http://localhost:8081/petshop/")
>>>>  
>>>>        
>>>>
>>>and also this:
>>>
>>>
>>>
>>>      
>>>
>>>>I have published a small "Customer Registration" demo application .war
>>>>file at http://mywebpages.comcast.net/hkrishnaswamy/.
>>>>  
>>>>        
>>>>
>>>Bill
>>>
>>>---------------------------------------------------------------------
>>>To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
>>>For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>>>
>>>
>>>
>>>      
>>>
>
>
>Peter 
>
>www.smr.co.uk
>office +44 (0)1273 556600 mobile +44 (0)7767 784452
>Java C++ SQL HTML XP: Web Application Development and Consulting
>
>  
>


Re: simple tapestry examples

Posted by Peter Lappo <pe...@smr.co.uk>.
I'd have thought the wiki is the place?
http://tapestry.sourceforge.net/wiki/ 
then I wouldn't have bothered you!

At 10:47 13/06/2003 -0400, Harish Krishnaswamy wrote:
>Would it be too much to ask for a references section on the Tapestry website where we can put links to these references ?
>
>Thanks
>Harish
>
>Bill Lear wrote:
>
>>On Friday, June 13, 2003 at 13:46:36 (-0100) Peter Lappo writes:
>> 
>>
>>>Hi,
>>>Can anyone point me to some simple tapestry
>>>examples using 3.0-beta-1. I've looked at the examples in the release but
>>>I'm looking for
>>>something smaller which I can use as a template to grow my application.
>>>   
>>
>>Recently posted:
>>
>> 
>>
>>>http://pwp.netcabo.pt/lneves/projects/petshop-0.3.tar.gz
>>>
>>>(just extract it to a directory somewhere and issue a "ant run" command ant point your browser to "http://localhost:8081/petshop/")
>>>   
>>
>>and also this:
>>
>> 
>>
>>>I have published a small "Customer Registration" demo application .war
>>>file at http://mywebpages.comcast.net/hkrishnaswamy/.
>>>   
>>
>>
>>Bill
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
>>For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>>
>>
>> 
>


Peter 

www.smr.co.uk
office +44 (0)1273 556600 mobile +44 (0)7767 784452
Java C++ SQL HTML XP: Web Application Development and Consulting

Re: simple tapestry examples

Posted by Harish Krishnaswamy <hk...@comcast.net>.
Would it be too much to ask for a references section on the Tapestry 
website where we can put links to these references ?

Thanks
Harish

Bill Lear wrote:

>On Friday, June 13, 2003 at 13:46:36 (-0100) Peter Lappo writes:
>  
>
>>Hi,
>>Can anyone point me to some simple tapestry
>>examples using 3.0-beta-1. I've looked at the examples in the release but
>>I'm looking for
>>something smaller which I can use as a template to grow my application.
>>    
>>
>
>Recently posted:
>
>  
>
>>http://pwp.netcabo.pt/lneves/projects/petshop-0.3.tar.gz
>>
>>(just extract it to a directory somewhere and issue a "ant run" command ant 
>>point your browser to "http://localhost:8081/petshop/")
>>    
>>
>
>and also this:
>
>  
>
>>I have published a small "Customer Registration" demo application .war
>>file at http://mywebpages.comcast.net/hkrishnaswamy/.
>>    
>>
>
>
>Bill
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>
>  
>


Re: simple tapestry examples

Posted by Peter Lappo <pe...@smr.co.uk>.
thanks Bill
http://mywebpages.comcast.net/hkrishnaswamy/Illustrating_Tapestry.html
had the simple example I was looking for

At 08:04 13/06/2003 -0500, Bill Lear wrote:
>On Friday, June 13, 2003 at 13:46:36 (-0100) Peter Lappo writes:
>>Hi,
>
>
>Bill


Peter 

www.smr.co.uk
Java C++ SQL HTML XP: Web Application Development and Consulting