On 12/2/2011 7:23 PM, Thiago H. de Paula Figueiredo wrote:
On Fri, 02 Dec 2011 05:44:00 -0200, Xybrek <xyb...@gmail.com> wrote:

Hello,

Hi!

I am really new to Tapestry, I just want to ask some questions before I embark deeper with the framework (although I like T5 already)

Welcome! :)

However, with Tapestry it seems that the page is rendered from the server side (which is pretty cool--like PHP)

Absolutely right. I wouldn't compare Tapestry and PHP because one is a framework based on Java and the other is a programming language but yes, HTML rendered server-side.

Yah, that's what I mean. However I am not sure if with Tapestry I can implement a way to process URL parameters such that the rendered page is based on the URL parameter, like: http://mypage.com/user123 where, user123 is a user id that is when accessed the rendered page will be the user page. Something like that.


So I wonder, how to deal with components with T5?

Quite easy. Create a class in the components page, create a template for it (optional, but very typical). You can also create CSS and JavaScript files specifically for it and make Tapestry include them automatically by using the @Import annotation.

I see, thanks for the tip. Do you mean in the package where Layout.java is located?


GWT and Tapestry are veeeeeeeeeeeeeeeeeeeeeeeeeeeeeery different frameworks. GWT is single-page and basically a client-side whole webapp in a single page, but provides hooks to communicate with server-side things. Tapestry is multi-page and basically server-side, but provides some JavaScript things and hooks to client-side code.

I am not really used to server-side page, but I am trying to catch the idea.


In GWT I can create a simple button and some textbox to create a form, style it with CSS. Add some handlers to get text inputs and pass it on to the server.

Same for Tapestry, but implemented in a very different way.

I see, anyway, what I mean by that is the loose-coupling of the UI element to the server side function ("services"). I hope Tapestry UI elements, although server-side, is loosely couple with "services"


With GWT create the whole web application by defining EntryPoints which is a rendered page,

Tapestry is completely different in this case. There are no entry points: instead, you have pages and, for some specific cases, dispatchers.

which contains components I can style with CSS and add function on the page that will pass data back and forth the UI and the server.

Same for Tapestry, but implemented in a very different way.

Can I create my own components and forms with my own CSS

Yes! ;) In Tapestry, creating components is so easy you do that all the time.

Check Tapestry JumpStart (http://jumpstart.doublenegative.com.au/jumpstart/), specially the Creating Components section, and Tapestry Magic (http://tawus.wordpress.com/) for examples.

This is cool:
http://jumpstart.doublenegative.com.au/jumpstart/examples/component/creatingcomponents

However, where do I place the CSS? In the .tml file? Or somewhere else?

Thanks for the ideas.


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

Reply via email to