Separate VaadinServlets or Separate UIs

I have one WAR file containing (in essence) two web applications, each with their own URLs, though sharing a majority of the code from front end to back end. One app is a “lite” version of the other. In Vaadin 6, loading each “app instance” was handled manually depending on the URL provided (altering one Application class).

In Vaadin 7, perhaps to do things a little differently, there are choices:

  1. each app having it’s own VaadinServlet with URL mapping and UI.
  2. each app having it’s own UI under a UIProvider, under one VaadinServlet.
  3. both apps sharing a UI, altering the view contents depending on URL (same as before).

Are there obvious reasons or major pros/cons for choosing one architecture over the others?

Thanks for any comments,
susan

If you need to share session state between the apps (e.g. login info), then #2 is a good choice. If not, #1 is better. I wouldn’t really do number 3, I would rather have the apps in separate classes.

Ok, great. #1 is the path I chose. Thanks for the response, Thomas.