maneesh
maneesh

Reputation: 1701

GWT + Ajax Crawling

I am trying to incorporate Ajax Crawling (http://code.google.com/web/ajaxcrawling/docs/getting-started.html) with my GWT apps. The app is a single HTML Page with all content rendered using GWT. I am using GWT-RPC to communicate with the server and the data is exchanged in the form of serializable POJOs. As such, there are no links in my application pointing to any "servlets".

In such a scenario, how would I go about making my app crawlable?

Upvotes: 1

Views: 758

Answers (1)

Amey
Amey

Reputation: 2214

GWT relies on the MVP (Model-View-Presenter) pattern and not MVC. Hence, it is perfectly fine (and expected) if you have just a single HTML page where all the views get rendered.

The way to make your GWT app crawlable is to have distinct URLs for each of your views that you wish to get indexed.

One can go about doing this by using the History mechanism in GWT (click here for docs). ie, For every view, you ought to assign a 'history token' using the hash-bang notation.

GWT 2.1 also introduces the concept of Activities and Places which you can utilize to compartmentalize your ajax app into logically distinct views, each of which would have their own 'history token' and hence a unique crawable URL.

Hope this helps.

Upvotes: 1

Related Questions