Reputation: 35346
I know MVC and MVP for GWT application, my question would be not be about creating "multipage MVP app."
My question is about the viability of creating a GWT application with multiple pages (i.e multiple HTML files) for the actual web app (app.html) and a admin app (admin.html)
In a typical GWT MVP app this can be done by just adding a "page" or "view" however this can make the nocache.js
bloat and will just make the whole application load slow (based on experience)
I saw this abandoned project: gwt-multipage which allows a GWT app to be multi-paged. However I want to know if this kind of approach will also just bloat the nocache.js
file?
Upvotes: 0
Views: 88
Reputation: 1631
You seem to want a separate Admin module/app. See this StackOverflow response for an architecture to accomplish.
Upvotes: 1
Reputation: 22451
One way to solve your problem is to use code splitting. It allows you to have a single host page without having to download all the code at startup. You download additional code when it is needed.
Upvotes: 0
Reputation: 162
I assume you know that you will lose all GWT state when you switch between those pages right?
I don't have a chance to look at the gwt-multipage project right now but what you're asking for implies also having multiple entrypoints in your GWT app (one for the users page and one for the admin page). Since each GWT module can only have one entrypoint, you'll need to create an additional module for the admin page. I know this doesn't answer your question completely but if I was you I would look further in the direction of how to define different GWT modules.
Upvotes: 0