I recently watched the getting started with ASP.NET 2.0 video training at www.asp.net at took a liking to the Code Behind approach. I later read an article by Chaz Chumley at Community MX (http://www.communitymx.com/abstract.cfm?cid=42E98) entitled, "ColdFusion Code-Behind: Mimicking .NET's Page Directive."
What I am wondering is what some of those who are experienced with ColdFusion and OOP think about using the code-behind technique for the controller layer in an MVC application? The principle behind the code-behind technique is simple. First you invoke a component (with the same name as the template and in the same directory) from the template, similar to the .Net page directive. Then you perform all of your form validation and such in methods of the component. Personally, I like the idea of having two files with the same name but with different extentions (cfm and cfc) in the same folder. Stylistically, I am bothered by form.cfm and form2.cfm, form2.cfm being the controller for form.cfm. However, since the controller often needs to instantiate objects in persistent scopes, this would have to be done with a component which does not conform to best practices (but neither does outputting from a method, but I guess there are exceptions). What do you think? ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting, up-to-date ColdFusion information by your peers, delivered to your door four times a year. http://www.fusionauthority.com/quarterly Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:262149 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

