Note that there are some explanatory texts on larger screens.

plurals
  1. POGWT widgets vs MVP
    primarykey
    data
    text
    <p>I'm looking for guidance on GWT architecture - when to use self-contained widgets vs MVP/Activities/Places.</p> <h2>Background</h2> <p>Having read the Google docs &amp; scoured Stackoverflow, the gwt-examples project provides the best illustration to this question: <a href="http://code.google.com/p/gwt-examples/source/browse/trunk_2012/DemoGwtEditor/src/com/gonevertical/client/?r=3138#client%2Fviews" rel="noreferrer">http://code.google.com/p/gwt-examples/source/browse/trunk_2012/DemoGwtEditor/src/com/gonevertical/client/?r=3138#client%2Fviews</a></p> <p>An application is divided into strongly de-coupled views, each view corresponding to a DOM peer. Activities &amp; places are used to manage logic/RPC &amp; navigation for a given view. Although imprecise, I'll refer to this pattern as MVP for brevity.</p> <p>Widgets don't conform to this pattern, containing both view and logic/RPC calls.</p> <h2>Context</h2> <p>For the context of this question, I'm thinking of a complex GWT app using a TabLayoutPanel to create separate "screens". Each tab/screen relates broadly to a user activity. Mint.com is a good example of this kind of interface: a dashboard tab, a transactions tab, budgets tab, trends tab, etc. Each tab is built from a number of <em>sub-components</em>: a chart with selectors, a report-selector, a transactions-table, etc.</p> <p>A sub-component like a transactions table is likely a composite of several GWT natives - e.g. a table with a couple of buttons. Google doco shows this sort of sub-component as being de-composed into MVP.</p> <h2>Assumptions - Widgets vs MVP</h2> <p>Treating the sub-components with MVP means either:</p> <ul> <li>very large view &amp; activity/presenter classes for each tab <em>or</em></li> <li>nesting MVP &amp; an explosion of files (5 per sub-component)</li> </ul> <p>On the other hand, sub-components as widgets means:</p> <ul> <li>very light MVP structure just to manage navigation history across tabs; hardly worth it </li> <li>no de-coupling (so difficulty with unit testing &amp; switching out views)</li> </ul> <h2>Questions</h2> <ul> <li>Are these assumptions correct?</li> <li>When to use custom, composite widgets over de-coupled views/MVP (or vice-versa)?</li> </ul>
    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.
 

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