Results 1 to 3 of 3

Thread: Design issues about DAO

  1. #1
    Join Date
    Apr 2005
    Posts
    15

    Default Design issues about DAO

    Hi there,

    The project I am taking part in uses spring with hibernate for data access. We are trying to design the project according to common patterns. We have Transfer Objects (with hibernate and ejb3 edr1 annotations for schema generation), Data Access Objects interfaces and implementations of those using hibernate as lower layer data access (as in jpetstore dao and dao.ibatis). We have defined Service interfaces and implementations of those (like jpetstore's domain.logic), which use more than one DAO interface in a DAO-implementation independent fasion. One of the questions that arised is the following: Should we use solely the Service interfaces for data access, or both Services and DAO's? Former would mean that most of DAO's methods should be "proxied" through respective service methods.

    Thanks in advance,
    Dimo

  2. #2
    Join Date
    Aug 2004
    Location
    Melbourne, Australia
    Posts
    1,104

    Default

    Should we use solely the Service interfaces for data access, or both Services and DAO's?
    It's generally better design to apply your transaction boundary at one level, but I hear what your saying. Also, it might be a bit confusing to mix usage of transactional and non-transactional DAOs (inside of and outside of the service layer).

  3. #3
    Join Date
    Aug 2004
    Location
    Vrhnika, Slovenia
    Posts
    133

    Default

    Regarding transactions and DAO's, I think this is a useful post to read:
    - http://forum.springframework.org/viewtopic.php?t=4438

    Decide upon this. :-)

    Rgds, Ales

Similar Threads

  1. Issues with multithreading and controllers?
    By brianstclair in forum Web
    Replies: 16
    Last Post: Feb 19th, 2010, 10:57 AM
  2. Replies: 1
    Last Post: May 29th, 2005, 06:03 AM
  3. Two design issues
    By Savagearts in forum Architecture
    Replies: 7
    Last Post: Mar 29th, 2005, 05:14 AM
  4. Architectural Issues
    By jfcone in forum Swing
    Replies: 3
    Last Post: Nov 15th, 2004, 06:26 PM
  5. Replies: 6
    Last Post: Oct 8th, 2004, 02:21 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •