Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>You actually give too few requirements and constraints, even to choose a technology stack.</p> <p>What i can advise according to your post : </p> <p>Try to factorize the data access layer (DAOs) as you will probably share it between desktop and web application. For this you have 2 solution :</p> <p><strong>Solution 1</strong> : jar module embedded in both application:<br> This imply that the component have to be also runnable outside of a server container (Java SE). I would so advise not to use Java EE but Spring as Java EE does not yet provide a standalone "lightweight" container properly managing persistence context.</p> <p>Spring will allow you to define a data access component with a datasource (plugged to remote DB) and container transaction management (using an ORM outside of a container isn't very interesting imho) which will run alone (desktop app) and inside any servlet container (tomcat, etc) (web app) with for only difference a configuration file.</p> <p>It will give:</p> <p><strong>Standalone</strong> : client [Swing views > controllers > Spring managed DAOs] > remote database<br> <strong>web</strong> : client [html] > web server [any view techno (spring mvc for example) > Spring managed DAOs] > remote or local database</p> <p><strong>Solution 2</strong> : SOA architecture with a shared data access component instance deployed on the web server and exposed to standalone app through web-services :</p> <p><strong>standalone</strong> : client [swing views > controllers] > http > web or Java EE server [REST or SOAP web-services > DAOs] > local or remote database<br></p> <p><strong>web</strong> : <li> client [html] > web server [any view techno > DAOs] > local or remote database <li> client [RIA (Ajax, Flex, etc...)] > web server [REST web services > DAOs] > local or remote database<br></p> <p>Otherwise i would advise not to use an ORM if you don't really need it cause the learning curve is quite long compared to advantage it will bring to you. (Ofc it depends of your context and requirement : complexity of the data model, existing DB or new one, DB exclusively used by your app or shared, existing stored procedure or trigger, high concurrency, etc, etc)</p>
 

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