A Gateway object (of the J2EE pattern "table data gateway") is another database abstraction. Where a DAO deals with individual objects/recrods, a Gateway deals with sets of records. In other words, a Gateway will return query result sets. So where a DAO will have methods like create(), read(), update(), delete(), or save() that deal with a single entity, a Gateway might have methods like getAllEmployees(), getCustomersForState(), getOpenOrders(), etc.
Here is a relevant blog post: http://geekswithblogs.net/flanakin/archive/2004/03/08/2633.aspx On 5/17/06, Ian Skinner <[EMAIL PROTECTED]> wrote: > > If your not going to use a gateway Object, I would put a method in your > DAO to return a query for the master list. You could then create a bean and > populate it though each record or just output the query. I tend to do a bit > of both so I guess my apps are more OOish the straight OO. If your going to > use a gateway CFC, the gateway holds all the methods the would return more > than one row, as these cannot be returned to the caller in a bean. > > Ok, sounds good. Can someone explain a little more on what a Gateway > would be; what its purpose, a basic pseudo code example of how one might be > constructed and used? Or a good link to a resource that would help with > this? > > I've heard of Gateways many times in my reading, but have yet to see a > clear example of one. > > -------------- > Ian Skinner > Web Programmer > BloodSource > www.BloodSource.org > Sacramento, CA > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:240829 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=89.70.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54