I'm using Google Web Toolkit (GWT) to implement a complex application on the web. I was wondering, however, how many components can be included into a single page (a.k.a. entry point) before the browser becomes unusably slow? Would I be better to break my application down into multiple smaller web pages?
I would be more worried about usability than resources.
The page will stop being usable way before it starts to get laggy. If you put too many things on one page it will overload your users.
Try to divide the site up into different sections. Many sites, SO for example, has tabs at the top to choose from different functionality or views. Some sites also use a side-bar with a hierarchy of links to get to pages deeper in the site quickly.
Using Tabs to separate functionality can still result in a huge DOM within a single page - since tabs work by hiding divs. However, these divs are still consuming some browser resources. If I were in you, I would therefore split the entry point, with tabs pointing to different web pages loaded on demand. I would apply this to every individual item, wherever possible. But this is only my opinion.
I read many times, that one should not worry to much about performance beforehand, because ...
- ... as computers will become faster during development, your improvement won't be recognized that much.
- ... the bottleneck won't be what you think but something else. Measure your application regulary.
And switching from a widget to a seperate site isn't very complicated with GWT, as their documentation states. But consider changing between your two solutions when you are designing it.
I would take a look at how your users actually use the site.
If you find a nice separation of GWT apps (each user sticks to their own little GWT app), then I don't see why you can't separate them.
If, however, you find your users are constantly switching from one app to another, and incurring the overhead of starting up the other app, then you may want to consider one monolithic app. I would lean towards this approach, unless of course you are making very intense apps. I doubt the browsers will have much trouble with the highly optimized JavaScript GWT puts out.
You need to remember that you don't have to have multiple entry points to build discrete widgets. A single entry point can inject as many widgets as you want onto a given page. So all you need to worry about is how to split up your application based on how a user would use it.