On 12/27/05, Jason Daiger <[EMAIL PROTECTED]> wrote:
> After a ton of reading and experimenting w/ these 2 patterns. Is there a
> reason folks seem to prefer the TDG pattern as M. Fowler describes,
> http://martinfowler.com/eaaCatalog/tableDataGateway.html,
> over the DAO pattern described in the J2EE Design Patterns,
> http://java.sun.com/blueprints/corej2eepatterns/Patterns/DataAccessObject.html?
>  It seems to me the DAO pattern outlined by Sun includes the TDG pattern in
> that it allows multiple rows to be returned. To me this type of DAO seems
> 'more complete' b/c it creates a single location for all CRUD functions for
> a table, or set of depending on the relationships, in one place and not one
> for the single Curds and one for the multiple CRUDs.
>
> Am I missing something or not understanding the TDG correctly?

I think the TDG pattern is more pervasive in CF since most developers
are very comfortable working with the CF query record set.  I suspect
if it were easier (or for those very concerned with performance,
faster) to assemble an array of Beans that you might see the TDG give
way towards usage of a single DAO that returns either a single Bean or
array of Beans depending on the method called.  My personal preference
is to deal with arrays of Beans where possible but I think either
approach is perfectly serviceable.


-Cliff


----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email to 
[email protected] with the words 'unsubscribe cfcdev' as the subject of the 
email.

CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting 
(www.cfxhosting.com).

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


Reply via email to