1

GWT Activities/Places/MVP concepts were discussed quite a lot here, but I haven't found a good example of how to apply those concepts to a multi dialog portal-like GWT application.

I'm working on a GWT application that should have multiple independent widgets. These widgets are implemented based on PopupPanel. Each widget can be moved around on the screen and should be independent of others. The original intention was to use Activities and Places approach. Each widget would be an activity, all activities would be managed by the same ActivityMapper and ActivityManager. But in that case whenever new dialog is opened from the menu, new Place is created and mayStop() is called for the currently opened dialog. Having one ActivityMapper and ActivityManager per widget type is not going to work either since there could be several widgets of the same type on the screen.

How should architecture of a GWT application look like in this case? Any suggestions?

dimchez
  • 2,004
  • 1
  • 15
  • 9

1 Answers1

1

A place is like a URL, it doesn't seem to fit your needs, unless you build a super-place containing the accumulated state for all widgets.

You absolutely need an ActivityMapper and ActivityManager per "widget" (or not use activities altogether)

Thomas Broyer
  • 64,353
  • 7
  • 91
  • 164
  • As I mentioned, having ActivityMapper and ActivityManager per widget type won't really work - there can be several widgets of the same type on the screen at the same time. Having instances of ActivityMapper and ActivityManager per widget seems like an overkill.. I guess I'd have to invent my own ActivityMapper and ActivityManager to handle widgets on the screen. – dimchez Jan 09 '12 at 22:50
  • Those "widgets" would have to extract their "place info" from a "super Place" anyway, so you could associate that info with some unique key in the "super place", and initialize the ActivityMapper with the equivalent key; so that you could have several "FooPlace" floating around at the same time. But as I somehow implied, if each "widget" consists of a single Activity, then yes having an ActivityMapper/ActivityManager per "widget" is overkill, and you'd better develop a specific ActivityManager, as you suggests. – Thomas Broyer Jan 10 '12 at 13:21
  • Thanks for your suggestions. I've ended up implementing my own widgets manager. – dimchez Jan 10 '12 at 16:44