Avi Cherry wrote:
First off, I want to say that I'm a huge supporter, advocate (and long time user) of Tapestry, particularly T5.
Hello Avi,

[...] a lot of intersting things

To be honest, the Ajax support on Tapestry 5 is one of the rare things that seems to be not _just_rigth_ on the framework, as if it has been an afterthougth (one of the other is the four types of translator/encoder, but that's for an other thread).

So, thank you for having some time to start this thread. My personal experience is rather similar than yours: Tapestry component abstraction seems to leak with Ajax (perhaps it's the price for T5 component not being fully statefull, and perhaps it's better like that). As soon as you want to do "Ajaxified" components, you have to take care by hand to a lot of more things than for normal request: component id and id availability (you are not in a standards Render cycle, ids are not available), you must differentiate normal/xhr request on event handler, you must enforce component bounds...

Now, what can we actually purpose ?
You're approach (a component return null on XHR => refresh himself, return a component on XHR => refresh this component) seems to me more consistent with T5. But it seems to be a major evolution, the kind that will be difficult to sell along with easy update of T5. Moreover, as you said, it's likelly that somewhere, the full dom tree will have to be build, and it seems not really efficient.
And finally, it's too late for Tapestry 5.0 final.

So, for now, what I REALLY need and want with priority #1 is a lot of documentation on "how using AJAX with T5 the right way": general pifalls to avoid, what information are available (state of the server view of the DOM on XHR, etc), what are all the differences with normal request (you don't have access to a bunch of things), etc.

And for the long run, yes, perhaps we have to see how to make AJAX simpler. Perhaps just a different handler naming convention for xhr would be a good start, as they are actually differents (onMyeventFromComponent and onXhrMyeventFromComponent ? So that user would have to really take care of the two case ?)


--
Francois Armand
Etudes & Développements J2EE
Groupe Linagora - http://www.linagora.com
Tél.: +33 (0)1 58 18 68 28
-----------
http://fanf42.blogspot.com
InterLDAP - http://interldap.org FederID - http://www.federid.org/
Open Source identities management and federation


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

Reply via email to