I am a cfwheels developer and I am coming back to coldbox again to give it another evaluation for an upcoming project. Since cfwheels is what I am familiar with I am trying to apply my knowledge to coldbox. The basic mvc is familiar and orm but where it gets fuzzy are things like filters. Keep in mind I have no experience with DI/AOP and the documentation is daunting (I have read it beginning to end multiple times and I still have no clue). Especially with no code along video to help me wrap my mind around it (just adobe connect videos which are mostly scattered with no coding along just copy and paste examples). All that said, there are alot of things about coldbox that get me excited like profilebox and contentbox cms and the enterprise support.

So to get to the meat of my question, how would I implement filters in to coldbox like cfwheels? If you’re not familiar with filters, basically they allow you to run code before or after all or specific actions in a controller. Examples:

Any help would be much appreciated.

The simplest solution would be AOP-style convention method in your handlers:

A much more powerful, but slightly more complex solution would be interceptors. This allow you to run code before or after all sorts of framework points-- not just events:

The third option is so powerful you may just blow a hole in the universe using it, but it is amazingly powerful which is AOP method interception via WireBox:



ColdBox Platform Evangelist
Ortus Solutions, Corp

ColdBox Platform:

Here is also the link to the Interceptor docs:

Thank you so much for your comments as well. We are working on a new site and new docs as we speak. So we are listening :slight_smile:

Thank you.


Luis F. Majano
Ortus Solutions, Corp

ColdBox Platform:
Linked In:
IECFUG Manager:


Thanks! Works great, alright, now I’m getting super excited –

And I’ll save the universe hole blasting for later :slight_smile: