title: Large apps in GWT: one module, or several?
body: <p>In order to provide nice URLs between parts of our app we split everything up into several modules which are compiled independently. For example, there is a "manager" portion and an "editor" portion. The editor launches in a new window. By doing this we can link to the editor directly:</p>
  
  <pre><code>/com.example.EditorApp?id=1
  </code></pre>
  
  <p>The EditorApp module just gets the value for id and loads up the document.</p>
  
  <p>The problem with this is ALL of the code which is common between the two modules is duplicated in the output. This includes any static content (graphics), stylesheets, etc. </p>
  
  <p>And another problem is the compile time to generate JavaScript is nearly double because we have some complex code shared between both modules which has to be processed twice.</p>
  
  <p>Has anyone dealt with this? I'm considering scrapping the separate modules and merging it all back into one compile target. The only drawback is the URLs between our "apps" become something like:</p>
  
  <pre><code>/com.example.MainApp?mode=editor&amp;id=1
  </code></pre>
  
  <p>Every window loads the main module, checks the value of the mode parameter, and and calls the the appropriate module init code. </p>