Barry,

I would use the gateway for bulk inserts.  More than likely my gateway
is going to be DBMS specific (hence I may have multiple gateways if I
have to support multiple DBMSs with a generic gateway and a factory to
give me the right one based on my needs) so a db specific batch update
would work fine too as well as the xml/SQLServer combo.

I don't keep my data cached on my gateways, as typically it is being
modified all the time; but I suppose, if I had data that didn't change
(or rarely did) I could cache it (then update the cache when the db is
changed).

Bill



On 7/13/05, Barry Beattie <[EMAIL PROTECTED]> wrote:
> >> 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?
> 
> 
> including bulk data inserts?
> processes that set up multiple records in one go (think start of
> school year and default student data, etc)?
> 
> and for editing, say from an editable data grid, what's the best way
> to use a gateway without N times UPDATE loops (db specific batch
> updates and/or XML thrown at SQLServer?)
> 
> and do they get held in a persistant scope and cache the data? if so,
> how do they know when the data's dirty?
> 
> thanx
> 
> 
> 
> On 7/13/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> > 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]
> >
> >
> >
> 
> 
> ----------------------------------------------------------
> 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]
> 
> 
> 


-- 
[EMAIL PROTECTED]
http://blog.rawlinson.us

If you want Gmail - just ask.


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