We have decided to not use code splitting.
-- Our problem was the performance.
New dynamically loading modules are huge strings and parsed by eval.
This causes serious performance problems.
Consider you are in the web-app and open a new tool window that loads 10M of one string code.
This will hang you app for a second or two.
This is unacceptable for client app.
On Monday, February 22, 2016 at 5:57:04 PM UTC+3, Francesco Calabri wrote:
On Monday, February 22, 2016 at 5:57:04 PM UTC+3, Francesco Calabri wrote:
Hi all,
i was thinking of ways to break a big large GWT application into multiple modules to be able to develop modules independently.
I've read some things in the forum and in the documentation but I'm still quite confused.
The ideal solution:
Have a core/main shell module with the menu and one module for each application view.
All this should run in the same url with the same session.
Each view module should be loaded when needed: if the user clicks on the menu, the relative module is loaded (something like split points).
Some state/session information initialized in the main module should be available in the sub modules.
Most important: I should be able to edit one submodule and update only that part of the application, having it updated the next the user requests that submodule, possibly without the need to trigger a deploy, but simply swapping the output of that module.
I've tryed to split my code into modules, having the main inherits the submodules and lauching them from the menu.
Soon I realized that even if I compile the submodules separately, any change made to a submodule will be visible only if I compile the main module, and the sunmodule output in never really used.
For what I understood, if I would like to go further in splitting logic into modules I should load the submodules "manually" by using them into an iframe (and have some published javascript objects from the main module read to achieve communication and information sharing between modules).
Unfortunately this leads to massive performance loss since the monolithic js is way better and more optimized.
So, other than creating gwt-legit libraries, what's the point of multiple modules?
Thanks
You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.
No comments:
Post a Comment