Eample for MVP+EventBus+Presenter+Activity

140 views
Skip to first unread message

Harry X

unread,
Jun 6, 2011, 2:08:19 PM6/6/11
to Google-We...@googlegroups.com
Hello,

I am new to GWT and need some examples to help understand it.
Reading though some posts and searching over internet,
I think using MVP+EventBus+DI+Presenter+Activity is a sound approach.

Can some one point to me a good example to further study?

Thanks in advance.

Harry

Deanna Bonds

unread,
Jun 6, 2011, 3:12:53 PM6/6/11
to google-we...@googlegroups.com, Google-We...@googlegroups.com
I was going through the same thing.  I ended up going back and rewatching the Ray Ryan architecture videos from 2009 and 2010 again, but this time drawing down all the diagrams, but combining them all.  Then after having a big block diagram of the gwt framework and going the javadoc for the classes it just clicked into place.  What I had problems with in the original readings of the docs, was that the overall big picture was really understated and somewhat confused by all the optional things.  And an intended way(s) to use it combined with spring roo would help.   That may be another piece of the puzzle for you.  This framework depends a bit on spring roo to generate all the boilerplate code.  

My way of using it has been to create a gwt project with the gpe.  Then add spring roo to that project.  Use Roo to create all the data enties, and request factories.  At this point I'm guessing because here is where I am - let Roo add in the client side mvp and simple uibinder display areas into it's special generated folder/packagePath.  Copy the display areas into my own and modify them the way I want and set up the places.  Then add in backend logic.

Harry X

unread,
Jun 6, 2011, 3:12:43 PM6/6/11
to Google-We...@googlegroups.com
Juan Pablo Gardella <gardellajuanpablo@...> writes:

>
>
> You can see this sample https://bitbucket.org/gardellajuanpablo/gwt-
sample/wiki/Home
>
>
> Juan2011/6/6 Harry X <qxi...@hotmail.com>

> --
> 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-
/JYPxA39Uh5...@public.gmane.org.
> To unsubscribe from this group, send email to google-web-toolkit+unsubscribe
<at> googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/google-
web-toolkit?hl=en.
>
>
>
>
>
>
>
Thanks Juan. Will look into it, although I don's understand Spanish :-).

Harry


Juan Pablo Gardella

unread,
Jun 6, 2011, 3:16:55 PM6/6/11
to google-we...@googlegroups.com
I will translate the code to English to simplify.

Regards,
Juan

2011/6/6 Deanna Bonds <deanna...@gmail.com>
I was going through the same thing.  I ended up going back and rewatching the Ray Ryan architecture videos from 2009 and 2010 again, but this time drawing down all the diagrams, but combining them all.  Then after having a big block diagram of the gwt framework and going the javadoc for the classes it just clicked into place.  What I had problems with in the original readings of the docs, was that the overall big picture was really understated and somewhat confused by all the optional things.  And an intended way(s) to use it combined with spring roo would help.   That may be another piece of the puzzle for you.  This framework depends a bit on spring roo to generate all the boilerplate code.  

My way of using it has been to create a gwt project with the gpe.  Then add spring roo to that project.  Use Roo to create all the data enties, and request factories.  At this point I'm guessing because here is where I am - let Roo add in the client side mvp and simple uibinder display areas into it's special generated folder/packagePath.  Copy the display areas into my own and modify them the way I want and set up the places.  Then add in backend logic.

--
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/-/WFp3ckpWRmpaX2dK.

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.

Juan Pablo Gardella

unread,
Jun 6, 2011, 2:43:24 PM6/6/11
to google-we...@googlegroups.com
Juan

2011/6/6 Harry X <qxi...@hotmail.com>
Hello,
--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.

Harry X

unread,
Jun 8, 2011, 8:35:32 PM6/8/11
to Google-We...@googlegroups.com
Deanna Bonds <deanna.bonds@...> writes:

Thanks for sharing, Deanna.
Just tried 2.4 eclipse plugin and it creates client side MVP parts for you,
very convenient and good for me for now. Will check out Spring Roo.


A. Stevko

unread,
Jun 9, 2011, 12:14:39 AM6/9/11
to google-we...@googlegroups.com
My experience with Roo was a bit overwhelming. The amount of code generated and the instant complexity was a lot for me transitioning from 1.x to 2.x style GWT programming. While the learning curve is hard and steep, building an MVP++ app from the ground up forced me to learn the details from the inside out.

I bookmarked a diagram posted on the gwt-contrib form that helped me visualize the Activities + Places/History mechanism.

http://tbroyer.posterous.com/ is a must read for understanding how to use the many parts of the frameworks.

If you go with starting out small, the first step beyond building the sample application is to integrate Gin. Its essential to start early with DI because it impacts everything and integrating while the project is small saves a lot of rework.
I also suggest sticking with building out the Place - Activity - View communication interfaces rather than customizing EventBus messages. Marshaling custom events and handlers adds a lot of complexity.   The Place Controller and Request Factory are wonderful abstractions on top of the EventBus. After you've build a few CRUD panels by hand, you can really appreciate the help given by the Editor and CellList/Table frameworks although mastering them causes hair loss. 


--
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-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.




--
-- A. Stevko
===========
"If everything seems under control, you're just not going fast enough." M. Andretti





Deanna Bonds

unread,
Jun 9, 2011, 12:00:41 PM6/9/11
to google-we...@googlegroups.com, Google-We...@googlegroups.com
If you try Roo, there are a few options: You can run it from the command line, or you can run it inside eclipse.  I would recommend using the SpringSource Tool Suite as it has it already integrated, but there happens to be a bug with gwt in the Roo 1.4 release (roo version is not same as STS version).  Install latest STS, then upgrade the Roo version to the latest snapshot release.  The bug and procedure is described in this jira entry https://jira.springsource.org/browse/ROO-2445  .   I would also recommend starting from the command line at first to learn the commands and see what just roo alone does for you. It basically generates the project, database connection,  all entities and their request factories,  the MVP and Activities and Places framework.  Scaffolding UI for all entities and a scaffolding application page.  You can actually run the project and mess with all the data without writing a single line of code.   You don't have to keep roo in the loop if you don't want after you have your scaffolding, but I find it handy to keep things in sync.

As Stevko say, roo can do a lot and generates a lot, and at first it can be overwhelming.  But you only really need a small subset of what it can do.  

Deanna Bonds

unread,
Jun 9, 2011, 12:07:20 PM6/9/11
to google-we...@googlegroups.com, Google-We...@googlegroups.com
Oops typo in my post.  The Roo with the bug is 1.1.4 and you need to upgrade that to 1.2 SNAPSHOT

Ashton Thomas

unread,
Jun 9, 2011, 12:36:48 PM6/9/11
to Google Web Toolkit
I have a few public GWT example repos on Github which may help (These
aren't ROO proejcts though)

https://github.com/ashtonthomas

May help for examples of MVP/A+Place/DI/etc

These may be a little out of date (or poorly implemented) so let me
know if you have any questions. I've been meaning to add a new repo
which acts a more solid starting point and lightweight starter
framework

remnahush

unread,
Jun 17, 2011, 4:09:56 PM6/17/11
to Google Web Toolkit
Reply all
Reply to author
Forward
0 new messages