Activity Places | Nested activities

138 views
Skip to first unread message

Adolfo Panizo Touzon

unread,
Mar 8, 2012, 11:34:26 AM3/8/12
to google-we...@googlegroups.com
Hi all,

I'm going to start a new app and I'm interested in using activities and places.

I've read the articles of the official page of gwt devguide, the Thomas Broyer's posts, some questions in Stack Overflow, and I think I have a general idea.

I'm sure when I start to coding I'll understand better/completely all the concepts, but before to start I think is better to ask some questions that I don't understand enough well.

In the last apps that I've worked we were using the GWTP plugin, and now is difficult to me understand one architecture that doesn't have presenters that contains others presenters (activities that contains other activities).

For example, in my app I'll have two regions that need all the screen (general section and blog section). Each section has different regions and different behaviour in  each region. With gwtp I should create a GeneralPresenter (with the generalFoo1PresenterWidget, generalFoo2PResenterWidget inside) and BlogPresenter  (with other Presenters and PresentersWidgets Inside), but with Activities is different...

Any ideas or comments? I think there are some solutions, but I don't know what the best way to solve this.

Thank you in advance.

Adolfo.

--
El precio es lo que pagas. El valor es lo que recibes.
Warren Buffet

Jesse Hutton

unread,
Mar 8, 2012, 6:25:00 PM3/8/12
to google-we...@googlegroups.com
When using Activities and Places, you don't get rid of the notion of
presenters. In fact, I often pass presenters to my activities, which
can of course have nested presenters. IMO, activities and places
mostly applies to pages and page flow (and encapsulating page specific
application data and mapping that easily to url tokens).

For handling multiple regions of the page, all you need to do is
instantiate multiple ActivityManager instances and set their display
properties to the page region (ActivityManager#setDisplay() registers
the manager as a PlaceChangeEvent handler on the given event bus).

Jesse

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

Brandon Donnelson

unread,
Mar 10, 2012, 5:19:59 PM3/10/12
to google-we...@googlegroups.com
Activities and Places is great for getting form one place to another in an application which I enjoy very much. But you would have to build your own MVP layer and could use Activities and Places as a navigation system for it. GWTP has a places navigation which is similar. 

If you like MVP, using GWTP might be a better choice because it has everything setup and ready to go for MVP. Although, it layers in presenter widgets which had a different method of attachment and a little knowledge overhead consuming library, but works perfect for MVP and nested presenters. I'm enjoying using Activities and Places in my projects but I don't follow MVP either :)

Brandon

Adolfo Panizo Touzon

unread,
Mar 11, 2012, 8:38:05 AM3/11/12
to google-we...@googlegroups.com
Thank you both for your answer, I´ll keep in mind.

I´m going to develop one simple app with Activity & Places and then, I´ll see what is my best option (create my own Presenters, introduce gwtp, play with the workflow of the screen...).

Regards,

Adolfo.

2012/3/10 Brandon Donnelson <branfl...@gmail.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-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.
Reply all
Reply to author
Forward
0 new messages