The Future of Controllers: Setting the Scene
While the vast majority of ColdFusion applications are consumed by traditional HTML clients, more and more projects need the ability for the model to be shared between some combination of HTML, AJAX, Flex and web service requests. For me, the ideal controller would be designed to support all of these approaches out of the box.
While Mach-II and Model-Glue can definitely be used to provide such solutions (and are being used in this way on a regular basis), I think that it is worth stepping back and looking at the “ideal multi-modal controller” to confirm that the approaches that have helped MG and M2 to be successful are still the best way to go.
At the same time, new approaches like continuation servers and spring web flow are showing up the weaknesses of a stateless event based controller for managing complex wizards (sophisticated checkouts, multi-page wizards with branching logic and the like). A state-machine metaphor is actually much more convenient for solving this class of problems.
Given these changes, I think the time is right for a public re-evaluation of best practices in controllers. I am not saying that the review will do anything other than make it clear just how well suited M2 and MG are for developing robust applications quickly and cost effectively, but I think it is worth a little time to go back to first principles and see if any alternate patterns emerge as worthy of consideration for any classes of use cases.
I have some paying work to do tonight, so this will be a pretty brief series, but please jump in with your use cases and experiences. Lets see if there is anything we can all learn from this review – even if it is just how smart we all already are by using the two M’s! :->

