OO Principles: Separation of Concerns
I don't "do OO" development in ColdFusion. I'm starting with that statement not to spark another debate about whether to use OO in ColdFusion, but rather to clarify that while this post is about a principle of object oriented development, you don't need to "Do OO" in order to learn, use, and benefit from separation of concerns.
In order for separation of concerns to work, your code really needs to be well encapsulated first.
What
Separation of concerns dictates that different modules of code overlap in functionality as little as possible. For me, this means that I have .cfm templates for output and .cfc components for logic and data retrieval.
Yeah, it did end up being a bit of an MVC pattern (not entirely by coincidence).
I have actually been using my own framework for a while. Once it is ready for prime time, I may blog a bit about it as well.