Tuesday, December 14, 2004

Direct Web Remoting

Have you seen Google suggest already ? It's a new service from google (still in beta) that suggests words as you type (similar to auto-completion in popular programming editors). I don't know the details of how it is done, but I presume it uses something similar to DWR.
DWR allows client-side JavaScript to call server-side java, without a page refresh. Although I don't like JavaScript that much, I have to admit that with DWR we could create extremely flexible user interfaces. It's still in alpha stage, but at least for me it worked pretty well (Firefox, of course). The way DWR works is quite ingenious. It creates an IFRAME which calls a servlet that does our work. On reply, the IFRAME has an "onload" script that returns the result to the JavaScript. Thus, the IFRAME is used just for the request and response process and is immediately deleted.
Don't know if it will catch on, but with all the different rich client frameworks emerging, it will be a difficult fight for all.

0 comentários: