> Question # 1: Am I correctly understanding what a 'controller' is? As I > understand it, in an MVC environment, the controller is what handles all the > various tasks required prior to rendering the requested page.
I think of the controller as the orchestrator, the one who examines the context, calls the models needed to get any data required, then passes that to the view for rendering. He's the traffic cop, kinda. > Question # 2: Assuming that the answer to Q1 is 'Yes', is it > correct/okay/accepted for the controller to be a CFC as opposed to an > include or custom tag, and that controller CFC to reference outside scopes, > such as 'form', 'url', 'session', and 'cgi'? Includes and custom tags aren't really part of the OO model. Doesn't mean they aren't useful in an OO context, but probably not as any of the main OO players; those would be CFCs (or maybe java objects). I have a strong preference that CFC methods be passed the info they need as arguments, rather than fishing it out of "the air" themselves. That makes it very clear what inputs they expect, and makes them testable, becuase you can easily feed each little piece disembodied test data outside the normal complexity of the real app. For that to happen, you need some kind of app structure that gathers the incoming data (typically including form and url scopes, maybe others), and calls the requested method of the requested CFC. It can be very simple, or something more full-featured. HTH, Dave > Matt ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Create robust enterprise, web RIAs. Upgrade & integrate Adobe Coldfusion MX7 with Flex 2 http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:265406 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4