On Thu, 6 Jan 2005 18:48:10 -0200, Marcantonio Silva
<[EMAIL PROTECTED]> wrote:
> Is it good or bad design to make my beans extends the DAO ? 

Bad design. A DAO is for data access. A bean is not.

> The difference would be in the bean, if I extend the DAO, I would not have
> to instantiate it in my init or pseudo constructor, and could call the DAO
> CRUD methods 
> easily from the bean body. 

The whole reason for having a separate DAO is to decouple an object
from its persistence mechanism. Extends (inheritance) is just about
the tightest coupling you can have so you do not want them related
like that!
-- 
Sean A Corfield -- http://www.corfield.org/
Team Fusebox -- http://www.fusebox.org/
Breeze Me! -- http://www.corfield.org/breezeme
Got Gmail? -- I have 5 invites to give away!

"If you're not annoying somebody, you're not really alive."
-- Margaret Atwood
----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email
to [EMAIL PROTECTED] with the words 'unsubscribe cfcdev' 
in the message of the email.

CFCDev is run by CFCZone (www.cfczone.org) and supported
by Mindtool, Corporation (www.mindtool.com).

An archive of the CFCDev list is available at 
www.mail-archive.com/[email protected]

Reply via email to