A class diagram relating the core GWT MVP model

401 views
Skip to first unread message

Hans-Joachim Belz

unread,
Oct 17, 2011, 3:33:53 PM10/17/11
to Google Web Toolkit
Hi everybody!

I like the power of the GWT MVP model. But it is quite a challenge to
wrap your head around the complex class hierarchy orbiting the core
concepts of activities, views and places. After falling through some
unexpected trap doors (e.g. ResettableEventBus), I decided to create a
class diagram of the core classes of the framework along with the main
classes implemented by the framework user.

You can see a PDF rendition of the model here:
http://minutefforts.com/blog/wp-content/uploads/2011/10/gwt-mvp-classes.pdf

What do you think? Am I missing some important stuff? Anything wrong?

Jens

unread,
Oct 17, 2011, 5:08:29 PM10/17/11
to google-we...@googlegroups.com
ActivityManager uses (1..1) AcceptsOneWidget (interface). And AcceptsOneWidget should be implemented by MyDisplayAreaWidget (which is in most cases a SimplePanel or SimpleLayoutPanel). Then MyContainerWidget embeds 1..n AcceptsOneWidget / MyDisplayAreaWidget.

So MyContainerWidget is the root that contains 1..n AcceptsOneWidget implementations (= "display areas") and each AcceptsOneWidget is assigned to its own ActivityManager (so you have more than one ActivityManager if you have more than one "display area").


I think a while ago someone also posted a class diagram for activity/places. Maybe you can find it via search. But I am not quite sure if it has been posted in this group or in the Google Web Toolkit Contributors group.

Daniel Dietrich

unread,
Oct 18, 2011, 11:38:51 AM10/18/11
to google-we...@googlegroups.com
Hi Hans-Joachim,
 
as Jens mentioned, you find my post here: http://goo.gl/a6db2
Here is a direct link to the drawing: http://goo.gl/u7Ntq
 
The activity & places vs. mvp question arises on and on.
What gwt gives to us is a toolkit - but not a framework.
There are lot of frameworks out there which give us a solution for making our apps testable or add browser history support.
 
Currently I'm working on a generator which automagically generates all the technical boilerplate code on base of a simple description of the application to have this architecture out of the box. I see me as engineer who creates a factory for developers. Each developer should not concern about how to apply architectural design patterns. A developer should implement business logic, not technical boilerplate.
 
I started an example generator for JPA + Request Factory here: https://github.com/danieldietrich/xtext-javatools (running but work in progress)
It needs this plugin to be installed: https://github.com/danieldietrich/xtext-protectedregions
See the README.textile files for more information...
 
Next step is a generator for the ui stuff...
 
Greetz
 
Daniel
 

Juan Pablo Gardella

unread,
Oct 18, 2011, 1:37:33 PM10/18/11
to google-we...@googlegroups.com
Thanks for share Daniel!

2011/10/18 Daniel Dietrich <cafe...@googlemail.com>

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

Hans-Joachim Belz

unread,
Oct 25, 2011, 2:38:57 PM10/25/11
to Google Web Toolkit
Hello Daniel,

thanks for sharing! Your very neat diagram inspired me to rework the
layout and clarify some things in my own depiction.

About your generator framework: Isn't that what Spring Roo is all
about? - I have to admit, I am no real fan of generator solutions.
Often they are only good for bootstrapping or they break, if you stray
from the default (read expected) path of the underlying framework.

Best regards,
Achim.



On 18 Okt., 17:38, Daniel Dietrich <cafeb...@googlemail.com> wrote:
> Hi Hans-Joachim,
>
> as Jens mentioned, you find my post here:http://goo.gl/a6db2
> Here is a direct link to the drawing:http://goo.gl/u7Ntq
>
> The activity & places vs. mvp question arises on and on.
> What gwt gives to us is a toolkit - but not a framework.
> There are lot of frameworks out there which give us a solution for making
> our apps testable or add browser history support.
>
> Currently I'm working on a generator which automagically generates all the
> technical boilerplate code on base of a simple description of the
> application to have this architecture out of the box. I see me as engineer
> who creates a factory for developers. Each developer should not concern
> about how to apply architectural design patterns. A developer should
> implement business logic, not technical boilerplate.
>
> I started an example generator for JPA + Request Factory here:https://github.com/danieldietrich/xtext-javatools(running but work in
Reply all
Reply to author
Forward
0 new messages