model view controller - Java Web Project Structure Best Practice -


I am starting a new Java Web project which is using Hibernate and a standard MVC architecture. I have just started the project structure structure and by doing this, I started looking around to see if there is any criterion in this area where the controller should go and generally the best way to get everything out is. Although I have not really received any guidelines

So I'm curious to know

  • Is any of the best practice guidelines for layout of Java Web Projects aware?
  • Does anyone have a specific set of strict rules, that they always follow different types of projects?
  • Do people different levels like compiler, presentation, business, and apps?
  • To continue my previous answer, I have many web projects In all, the structure under the SRC is as little as the packages are roughly different from the 3 logical layers.

    The presentation layer is first, as you said, for servlets, app listeners and assistants.

    Second, there is a layer for the Hibernate model / DB access layer. The third layer for business logic However, sometimes the boundary between these layers is not clear. If you are using Hibernation for DB access, then the model is defined by the hibernate classes, so I put them in the same area as the DAV objects. Like Com.sample.model holds Hibernate data objects and com.sample.model.dao holds Dao objects.

    If used directly with jdbc (usually with spring), sometimes I am close to the business logic layer rather than the DB access layer of data objects.

    (The rest of the things usually fall below the business layer).


Comments