2
votes

I am planning on writing a GWT application that will deploy to web and mobile web, as well apps on native devices. To do this I will first compile my GWT into JavaScript, and then use the GWT-Phonegap library to help bridge that JavaScript to be compatible with the PhoneGap API.

My only concern here is with codesplitting. With normal browsers, GWT allows developers to specify fragments that can be downloaded at different times between client and server. This prevents large apps from being downloaded as one big monolith and taking forever to startup inside the browser.

But with native apps (built by PhoneGap), the user will download the app from a marketplace and expect all the code (100%) to be downloaded at that time.

So I ask: how does GWT-Phonegap handle codesplitting and fragments? Do codesplitting commands get ignored somehow?

2

2 Answers

3
votes

Since a phoneGap app is actually a WebBrowser component packaged with the javascript and the html, I would guess that it would work like it did in the browser. The only difference would be that all communication for "downloading" the code would be local in the same device.

0
votes

With Phonegap you put all your resources into the app (HMTML, CSS, JavaScript). If you are using gwt-phonegap you will just take the complete compiler out put (that you would normally put inside a war file) and put it into your app. So there is no real issue with code splitting since the javascript is deployed locally.