It really depends on your requirements, but if you are starting a new
project from scratch and want to use GWT for it, then you typically
don't have "multiple web pages," you have ONE page. The idea with GWT
is that the user downloads one big page up front, and from that single
page you switch in and out view components as needed. The user never
makes another view trip to the server (they retrieve and update data
and such, but they don't download another "page").
A GWT client is really much more like a full fledged desktop app,
don't think of it like a struts app, think of it like a true desktop
app.
That said, you CAN create "multi page" GWT apps if you really need to
(use the History support and move between different host pages), and
you can use GWT incrementally (contrary to what you hear people say
often, it's not all or nothing), but neither of those are the
canonical way to use it. Have a look at the getting started guide and
the sample applications, they do more than one thing. The Mail sample
for example (http://gwt.google.com/samples/Mail/Mail.html), when you
click on a message you don't need a new "page," rather you just need
to change the view components on the screen.
You can certainly still use a controller, but it's a client side
thing, it's not a view rendered on the server and then dispatched to a
dumb client - it's actually using the client for logic and state, and
view.
If you Google around you can find various examples of different
approaches to MVC with GWT (even searching this forum yields a lot),
but in every case you will not see multiple pages used, you will see
one big app on one page - and that's the idea.
On Aug 5, 8:19 am, "Nitin Gupta" <nitingupta...@gmail.com> wrote:
> Hi all,
> I am a GWT newbie. I am working on an application in which we have got
> multiple web pages. I checked the web but I could not find a very convincing
> answer as to how we can create multi-page GWT applications and debug them in
> the hosted mode. I am not able to figure out how will MVC controller return
> a new view to my GWT application in the hosted mode.
> One option is to independently work on each view, compile them and put under
> the web content of the server. After the development, target integration
> testing between the pages.
> Please let me know if there is a better approach than this one. Any links,
> pointers, references shall be highly appreciated.
> Best Regards,
> Nitin