I use code spliting a lot with success.
Example: user clicks on another menu item or tab item, a new piece of
code is loaded from the backend.
Your request, you can easily do it yourself through deferred binding.
Just put an adapter/bridge class between your code and the method
GWT.runAsAsync. Then replace this adapter class with anything you want
through gwt configuration. If you don't want code spliting, replace it
with a class that contains a dummy method..
Something like (probably have some mistakes):
public final class Adapter {
private static Adapter instance = GWT.create(Adapter.class);
private Adapter() {}
public static getInstance() {
return instance;
}
public void runAsync(RunAsyncCallback callback) {
GWT.runAsync(callback)
}
In gwt.xml:
<define-property name="app.config" values="dev, test, prod" />
<replace-with class="AdapterDummy">
<when-type-is class="Adapter" />
<when-property-is name="app.config" value="dev" />
</replace-with>
The method of runAsync in AdapterDummy is empty and the property
app.config is defined app.config is definied in this or other gwt.xml
files that inherent this one..
Good luck,
Ed
On Mar 10, 9:55 pm, Jonathan <[email protected]> wrote:
> Has anyone come up with a good solution for conditional code
> splitting? Code splitting increases compilation time which we want to
> avoid during normal development. It would be nice if GWT provided a
> simple means of disabling it through the module descriptor file
> similar to how you can alter the user.agent property to avoid
> compiling permutations for all browsers.
--
You received this message because you are subscribed to the Google Groups
"Google Web Toolkit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-web-toolkit?hl=en.