title: Eclipse RAP / RWT Standalone applications - Best design?
body: <p>I'm working on the design of an with RAP/RWT, working under Tomcat. I'm learning RAP now, and a couple of questions come to my mind.</p>
  
  <p>My application has a backend that works continuously gathering data from certain sources. On the other hand I want to create a frontend (RWT standalone application, or RAP with workbench functionality, not decided yet) running as a webapp.</p>
  
  <ul>
  <li><p>First question: should I keep the backend as a separate process, and let the frontend RAP application communicate somehow with it? Or can I integrate everything together in the RAP application? Integrating everything together leads to the second question.</p></li>
  <li><p>Second question: how can I detect from within the RAP application, when is the browser window/tab holding my app, closed? I would like to do some resource cleanup when the user closes the graphical interface (i.e. closes the browser). I cannot find anything equivalent to <code>ApplicationWorkbenchWindowAdvisor#preWindowShellClose</code> in RWT standalone applications. Same to dected when the application is started. In general, are there callbacks to follow the webapp lifecycle in RWT standalone applications?</p></li>
  </ul>
  
  <p>Thanks a lot for your help!</p>