Facebook-like AJAX using GWT

5 views
Skip to first unread message

xyyzzzer

unread,
May 31, 2009, 11:38:42 AM5/31/09
to Google Web Toolkit
Hi

I am interested in how to add AJAX behavior like on Facebook to action-
based site (eg. site on Struts, Stripes, etc.) using GWT.

For example site has such action URLs:
http://site.com/user/add
http://site.com/user/edit?id=1
http://site.com/user/1/delete?id=1

and in Facebook manner, it would also have support for URLs:
http://site.com/#/user/add
http://site.com/#/user/edit?id=1
http://site.com/#/user/delete?id=1
etc.

I was trying to implement this feature preventing default link
behavior and sending request with GWT RPC help, then replacing current
page content by returned one from GWT request response. But I
encountered issue, that I cannot reload GWT module “on the fly”
without page reloading.

Why I am interested in such kind of functionality, it’s because simple
to develop large sites as action-based. But it would be nice to add
AJAX auto support to form submits or link clicks.

Any suggestions?

Arthur Kalmenson

unread,
Jun 9, 2009, 5:37:52 PM6/9/09
to Google-We...@googlegroups.com
I'm not sure I follow. Using History, you should be able to achieve
exactly what you're aiming for. One thing to keep in mind is to fire
the current history item in your entry point (or somewhere at
application startup). From there your history management can take over
for the item available.

--
Arthur Kalmenson

xyyzzzer

unread,
Jun 10, 2009, 4:52:52 AM6/10/09
to Google Web Toolkit
Thanx for your reply, but I am not asking about "How to setup browser
history using GWT?".
I rather asking about "How to auto-convert plain old site to single
page application using GWT?"

http://www.ongwt.com/post/2009/05/11/Towards-single-page-applications

On 10 июн, 00:37, Arthur Kalmenson <arthur.k...@gmail.com> wrote:
> I'm not sure I follow. Using History, you should be able to achieve
> exactly what you're aiming for. One thing to keep in mind is to fire
> the current history item in your entry point (or somewhere at
> application startup). From there your history management can take over
> for the item available.
>
> --
> Arthur Kalmenson
>

xyyzzzer

unread,
Jun 17, 2009, 6:52:26 PM6/17/09
to Google Web Toolkit
Still no suggestions?

On 31 май, 18:38, xyyzzzer <xyyzz...@gmail.com> wrote:
> Hi
>
> I am interested in how to add AJAX behavior like on Facebook to action-
> based site (eg. site on Struts, Stripes, etc.) using GWT.
>
> For example site has such action URLs:http://site.com/user/addhttp://site.com/user/edit?id=1http://site.com/user/1/delete?id=1
>
> and in Facebook manner, it would also have support for URLs:http://site.com/#/user/addhttp://site.com/#/user/edit?id=1http://site.com/#/user/delete?id=1

Arthur Kalmenson

unread,
Jun 22, 2009, 10:19:07 AM6/22/09
to Google-We...@googlegroups.com
I don't thing there's a way to auto-convert a web 1.0 app into a web
2.0 single page app. If you want to make your application fully
Javascript and in a single page, you're going to have to rewrite it in
GWT. I was thinking that you might be able to use Frames, but when
you'd click anything in there it would direct you back to the old
application and force a page refresh.

--
Arthur Kalmenson



2009/6/17 xyyzzzer <xyyz...@gmail.com>:

xyyzzzer

unread,
Jun 22, 2009, 2:23:50 PM6/22/09
to Google Web Toolkit
But Facebook somehow auto-converted into single page app. I do not
think they rewrite almost entire app to make it web 2.0. Maybe there
are some articles about how they did that conversion?

By the way, I have found JavaScript lib which make possible to add
AJAX to web 1.0 site with minimal effort. But demos using this lib do
not look ready for production use. It would be cool to transport this
lib into GWT + some enhancements.

Fullajax lib site (in Russian):
http://fullajax.ru/

Fullajax examples:
http://fullajax.ru/examples/index.html

On 22 июн, 17:19, Arthur Kalmenson <arthur.k...@gmail.com> wrote:
> I don't thing there's a way to auto-convert a web 1.0 app into a web
> 2.0 single page app. If you want to make your application fully
> Javascript and in a single page, you're going to have to rewrite it in
> GWT. I was thinking that you might be able to use Frames, but when
> you'd click anything in there it would direct you back to the old
> application and force a page refresh.
>
> --
> Arthur Kalmenson
>
> 2009/6/17 xyyzzzer <xyyzz...@gmail.com>:
>
>
>
> > Still no suggestions?
>
> > On 31 май, 18:38, xyyzzzer <xyyzz...@gmail.com> wrote:
> >> Hi
>
> >> I am interested in how to add AJAX behavior like on Facebook to action-
> >> based site (eg. site on Struts, Stripes, etc.) using GWT.
>
> >> For example site has such action URLs:http://site.com/user/addhttp://site.com/user/edit?id=1http://site.com...
>
> >> and in Facebook manner, it would also have support for URLs:http://site.com/#/user/addhttp://site.com/#/user/edit?id=1http://site...
Reply all
Reply to author
Forward
0 new messages