Question

I am trying to create an application which will have different views for mobile, desktop and tablet. It is on the lines of MobileWebApp sample from GWT. I am looking at GWT MVP tutorial and have a basic app working. I was thinking if I should use GWTP and if there would be any advantages of using GWTP instead of GWT MVP(activities and places) Also, any ideas how different views would bind to the same presenter. There might be differences in what features are available on mobile view and desktop view.

Was it helpful?

Solution 2

You can create different views in for a presenter in gwtp. GWTP makes it easier to handle such a scenario. There is an open-source Customer Experience framework which has a sample to create a mobilewebapp using GWTP. You can check it out here- http://code.google.com/p/gwt-cx/

OTHER TIPS

I have done something like this, although at a time before Activities and Places. So back then I've written the MVP framework myself. I placed all the common code, such as Presenters, TransferObjects and Utilities in a separate GWT module. Then each UI became a separate project as well, holding it's View classes and UiBinder stuff, inheriting from the common module. So actually each UI project is a complete GWT application. The GWT applications have to be deployed under different context, thus have different URLs. You then need some smart JavaScript on your welcome page to redirect a visitor depending on there device.

I don't think you can solve this in one GWT app. Or you'd have to come up with a really really clever solution using Deferred Binding (probably it's replacement functionality) and the Linker subsystem.

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