DAO's are classes relatyed to object: a DAO's create() method is invoked with an object, generally a bean, as argument and then persist the properties
...
<cfset var person = CreateObject("component","com.person").init(f_name, l_neme,age) />

<cfset personDAO.create(person) />

in personDAO
...
   <cfargument name="person"... />
...
<cfquery...>
INSERT INTO p_table f_name,l_name,age VALUES arguments.person.getf_name()...

</cfquerey>
gateways returns queries or similar structures, i.e. a list of record
regards
salvatore
----- Original Message ----- From: <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Wednesday, July 13, 2005 3:48 PM
Subject: RE: [CFCDev] gateway CFCs


OK, so a gateway is a way to do batch actions against a recordset of
rows from a table?  Is it similar to a DAO in that a DAO does CRUD
activity for a single record?  Gateways handle CRUD for multiple rows.

If this is true, then why would a gateway do create() since the record
is already created?  Or perhaps it accepts an array of items that get
inserted into a table?

Tom




-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Patrick McElhaney
Sent: Wednesday, July 13, 2005 8:36 AM
To: [email protected]
Subject: Re: [CFCDev] gateway CFCs

In Patterns of Enterprise Architecture, Martin Fowler defines Gateway
as "An object that encapsulates access to an external system or
resource."

Most discussions of Gateway on this list relate to Table Data Gateway:
"An object that act as a Gateway to a database table. One instance
handles all the rows in a table."

In other words, you create a CFC that encapsulates access to a
database table with functions like create(), retrieve(), update(), and
delete().

Patrick

--
Patrick McElhaney
704.560.9117
http://pmcelhaney.weblogs.us


----------------------------------------------------------
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).

CFCDev is supported by New Atlanta, makers of BlueDragon
http://www.newatlanta.com/products/bluedragon/index.cfm

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




----------------------------------------------------------
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).

CFCDev is supported by New Atlanta, makers of BlueDragon
http://www.newatlanta.com/products/bluedragon/index.cfm

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



__________ Informazione NOD32 1.1167 (20050713) __________

Questo messaggio  รจ stato controllato dal Sistema Antivirus NOD32
http://www.nod32.it




----------------------------------------------------------
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).

CFCDev is supported by New Atlanta, makers of BlueDragon
http://www.newatlanta.com/products/bluedragon/index.cfm

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


Reply via email to