Hi Steve, That's how I do it. I put getbyAttribute(AttributeName,AttributeValue) in base class, ProductGateway inherits that, and for testing, I make the super getbyAttribute() method public, but then make it private requiring it to be encapsulated by a getByProductSKU() or whatever. It adds a trivial amount to the code base but makes the DAO API explicit (if you see a getByProductSKU(), you know you probably can't remove the SKU without breaking at least one of your pages - that wouldn't be as easy to see if you only had a single getbyAttribute() method.
Best Wishes, Peter -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Steve Bryant Sent: Monday, June 26, 2006 1:02 PM To: [email protected] Subject: Re: [CFCDev] Question About Invoking/Creating CFC Objects I always cringe when I see "By" or "From" in a method name. For me, it looks like it could be a duplication of code. If you have some getProducts logic, you want to be careful not to duplicate that logic in multiple methods. If your getProductsByCat and getProductsByFormat methods are both calling a common getProducts functionality in the background, however, you are probably OK. Just my limited experience, YMMV. Steve At 11:06 AM 6/26/2006, Aaron Roberson wrote: >I discovered that my database needed to be redesigned and now it >requires two different methods anyways (getProductsByCat and >getProductsByFormat). > >It's always fun being the server administrator, db designer and >administrator, web designer and developer, etc. etc. I often feel like >a "jack of all trades, and a master of none!" > >Thanks again guys, >Aaron ---------------------------------------------------------- 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] ---------------------------------------------------------- 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]
