Note that there are some explanatory texts on larger screens.

plurals
  1. POGWT Codesplitting Integration: MVP and Activites/Places
    primarykey
    data
    text
    <p>Let's say you have a "display region" (<a href="http://google-web-toolkit.googlecode.com/svn/javadoc/2.4/com/google/gwt/user/client/ui/AcceptsOneWidget.html" rel="nofollow noreferrer"><code>AcceptsOneWidget</code></a>) that contains a tabbed pane. Clicking a different tab (i.e., going from "<em>fantastico</em>" to "<em>profile</em>") results with totally new content being displayed inside the pane. This seems like a perfect use case for codesplitting, because up until the user clicked the "<em>profile</em>" tab, they didn't need to download the code necessary to display it. (<strong>Note:</strong> If any GWT gurus disagree and don't think this is the right use case for codesplitting, then please point that out to me, but it is besides the point for this question, so please just bear with me!)</p> <p><img src="https://i.stack.imgur.com/ioA3n.png" alt="enter image description here"></p> <p>Now then, if my <em>understanding</em> of basic GWT architecture is correct, the code that is necessary to display the "<em>profile</em>" tab consists of <code>Activity</code>(ies), <code>Place</code>(s), perhaps some MVP stuff such as a <code>Presenter</code>, <code>Module</code>, <code>EntryPoint</code>, etc. Of course this will be different depending on the application and developer (as I've learned in GWT there's many ways to accomplish the same objective), but regardless, it's a bunch of MVP/Activity/Place "stuff". For the sake of this question, I like the model proposed by the answerer of <a href="https://stackoverflow.com/questions/5510571/gwt-mvp-with-places-activities-wheres-the-model">this SO question</a>.</p> <p>After reading <a href="http://jcheng.wordpress.com/2010/02/16/elegant-code-splitting-with-gwt/" rel="nofollow noreferrer">this article on the AsynchProvider pattern</a> I'm trying to tie all these best practices together and achieve an architecture whereby:</p> <ul> <li>I implement codesplitting such that each tab in the pane is codesplit (is is <em>codesplitted</em>? <em>codesplat</em>?) as its own fragment and will download only if/when the user clicks it for the first time</li> <li>All the code necessary to display/render/implement each fragment (tab/pane) is neatly organized and follows the <code>AsynchProvider</code> patterns referenced in the above article; this allows it to be compartmentalized and have no dependencies on other fragments</li> </ul> <p>I'm starting to put all the pieces together, but still not seeing how these two concepts can be tied together in working code.</p> <p>I'm finding GWT to be mysterious, powerful and wonderful, but very difficult to learn without practical code examples to follow. Of course, these wireframes don't really show any complexity in the "<em>fantastico</em>" or "<em>profile</em>" panes, so again please bear with and pretend like these are both fairly sophisticated display regions with lots of rich UI components. Thanks in advance!</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.
 

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