4

For a large system comprised of rich web pages (not full apps) and web apps (real RIA) built on GWT, what's the best strategy for supporting mobile? Must support: iPhone, Android, Blackberry. Nice to have: iPad / tablets, Windows 7 Mobile, older feature phones.

Background: Google Web Toolkit (GWT) does not natively support mobile web browsers other than newer iPhone/Android (webkit). GWT was adopted by our company for its cross browser support, our developers' familiarity with Java server-side development, our lack of in-house JavaScript/HTML/CSS mastery, and the relative immaturity of JQuery at the time (early 2007). Now, in March 2011, JQuery is mature and widely adopted, JQuery Mobile 1.0 is near, and the JQuery plugin ecosystem is thriving.

A few possible answers to this question:
Leverage our web app's GWT codebase with one or more of: GWT Mobile, gwt-mobile-webkit, PhoneGap w/ GWT. (I'd question the maturity of each of these.)
Create separate mobile pages/apps from scratch using JQuery Mobile and plugins. (This is unappealing as it looks like a "full rewrite".)
Create native mobile apps. (This is costly due to lack of native mobile dev expertise and the numerous mobile platforms required.)

Thanks for any enlightened comments!

velshin
  • 291
  • 1
  • 3
  • 6
  • jquery mobile should be used directly, not via java, so it might be hard to incorporate it into an existing gwt solution, but I'm not a gwt specialist. – naugtur Mar 10 '11 at 12:30
  • PhoneGap is a wrapper to turn html+css+js app into an app that can be deployed on the phone to work offline and use phone features via some api. I don't see how it would be useful in your case. – naugtur Mar 10 '11 at 12:32
  • finally, I guess that only stuff made for GWT is tested to work with all the features you already use. – naugtur Mar 10 '11 at 12:33
  • @naugtur Thanks for the notes. The lack of answers to my question thus far, and the lack of threads here on GWT, confirm my fears that GWT is not as actively used as was originally hoped a few years back. – velshin Mar 10 '11 at 15:10
  • did you take a look at http://www.m-gwt.com ? – Daniel Kurka Mar 10 '11 at 20:17
  • @Daniel Thanks for the m-gwt suggestion. However, it's really new, only has one release (alpha), and appears to only have 3 contributors. Hardly strong enough for a large GWT app conversion to mobile but very promising nonetheless. Hopefully you can take it to full maturity! – velshin Mar 10 '11 at 21:54

1 Answers1

1

My suggestion is to heavily use deferred bindings to dealing with your different deployment targets. This is precisely the point of deferred binding. Define one interface for your application to deal with and several different implementations based on target. If you download spring Roo and try their GWT starter project you will get a good example of just how you can do that.

Personally, prefer to stay aways as much as possible from JSNI, but if you must utilize jQuery somehow I would first take a look at gwtquery and it's plugin system.

Nick Hristov
  • 905
  • 1
  • 8
  • 17
  • FYI jQuery Mobile is not jQuery. It's a framework that can be used to enhance html (JS code optional) – naugtur Mar 14 '11 at 15:07
  • Thanks for the suggestion, though this doesn't really answer my question. Deferred binding is an implicit part of GWT; our large existing web app already makes extensive use of it for cross browser/language support. GWT does not generate mobile browser ready JavaScript other than recent iPhone/Android browsers, however. – velshin Mar 14 '11 at 17:18
  • This old post by Sumit Chandel @ Google from 2009 has essentially the same suggestion: use deferred bindings and write your own (GWT replacement) widgets in JavaScript. [link](http://osdir.com/ml/GoogleWebToolkit/2009-01/msg00210.html) – velshin Mar 14 '11 at 17:33