Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>The distinction between widgets and MVP is not as clear as you might think.<br> You can very well implement widgets using the MVP pattern. </p> <p>An example for this are GWT's own <a href="http://code.google.com/intl/de-DE/webtoolkit/doc/latest/DevGuideUiCellWidgets.html" rel="nofollow">CellWidgets</a>.<br> CellWidgets like <code>CellTable</code>are internally using <a href="http://code.google.com/p/google-web-toolkit/source/search?q=CellTable&amp;origq=CellTable&amp;btnG=Search%20Trunk" rel="nofollow">presenters</a> and views to decouple view from logic/state. This makes it easy to unit test them. </p> <p>I think there is no perfect solution and it probably also depends on the use-case/application. I usually try to avoid making backend calls (RPC or so) from widgets itself. I try to design widgets in a way, that the data they process and ultimately display is set from outside by the presenters.<br> So basically widgets are only view like sub-components which are populated and controlled by the presenter and are embedded in the view. </p> <p>If you want to have more complex widgets which also contain business logic and backend calls then try to apply the MVP pattern to the widget.</p> <p>It also depends on what kind of MVP framework you are using. With Activities and Places (ok, strictly not an MVP framework) you usually don't have nested presenters (see Thomas Broyer <a href="http://tbroyer.posterous.com/gwt-21-activities-nesting-yagni" rel="nofollow">blog</a>).<br> This is different when you use the <a href="http://code.google.com/p/gwt-platform/" rel="nofollow">GWTP</a> MVP framework which has the concept of <a href="http://code.google.com/p/gwt-platform/wiki/GettingStarted?tm=6#Presenter_widgets" rel="nofollow">PresenterWidgets</a> and allows to nest presenters. </p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload