Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

There seems to be two basic approaches for how the Presenter and View interact with each other. We should pick one of the options and stick to it.

  • Option A: There is a bi-directional relationship between the Presenter and the View (each has a reference to an interface of the other). In this case, the view listens to its own component events, and notifies the presenter when action needs to be taken, like adding a new message. Likewise the Presenter directly notifies the View when data changes occur.
    • Pros:
      • Easy to implement and read.
      • The presenter does not need to know anything about how the view meets it requirements, making it loosely coupled to the view implementation.
      • Works well with UiBinder, so the UI can be built with an XML configuration file, rather than code.
      • Very easy to have multiple implementation of the view (like a mobile view and browser view).

...