A Handful of Code
In my last post about page controllers, Jason Holden asked on which pages I use page controllers. This is a great question and speaks to a larger issue of code organization that applies to CSS and JavaScript as well.
In my last post about page controllers, Jason Holden asked on which pages I use page controllers. This is a great question and speaks to a larger issue of code organization that applies to CSS and JavaScript as well.
Just over a year ago, I started using Page Controllers. I blogged about the experience in the first weeks, but since then have let the topic slide. After a year of using them, it seems like a good time to report on my opinion with the benefit of experience.
Yesterday John Farrar presented to the Online ColdFusion Meetup Group on his forms custom tag set, COOP. Actually, he describes it as a framework to separate page markup from processing logic.
While working on a form that makes use of some simple AJAX, I discovered that using a Page Controller can make this easier - especially when combined with JSMX.
A hate to admit it, but ever since I stopped using Fusebox a few years ago, I have been without a controller. I had my view separated from my model, but no controller to be seen. In fact, I even questioned the need for a controller on most of my projects (while seeing how it could help on larger projects). I was all ready to write a "Do I need a Controller" blog entry.
And then...