Better ways to implement DAOs
From: tpcunha (tpcunha_at_gmail.com)
Date: 01/13/05
- Next message: Daniel Parker: "Re: up front designs always useless"
- Previous message: Ron Jeffries: "Re: how many bugs do you find and correct during TDD?"
- Next in thread: Mark Nicholls: "Re: Better ways to implement DAOs"
- Reply: Mark Nicholls: "Re: Better ways to implement DAOs"
- Reply: kirkk: "Re: Better ways to implement DAOs"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 12 Jan 2005 17:36:51 -0800
Hi everybody,
Please, i'd like some tips for implementing a good-quality DAO.
For example, is this structure good?:
MyTableDAO [interface]
DBMyTableDAO [implementation]
MyTableDAOFactory [singleton]
All queries (insert, delete, update, select) are defined in
DBMyTableDAO. And the initialization of Collections of DTOs (for a
select that return a resultSet with more than one record) and single
DTOs (for searchs using the primary key, for example). This makes the
code quite confusing, also because of try-catch blocks.
Are there better ways to make DAOs?
Thanks.
- Next message: Daniel Parker: "Re: up front designs always useless"
- Previous message: Ron Jeffries: "Re: how many bugs do you find and correct during TDD?"
- Next in thread: Mark Nicholls: "Re: Better ways to implement DAOs"
- Reply: Mark Nicholls: "Re: Better ways to implement DAOs"
- Reply: kirkk: "Re: Better ways to implement DAOs"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]