How to tie-up a multipage application?

GWT Designer allows you to quickly create the modules, composites, panels, remote services and other elements that comprise Google Web Tookit applications.

Moderators: Konstantin.Scheglov, gnebling, Alexander.Mitin, jwren, Eric Clayberg

How to tie-up a multipage application?

Postby Serge » Fri Oct 27, 2006 10:51 am

I need to create a web version of a desktop application with about a hundred of unique GUI windows. Each window is complex (it may have a few tabs with controls like tables, tree-vews, buttons and so on).

    * Do I understand right that each such window will be a separate GWT module?
    * Does it mean that I need a separate HTML (or jsp) page for each module (window)?
    * Will I be able to keep some objects in the browser between changing the pages, so that one page changes some objects, and another page takes the changed object from the browser without any RPC calls?
    * What about shared classes? There will be at least 10-20 classes, and some utility functions, needed by each page. Will they be loaded by every page again and again?
Serge (gymgoal.com)
Serge
 
Posts: 11
Joined: Fri Oct 27, 2006 10:31 am

Re: How to tie-up a multipage application?

Postby Eric Clayberg » Sun Oct 29, 2006 6:12 am

Serge wrote:Do I understand right that each such window will be a separate GWT module?

No, you can create a separate Composite for each window, and, for example, dynamically add/remove them from the RootPanel (or some sub-panel of RootPanel). The size of a GWT application does not grow very quickly. For example, the JavaScript code for an empty GWT application is about 26 Kb in size. With one Composite that has a TabPanel, several tabs and various widgets on those tabs, the size grows to only 50 Kb. With 30 such Composites, the size is about 100 Kb.

If you can use a single module, you can avoid many problems. GWT is different from other Web applications in that you don't need a separate handler for each screen. You can build a complete application where various screens "talk" with each other using just Java, i.e. it keeps its state in the application itself on the client.

Serge wrote:Does it mean that I need a separate HTML (or jsp) page for each module (window)?

If you go with several Composites in a single module, you can use a single EntryPoint and thus a single HTML file.

Serge wrote:Will I be able to keep some objects in the browser between changing the pages, so that one page changes some objects, and another page takes the changed object from the browser without any RPC calls?

Yes. See above.

Serge wrote:What about shared classes? There will be at least 10-20 classes, and some utility functions, needed by each page. Will they be loaded by every page again and again?

Again, see the above discussion concerning application size. Of course, it will depend on the amount of logic that you add to your pages. If your application grows too much, you can try to move part of the logic to the server and use RemoveServices to talk between the client and server.
Eric Clayberg
Software Engineering Manager
Google
http://code.google.com/webtoolkit/download.html

Author: "Eclipse Plug-ins"
http://www.qualityeclipse.com
Eric Clayberg
Moderator
 
Posts: 4503
Joined: Tue Sep 30, 2003 6:39 am
Location: Boston, MA USA

Re: How to tie-up a multipage application?

Postby bu1bantkaydidir » Tue Jun 10, 2008 2:05 am

Eric Clayberg wrote:If you can use a single module, you can avoid many problems. GWT is different from other Web applications in that you don't need a separate handler for each screen. You can build a complete application where various screens "talk" with each other using just Java, i.e. it keeps its state in the application itself on the client.

*****

If you go with several Composites in a single module, you can use a single EntryPoint and thus a single HTML file.


Eric, can you please kindly provide some detailed information and, if possible, a code example about
- how we can switch screens that are made of composites?
- and how these composites "talk" with each other?

thanks in advance.
bu1bantkaydidir
 
Posts: 1
Joined: Tue Jun 10, 2008 1:55 am

Re: How to tie-up a multipage application?

Postby Eric Clayberg » Tue Jun 10, 2008 3:51 am

I'm sorry, but I don't have any examples like that.

Have you looked at all of Google's examples or asked on Google's GWT forum (a more appropriate place for questions like this)?
Eric Clayberg
Software Engineering Manager
Google
http://code.google.com/webtoolkit/download.html

Author: "Eclipse Plug-ins"
http://www.qualityeclipse.com
Eric Clayberg
Moderator
 
Posts: 4503
Joined: Tue Sep 30, 2003 6:39 am
Location: Boston, MA USA


Return to GWT Designer

Who is online

Users browsing this forum: No registered users and 3 guests