Announcement Announcement Module
Collapse
No announcement yet.
VO's + DAO's implementation or only Entity model [ With Pojo's and entitymanager ] Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • VO's + DAO's implementation or only Entity model [ With Pojo's and entitymanager ]

    Hi,
    I am designing a web application where i need to consider between below two approaches, Any help in suggesting which one is better for a scalable application.

    Approach 1: Using VO's [Pojo layer] ---> DAO's[Data access layer] ----> service layer

    Approach2: Using Entity model [ Pojos and Data access layer are merged into a single layer] ----> Service layer
    In this approach i use entitymanager and annotations

    Thanks in advance,
    Bhargav
    Last edited by bhargav; Apr 13th, 2010, 02:03 PM.

  • #2
    IMHO adding the DAO layer is always a good choice. Even for very small projects.

    Comment


    • #3
      I agree to that,
      But don't you think, now most of the DAO logic is being abstracted by Spring.
      And having one more layer wouldn't fetch me anything there.
      Instead if i take out the layer it may increase the processing speed, less objects.

      Comment


      • #4
        Originally posted by bhargav View Post
        I agree to that,
        But don't you think, now most of the DAO logic is being abstracted by Spring.
        And having one more layer wouldn't fetch me anything there.
        I would use a DAO just to keep the persistence logic separated from the rest of the app. This way it could be advised differently, monitored separately, changed, etc.


        Originally posted by bhargav View Post
        Instead if i take out the layer it may increase the processing speed, less objects.
        That depends on how many and how large the DAOs are. I have worked on spring projects that have hundreds of DAOs with dozens of methods each and the applications ran just fine.

        Comment

        Working...
        X