Announcement Announcement Module
No announcement yet.
Spring layers Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Spring layers

    I working on a project using Spring MVC. I need to make a plan where goes what e.g. the Controller class, DAO, BO (business Object), TO (transfer object), Validation classes, FormBean etc. I need to organize my project. I read that Spring MVC application is broken down into a series of layers. i.e.

    1. User Interface
    2. Web
    3. Service
    4. Domain Model
    5. Persistance
    6. DAO

    I need to know what goes in what layer. My BO calls DAO and DAO uses TO. For each DAO class I have an Interface. I am pulling all the data from oracle by invoking back-end pl/sql procedure calls in my DAO usig JDBCTemplate. Can you tell me how should I organize my different classes (entire project) into different layers.


  • #2
    I would say something like this:

    - controllers
    - validators
    - FormBeans

    - transactions
    - services with interfaces
    - DTO:s

    Domain model

    - your domain objects AKA business objects

    Persistence AKA dao layer
    - dao interfaces
    - dao implementations