I've been working with GWT for several weeks now and I would like to
have a discussion about how a GWT/AJAX based MVC framework can be
designed. I guess more people out there have already formed some ideas
about how to communicate between different - let's call it - views.
Perhaps you would like to share some thoughts, some concepts that you
have tried but have failed because of the asynchronous nature and you
would like to share so others will not make the same mistake.
So for example what would be a good approach to communicate between
the following views (just a silly example):
- search page - on enter we lookup the corresponding data and show the
- result page - clicking on a single line leads us to the
- detail page of a customer
You all know this basic example, but how do we pass parameters along
the different views, just call a corresponding method on the some
controller bound to the next view which will take care of it, or make
something more abstract, like you would have for example in Spring
MVC, a dispatcher, a view resolver, a ModelAndView object which
contains for example the ID of the customer (Map entry) which will be
passed to the customer detail screen? I'm just starting with this
latter approach, can't say much about it, just started working with it
an hour ago :-)
And what about externalizing the flow?
The thing is, how can we build large business applications, that have
some kind of process flow abstraction, lets call it MVC? Perhaps such
a MVC framework could be a nice GWT subproject ;-)
I look forward to your replies, I'll post my experience with my
approach by the beginning of next week.
Grtz
I was starting to imagine the best way to consider this for efficiency
might be :
the Entrypoint, launches the Search page composite.
This composite has some basic UI logic, this may be for doing some
sort of fancy client side UI magic that doesn't require any server
intelligence
I thought of the idea of a very thin UI controller that manages all
composites..
so the entry point actually loads the UI controller which knows to
load the search screen first.
Then when user enters text , the UI controller perks up and knows to
do some rpc stuff to maybe request search matches passed to a
serverside controller.
objects are passed back from the server controller to the UI
controller which knows how to present the payload, in this case, this
could be async for auto-completing the text in the search field and
showing a count of matches for that term. just like google suggest.
When the user actually submits a real request. the UI controller again
talks to the server sidecontroller...and now the serverside controller
tells the UI controller to repaint the composites for the new screen,
and I assume some sort of cleanup for memory
from here I think the process is the same. I call this pattern fat n
skinny : )
What do you guys think of this ?
Would this make sense...
my goals are.
- UI should be super thin
- UI should be smart enough to control its widgets based on user
interaction without going back to the server
- the UI should ultimately be controlled from the server in terms of
rebuilding composites
- the server should do all heavy processing
- should be the smallest transports for requests and payloads over
rpc,, so they are light and fast ( is this what beans are for ?)
please let me know what is wrong with this... as we are considering
building a large app with ideas from this.
thanks
On Mar 29, 10:32 am, "Maarten Volders" <maarten.vold...@gmail.com>
wrote:
> I thought this would be an interesting thread, but it seems I'm kinda wrong
> again :-)
>
> I'm still curious on how people are dealing with communication between
> composites in big applications, are you using a generic (MVC like) approach
> so that all composite views are unaware of each other or you just call other
> composite views directly to call them and to inject data to them and don't
> care about entangling everything?
>
> Grtz
>
I'm sorry i didn't read you last post.
That is a great idea, i think you are on the right track.