Hi, consider a panel that starts by showing a couple of buttons. When
you press a certain button, the panel expands with a form and an
anchor link. When you click the link, the panel expands once again
with some html content. The actual business purpose of the panel is
the form.

Everything is coded within the component and works fine. Now I'd like
to experiment with the View/Presenter pattern and move behavior from
the panel (view) to the presenter.

My questions are:
1. Should the presenter handle all interactions (e.g. the expanding)
or just the "business" form submit? In other words, should the
presenter also handle behaviors that only affect the internal state of
the view?

2. In the case of moving all behavior to the presenter, should it fire
application events in all circumstances? e.g. panel-expanded event and
so on..

3. In the case of firing app-events in all circumstances, would you
delegate the call to the actual handler method (within the same
presenter class) to the event-bus handler or would you call it
directly from the presenter?

4. Swing component architecture has View and Presenter integrated in
the same class. Would you consider using separate classes for all
components or maybe for "heavy" cases?

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to