Hi all I have a conundrum... Here goes:
1) I have an application scoped store.cfc responsible for pulling out category and product information from my database. 2) I have a user.cfc, stored in the session scope which holds the users shopping cart etc. 3) I have an application scoped usermanager.cfc (in this stylee: http://articles.techrepublic.com.com/5100-3513_11-5543910.html) which handles locking etc. My problem is: I need to add a product to my cart... Which CFC is responsible? - Usermanager.cfc doesn't know how to contact the database. - User.cfc doesn't know anything. - Store.cfc doesn't know about session variables. In the past, I've used a custom tag, so I'm guessing I need another cfc? Or should I make usermanager.cfc more clever and give it access to the database? Store.cfc has a function getProductDetailsforCart() which returns all the details I need to add to the cart; should it be able to access usermanager.cfc? Yes, I probably need ColdSpring / IOC / dependency injection etc, but for the moment, I'd like to see how it should be done "by hand" so to speak... Can anyone point me in the right direction? Much appreciated. Geoff ______________________________________________________________________ This email has been scanned by the MessageLabs Email Security System. For more information please visit http://www.messagelabs.com/email ______________________________________________________________________ You are subscribed to cfcdev. To unsubscribe, please follow the instructions at http://www.cfczone.org/listserv.cfm CFCDev is supported by: Katapult Media, Inc. We are cool code geeks looking for fun projects to rock! www.katapultmedia.com An archive of the CFCDev list is available at www.mail-archive.com/cfcdev@cfczone.org