Yep, no problem with your reasoning. I'm really just suggesting some things to consider, but ultimately you need to try some things out and see what works for you.
Having said that, one more thing to consider. I've found that embedding a "currently logged in user" concept too deeply into utility code can be a problem when you want to write an admin interface to manipulate other users' data. E.g. A shopper might want to see all the items in their order, but then at a later date an auditor might want to pick a user and look at their order history. All the same code now needs to operate on an arbitrarily specified users. If your siteUser concept copes with this scenario, great. Even if it doesn't, maybe this isn't an issue for you. I've moved the terminology thing to another thread. I find this stuff interersting, but you may not, and it's not really germane to what you're trying to do. Jaime -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of J MacKay Sent: Saturday, 31 March 2007 2:51 AM To: [email protected] Subject: RE: [CFCDEV] newbie: needs an opinion on component structure Jaime, I think its the correct term. What I had in mind is something like the CartManager in the FuseBox Bookstore Sample application. Here is a brief description "The shopping cart functionality is handled by a CartManager CFC which acts as a Session Facade. This means the CartManager creates and manipulates a Cart object that is kept in the session scope. The Cart object itself has no idea that it is being held in the session scope. All manipulation of the session scope is handled by the CartManager facade." http://www.briankotek.com/index.cfm?fuseaction=content.viewcontentitem&con tentid=47&returnto=coldfusion.main I thought a facade could simplify things. My thinking was - if ninety percent of the dao/gateway components are dependent on siteUser information, maybe would it be easier to pass a facade object into the component contructors instead of requiring a siteUserID on every method. Then again maybe its the "hammer looking for a nail" syndrome :) Janet -- ---------------------------------------------------------------------------- -- We won't tell. Get more on shows you hate to love (and love to hate): Yahoo! TV's Guilty Pleasures list. 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/[email protected] 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/[email protected]
