Multimodule GWT with App Engine

7 views
Skip to first unread message

clanusse

unread,
Jun 3, 2009, 6:38:20 PM6/3/09
to Google Web Toolkit
After attending Google I/O this year and seeing the magic of GWT, I've
recently switched my developer tools to include Java and GWT. Please
excuse my questions if they have obvious answers, I'm only just
beginning in both of these areas.

I'm building an application hosted on App Engine with GWT for client
presentation and logic. I'm using Eclipse and the Google plugin. I
have everything working smoothly and am very impressed with the Google
team's thinking and organization.

I understand clearly how to setup an Eclipse project for GAE and a
single GWT Client App, but in my particular case, I need to build
multiple GWT clients that all access one GAE app. The GWT clients
aren't related except that they access the same models/data/services
in my GAE app. For example, I may have a GWT front end for the
general public, a separate GWT application for administration, and
several 'widget' applications for the public to embed in their own web
pages.

In this scenario, I need to setup at least 3 completely independent
GWT modules in Eclipse in the same project. My GAE servlet/RPC code
is also in this project. Can anyone suggest how I might accomplish
this?

Even if I do get it setup, I'm wondering about these potential issues:

1. How do I make sure that each GWT client gets compiled when I do a
'run..' in Eclipse?
2. How do I specify which client runs when testing?

I'm assuming a suggestion might be to build independent Eclipse
projects, BUT I really want to keep the whole thing together and post
the entire project to GAE at once...

Thanks in advance :)

clanusse

unread,
Jun 4, 2009, 11:30:20 AM6/4/09
to Google Web Toolkit
I'm assuming this has more to do with the Eclipse project build
configuration then anything else.. true?

Alex Rudnick

unread,
Jun 4, 2009, 12:12:42 PM6/4/09
to Google-We...@googlegroups.com
Hey Charley,

It's totally possible to have several GWT modules in the same Eclipse
project (and have them posted to App Engine in one go!). You can do
this by selecting "New > Module". Then, typically, you'll create a new
HTML page in your war directory and have it load that GWT module.

When you do a "Run..." in Eclipse, you're typically running in "Hosted
Mode", so you shouldn't have to worry about your code getting compiled
to js.

You can choose which client you run by having each module loaded on
its own HTML page. If you take a look at the HTML generated for a new
project, you can see how it loads the ".nocache.js" file for a given
module.

Hope this helps!

On Wed, Jun 3, 2009 at 6:38 PM, clanusse <cha...@tactevo.com> wrote:
> In this scenario, I need to setup at least 3 completely independent
> GWT modules in Eclipse in the same project.  My GAE servlet/RPC code
> is also in this project.   Can anyone suggest how I might accomplish
> this?
>
> Even if I do get it setup, I'm wondering about these potential issues:
>
> 1.  How do I make sure that each GWT client gets compiled when I do a
> 'run..' in Eclipse?
> 2.  How do I specify which client runs when testing?
>
> I'm assuming a suggestion might be to build independent Eclipse
> projects, BUT I really want to keep the whole thing together and post
> the entire project to GAE at once...
>
> Thanks in advance :)

--
Alex Rudnick
swe, gwt, atl

clanusse

unread,
Jun 4, 2009, 12:49:07 PM6/4/09
to Google Web Toolkit
Ahhh! Got it.. That was simple :) Thanks so much Alex.

Alex Rudnick

unread,
Jun 4, 2009, 1:21:01 PM6/4/09
to Google-We...@googlegroups.com
On Thu, Jun 4, 2009 at 12:49 PM, clanusse <cha...@tactevo.com> wrote:
> Ahhh!  Got it.. That was simple :)  Thanks so much Alex.

Hooray :) Happy hacking!

Reply all
Reply to author
Forward
0 new messages