Question

I am new to GWT and I am a bit confused if I should use GWTP PlaceManager or GWT Places/Activities. I read into GWTP and the PlaceManager and it seems pretty easy and works with less code than Activities, Places and the Mapper which seems really complicated (I dont really understand it now..) But I think that its better to go the recommended way of google?! Are there main disadvantages using the GWTP way? Does it make sense to use both, when I decide to use History later? Can I do anchors with GWTP?

My App consists of one Header with a main-menu and the content area. The content area consists of a left and right area. The left area are achnors which should link to "places" in the right area. And GWTP nestedPresenters seems to be the best and easiest way. But can I do this with GWTP and would you recommend to use the google way?

I hope you can clear some things up for me. :) Thanks!

Was it helpful?

Solution

I've been using GWTP on some 20 projects and I can say that the PlaceManager works really well. You can easily append URL parameters along the nametoken where you want to go. You can also use anchors with GWTP.

OTHER TIPS

But I think that its better to go the recommended way of google?!

Why ? Maybe GWTP is easier and it fit better your needs. Activities and Places are just a recommandation from google. No one forces you to use it. You should try both and see what is better for you.

Are there main disadvantages using the GWTP way?

I do not know GWTP, but as for all other frameworks once you have used one it can be difficult when you want to stop using it. By using only "pure" GWT stuff you will not have to face this problem. You code will be easier to migrate to the next versions of GWT etc.

Does it make sense to use both, when I decide to use History later?

Again I do not know GWTP but IMO it is never a good idea to use 2 different approaches to solve one problem. The code is harder to read, debug, refactor etc.

Can I do anchors with GWTP?

Not sure what you mean by that. Anchors are HTML stuff (not GWT or GWTP). GWT use them as a way to navigate from one place to another without having to reload the page. It is a sort of hack used by many website and technologies. See Fragment Identifier wikipedia article

In JavaScript, the fragment identifier of the current HTML or XHTML page can be accessed in the "hash" property location.hash — note that Javascript can be also used with other document types. With the rise of AJAX, some websites use fragment identifiers to emulate the back button behavior of browsers for page changes that do not require a reload, or to emulate subpages.

Regarding Activities and Places, it is not as hard as it seems nevertheless it takes some effort to dive into the code to really undersatnd how it works. I have writen an article on that topic maybe it can help.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top