The "if ever" is true. The Gateway manipulates recordsets for you. The DAO still performs all operations on individual rows. You could, of course, write a gateway function that performs mass updates/insertions, but it would still be looping over a structure/array and using the DAO to perform the operations.
That's another long discussion altogether and some people would argue against doing that. Steve "The Boss" Brownlee http://www.orbwave.com/cfjboss -----Original Message----- From: Ian Skinner [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 17, 2006 4:47 PM To: CF-Talk Subject: RE: OOD/Design Patterns and ColdFusion. Steve Brownlee My best attempt at a skeleton gateway for your TrimaDAO... Thanks, that looks very helpful. I am still playing with the basic bean and DAO, should get to the gateway part shortly. If I understand your example correctly, the gateway supplants the dao when one is working with multiple beans. If true, that clarifies a big confusion for me, where I was trying to imagine a gateway using the DAO object somehow to create multiple beans or something. It was not getting me very far. SO for a simple master - detail - add-update piece of an application. One would probably have a bean.cfc that describes the basic concrete object. A DAO for crud options with the bean data and a database, and a separate gateway type object when one wants to read multiple beans from the database. I presume one would not often, if ever, use a gateway for insert and/or update operations since one very seldom does that against multiple rows. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:240835 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

