> Can't I simply create module libraries and call them from my main app

Yes, you can, assume all you need to do is create a single compilation
unit.  But that doesn't address any communication issues between clients and
client-server.

Also, instead of doing it like you have, maybe consider multiple entry
points, one for each game.  Each game would have its own module
configuration, then have an extra module that includes all of the other
ones.  Then compile ONLY the extra module (which includes everything
anyway), and deploy that.

Each game would have any entry point that looks like this...

class PortalClient implements EntryPoint {

 Game1Module game1;

 onModuleLoad() {

   if (isSelectedGame1) {
      game1 = new Game1Module();
      game1.showPanel();
      game1.play();
   }
}

All of the entry points will run, but only the one(s) where the if condition
is true will actually do anything.

And if this makes the compiled code a bit large, use a few split points so
that the needed game code is only loaded when the condition is true.

In any case, overall the combined compiled code will be smaller than the sum
of the parts, since shared code like collections will only included once.

Rob




On Thu, Jul 7, 2011 at 6:41 PM, Gautam Kowshik <gautamkows...@gmail.com>wrote:

> Can't I simply create module libraries and call them from my main app
> EntryPoint, something like:
>
>
> class PortalClient implements EntryPoint {
>
>  Game1Module game1;
>  Game2Module game2;
>
>  onModuleLoad() {
>    game1 = new Game1Module();
>    game2 = new Game2Module();
>
>    if (isSelectedGame1) {
>
>       game1.showPanel();
>       game1.play();
>
>    } else {
>
>       game2.showPanel();
>       game2.play();
>    }
>  }
>
> }
>
>
> I thought when modules are inherited in another application's
> portal.gwt.xml .. the generated javascripts are merged together into
> one portal_nocache.js.
>
>
> On Jul 5, 9:42 pm, "J.Ganesan" <j.gane...@datastoregwt.com> wrote:
> > If your ServletContainer allows websocket, your clients and servers
> > can communicate among them using websockets. Please seehttp://
> code.google.com/p/gwt-ws/. With websockets, there is no
> > difference between your other regular applications and GWT
> > application.
> > If you use Google App Engine, you may use Channel API for java though
> > this is not as powerful as websockets.
> >
> > J.Ganesanwww.DataStoreGwt.com
> >
> > On Jul 5, 11:30 pm, Gautam Kowshik <gautamkows...@gmail.com> wrote:
> >
> >
> >
> >
> >
> >
> >
> > > I am designing a portal application (GWT) that controls/hosts games,
> > > each being a separate GWT app. I'm trying to  figure an elegant way to
> > > integrate multiple gwt applications into one. Is it possible to
> > > maintain modularity between apps while having them talk to each other
> > > at both: client and server level?
> >
> > > In a regular application i'd build jars and link those in my portal
> > > application. Is it possible to do so in GWT? If not, is there another
> > > way to achieve this? My portal needs to talk to the clients and the
> > > servers of the game apps.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google Web Toolkit" group.
> To post to this group, send email to google-web-toolkit@googlegroups.com.
> To unsubscribe from this group, send email to
> google-web-toolkit+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/google-web-toolkit?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to