A service object is a service object and a DAO is a DAO. They are two very different objects that serve two very different purposes in an application. "Prefer composition over inheritance." In other words, keep doing what you're doing there (injecting the DAO). On Jan 29, 2013 8:37 AM, "Eric Cobb" <[email protected]> wrote:
> > I have a service CFC that calls my dao CFC a lot. Currently, I just pass > in an object of the dao to the service's init() method and save it to the > variables scope to be used throughout the service. But, I'm wondering if I > would be better off having my service CFCs extend their dao's instead. > > Thoughts? Are there any benefits to extending a CFC instead of just > passing it in as an object, or is passing an object better? > > Thanks, > > Eric > http://www.cfgears.com > > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:354105 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

