Feb 6th, 2012, 02:40 AM
Whats the ideal project setup / project strcuture for a spring based web project
Hi Spring Community,
I am quite new to Spring technology and wondering what is the ideal project setup (in eclipse or other IDE) for a vanilla web project with one relational db? My thoughts are:
- Model Project (com.company.project.model): Contains mainly Interfaces / simple Classes that define the object model of the a application. The project does not contain any Spring configuration / annotation.
- Service Project (com.company.project.service): Contains interface definitions and its implementation of services (probably comparable to session ejbs). For starting the project, one can use the "Simple Spring Utility Project" from the Spring template projects.
- Data Access Project (com.company.project.persistence): Contains interface definitions and its implementations of DAO classes. For starting the project, one can use the "Simple Spring Hibernate (or JPA) utility project" from the Spring template projects.
- Web Project (com.company.project.web): Contains JSPs, Controllers. For starting the project, one can use the "Spring MVC Project" from the Spring template projects.
Is this a good project structuring? Does it make sense to do a more fine-grained structuring (e.g. seperating the Interfaces of the persistence / service project in a projects, further separation of the data access project)? When using Spring Webflow, does it go in the standard Web Project or does it get a project of its own?
Thanks for any feedback