You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Mário Lopes <ma...@gmail.com> on 2006/05/22 18:54:27 UTC

How to do..

Hi,

I want to implement a chat. I was thinking about doing REST requests
between clients and the object handling the chat. For instance, client
would request a chat conversation by doing an HTTP POST
http://host/ChatHandler?request=true

On the servers side (Tapestry therefore), how should I do this? Simply
use a Servlet, create an asset or an engine service? The server sends
an http response to the client too and must keep objects alive to keep
a record of the chat.

Thanks for your help.

-- Mário

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


Re: How to do..

Posted by Peter Svensson <ps...@gmail.com>.
Asusming you want something smooth-looking, you would anyway want to spend
some time with tacos Tapestry-AJAX components. The examples on the web are
pretty complex, so the easiest route for you would be, I think to download
the demo app from the homepage, which is war-file which contains a lot of
examples together with source code and of course directory layout et.c.
Copy from there and you might get up and running quickly with a "smooth"
application.

I would recommend having a state object in your tapestry pages for the chat,
maybe a Hashtable for user -> messagelist or something like that. For
pointers on that I think it is described in the first four (free! :)
chapters from Kent's EWDWT;

http://agileskills2.org/EWDT/

Cheers,
PS

On 5/22/06, Mário Lopes <ma...@gmail.com> wrote:
>
> Hi,
>
> I want to implement a chat. I was thinking about doing REST requests
> between clients and the object handling the chat. For instance, client
> would request a chat conversation by doing an HTTP POST
> http://host/ChatHandler?request=true
>
> On the servers side (Tapestry therefore), how should I do this? Simply
> use a Servlet, create an asset or an engine service? The server sends
> an http response to the client too and must keep objects alive to keep
> a record of the chat.
>
> Thanks for your help.
>
> -- Mário
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>