User visible urls

193 views
Skip to first unread message

Phil McDonnell

unread,
Dec 5, 2011, 1:21:09 AM12/5/11
to google-we...@googlegroups.com
I like the concept of GWT being a webapp, but users still want bookmark-able urls in many situations.  Does anyone have a pointer for best ways to expose urls that can bookmark somewhere deep in a gwt app?

For instance, a shopping site might have the url "my-gwt-app.com/products/stuffed-bunny" so that a user can return to their favorite stuffed bunny product.  Any idea how I can implement this?

Thanks,
Phil

Raphael André Bauer

unread,
Dec 5, 2011, 2:07:49 AM12/5/11
to google-we...@googlegroups.com

One option surely is to use hashbang urls.
my-gwt-app.com/#!/products/stuffed-bunny for instance.

Similar to what twitter does: twitter.com/#!/username

The idea would be to let GWT manage the whole frontend application.
Both Google and Bing support hashtag crawling
(http://code.google.com/web/ajaxcrawling/docs/getting-started.html).

Btw - have a look at GWTP (http://code.google.com/p/gwt-platform/) -
an alternative implementation of the MVP pattern. I found it easier to
use and customize than GWT's Activities and GWT's PlaceMapper. But
it's up to you.


Best,


Raphael


>
> Thanks,
> Phil
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google Web Toolkit" group.
> To post to this group, send email to google-we...@googlegroups.com.
> To unsubscribe from this group, send email to
> google-web-tool...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/google-web-toolkit?hl=en.

--
inc: http://ars-machina.raphaelbauer.com
tech: http://ars-codia.raphaelbauer.com
web: http://raphaelbauer.com

Thomas Broyer

unread,
Dec 5, 2011, 3:13:40 AM12/5/11
to google-we...@googlegroups.com
History is made for that.

If you want to use HTML5's pushState/popstate, that should be possible using deferred-binding (to replace the underlying implementation using onhashchange with one using pushState).

If you're using Places (which I strongly recommend), the default Historian uses History, but you can easily make one that uses HTML5's pushState/onpopstate (I did just that, works very well; I didn't implement fallback to on hashchange though). Note that it's easier to make an HTML5 Historian than to make History use HTML5.

Phil McDonnell

unread,
Dec 5, 2011, 7:11:28 PM12/5/11
to google-we...@googlegroups.com
Looks great!  Thanks!

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.

Carlos Aguayo

unread,
Feb 21, 2012, 12:04:55 PM2/21/12
to google-we...@googlegroups.com
Hi Thomas, could you share the one that you wrote to use pushState? Thanks!

Thomas Broyer

unread,
Feb 22, 2012, 5:08:23 AM2/22/12
to google-we...@googlegroups.com
On Tuesday, February 21, 2012 6:04:55 PM UTC+1, Carlos Aguayo wrote:
Hi Thomas, could you share the one that you wrote to use pushState? Thanks!

Here's a skeleton implementation: https://gist.github.com/1883821

Carlos Aguayo

unread,
Feb 27, 2012, 5:35:55 PM2/27/12
to google-we...@googlegroups.com
works like a sharm! thanks buddy!

Adolfo Panizo Touzon

unread,
Feb 28, 2012, 10:31:43 AM2/28/12
to google-we...@googlegroups.com
Hi all,

In the next weeks I'm going to start a new app, and I am really interested in this question.

The solution that @Thomas has proposed is really interested. But I don't know exactly how it works.

The question is, could you provide me an simple simple example? Or link?

Thank you,

Adolfo.

2012/2/27 Carlos Aguayo <carlos...@gmail.com>
--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.

To post to this group, send email to google-we...@googlegroups.com.
To unsubscribe from this group, send email to google-web-tool...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.



--
El precio es lo que pagas. El valor es lo que recibes.
Warren Buffet

Carlos Aguayo

unread,
Aug 30, 2012, 12:33:44 AM8/30/12
to google-we...@googlegroups.com
Hi, I created an example and published an example based on Thomas' example:



On Tuesday, February 28, 2012 10:31:43 AM UTC-5, apanizo wrote:
Hi all,

In the next weeks I'm going to start a new app, and I am really interested in this question.

The solution that @Thomas has proposed is really interested. But I don't know exactly how it works.

The question is, could you provide me an simple simple example? Or link?

Thank you,

Adolfo.

2012/2/27 Carlos Aguayo <carlos...@gmail.com>
works like a sharm! thanks buddy!


On Wednesday, February 22, 2012 5:08:23 AM UTC-5, Thomas Broyer wrote:
On Tuesday, February 21, 2012 6:04:55 PM UTC+1, Carlos Aguayo wrote:
Hi Thomas, could you share the one that you wrote to use pushState? Thanks!

Here's a skeleton implementation: https://gist.github.com/1883821

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/OjZDD6XpY5gJ.

To post to this group, send email to google-we...@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsub...@googlegroups.com.

For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Reply all
Reply to author
Forward
0 new messages