I have been using Coldbox for a project for a few months now and like the framework. I won't get into all the features, since you can find out for yourself over at http://www.coldbox.org but one of the things that you realise once your project grows is that your handlers directory starts getting rather full of handler CFC's.
It took me a little while to see how I could package them up a little better but then I spotted a small bit of the docs that tells you how to do it, so for example, if you were calling your handler as:
http://localhost/index.cfm?event=account.create
And you have moved your account handler to a /user folder you can now call it as a package:
http://localhost/index.cfm?event=user.account.create
Of course, this isn't ideal, so you can now add a route for it in your routes.cfm file (if you have routes turned of of course):
addRoute(pattern="account/create",
handler="user.register",
action="new");
And now you can have a nice SES friendly url such as:
http://localhost/account/create
Hope that helps people looking for how to do this!








3 responses so far ↓
1 Glyn // Apr 16, 2010 at 1:00 PM
O course now with ColdBox M5 you can package your application into modules. makes working with different parts of your system real easy. Needs a bit more planning tho.
2 Mark Drew // Apr 16, 2010 at 1:03 PM
There are some issues with the documentation (so much of it!) that it either needs more examples or something, I find myself looking for things for a long while in the docs.
But apart from that I am liking the framework.
3 Glyn // Apr 16, 2010 at 1:28 PM
been playing with M4 release now for a while, a few bugs, but most have been sorted over the last set of updates.
Leave a Comment