Google I/O 2013 MVP talk and GWTP evolution

87 views
Skip to first unread message

Danilo Reinert

unread,
Jun 5, 2013, 10:45:53 AM6/5/13
to gwt-pl...@googlegroups.com
After watching the good Eric Kuefler talk about MVP and GWT, I saw that it can be a good approach to use the suggested Composites instead of Presenter + View pairs at first.

I would like to know the opinion from GWTP team about this suggestion, and if you plan some evolution in order to provide a solution for using all-in-one Composite.

--
D. Reinert

Christian Goudreau

unread,
Jun 5, 2013, 12:56:43 PM6/5/13
to gwt-pl...@googlegroups.com
I'm using often Widgets that doesn't have presenters, but they don't have any business logic in it. The MVP approach is still in my opinion the right approach to have a good separation of concerns between the business layer and the presentation layers. It is more declarative, but is big business application, it is a lot cleaner and easier to maintain.


--
You received this message because you are subscribed to the Google Groups "GWTP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gwt-platform...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 



--
Christian Goudreau

Christian Goudreau

unread,
Jun 5, 2013, 12:57:36 PM6/5/13
to gwt-pl...@googlegroups.com
FYI: There's a tool like this that exist in GWTP since 2010:
--
Christian Goudreau

Danilo Reinert

unread,
Jun 5, 2013, 10:29:19 PM6/5/13
to gwt-pl...@googlegroups.com
Thanks for the information, it's useful.

In the MVP terms, you're right about the separation of concerns.

But thinking about the philosophy "Start simple, grow complex when necessary", it would be a good feature ot have this all-in-one Composite, wouldn't it?

--
D. Reinert

opn

unread,
Jun 6, 2013, 4:41:23 AM6/6/13
to gwt-pl...@googlegroups.com
I also wanted to post this question after watching the talk. I think it would be a good addition! I use normal widgets often, too. But they can't be used with addToSlot / setInSlot and that would be the place where those simple "view presenters" would have benefits imo.

Jonas

unread,
Jun 10, 2013, 3:11:40 AM6/10/13
to gwt-pl...@googlegroups.com
I often use Composite's rather than full PresenterWidgets where it's not "needed" or a PW feels too complex for the situation. I still like to use the setInSlot/addToSlot mechanism if I then later want to switch to a full presenter widget. What you can do is instead of setInSlot(MY_SLOT, presenterWidget) you use getView().setInSlot(MY_SLOT, presenterWidget.asWidget()). Of course, this bypasses the presenter widget child logic in the presenter but it can be useful if you want to use the same mechanism in the view to show the content. If you do switch to a presenter widget later on you can remove the .asWidget() and call setInSlot instead of getView().setInSlot.
Reply all
Reply to author
Forward
0 new messages