title: Java App with Swing and Web GUI
body: <p>I need to build a desktop application for internal users for certain business. It also needs web based GUI for external users. I know, with web GUI both internal and external users can access it, but there are certain factors which are outside our control - due to which, desktop application is really unavoidable. For the purpose of this question, I would like to focus on the way to support both Desktop client (Swing) and Browser client. </p>
  
  <p>Are there any best practices to be followed? I could think of below:</p>
  
  <ol>
  <li>Expose service classes as web services and use these from both Swing client and web client</li>
  <li>Expose service classes as EJB (business is into Java EE techs) and use Swing client as EJB client. Web client can use controller classes to interact with EJB</li>
  </ol>
  
  <p>Are there any known benefits of using either approach, apart from technology agnosticism offered by web services?</p>
  
  <p>Also, for swing client, I am thinking of using Java Web Start for easy distribution. I have never used it before, but from what I understood, it can support automatic version check at startup and update the client when required - is this correct?</p>