views:

30

answers:

1

I have just started using GWT for web interface for our application.

My app has three different views for three different types of users. Each user has different type of interface (i.e. different navigation different menus etc).

There is one login page which will be index page of the application. The user shall enter the credentials and will be redirected to his/her section.

My problem is that how I can transform this scenario in GWT context. Weather I shall have four modules (i.e. one for login and other three for three type of users); weather there will be one module and I just have to change/load panels according to the user view type.

How shall I integrate these modules into one app? Weather I have to use JSP's to integrate these modules? Or these modules can be integrated by GWT to make a complete app.

Kindly help me in this regard.

Cheers

Raza

+1  A: 

You could opt for having one module and via code splitting load the specific interface for the user.

Depending on your login procedure there a different ways to load the specific user interface. If the login is done in GWT code, so the login page is part of the application, then for example if the user logs in via a RPC call upon successful login a value is returned that indicates which user interface to start. Or if the login is done prior to loading the gwt page, for example if you use the standard webserver authentication, than the index page returned, which contains the gwt app, upon successfull login can already contain a variable generated in html which is than used to guide which user interface is loaded. These are just very generic ideas, but I hope you get the idea.

Regarding several modules. If you have 3 different modules, your build time also becomes 3 times as long, because GWT needs to generate 3 different applications.

Hilbrand
Thanks Mr. Hilbrand. I have one module and I change the appearance of application according to the type of user. Cheers!
Raza