ColdBox Blog

Coldbox Legacy App Demo

Brad Wood   |   January 18, 2016


There are a lot of people out there in the CFML world managing legacy codebases.  Some of them use frameworks that are no longer maintained, and many  use no framework at all.  A common question that I get is whether an app can be slowly converted over to  ColdBox without having to rewrite everything at once.  The answer is YES!  ColdBox will comfortably live alongside your legacy code, giving you the chance to slowly convert it over as you get the chance.  


Submit Your First Pull Request to an Open Source Project

Brad Wood   |   September 23, 2015


Update 10/10/2015 -- New tickets added!

Perhaps you're using open source projects with your work.  You've heard about how Git works, and maybe you even attended one of my sessions on how to submit pull requests. You've never actually tried to do one before though.  You were brave one day and clicked the "Fork" button in GitHub but were left staring at your keyboard wondering what the heck you could do to help out a project that wouldn't sink your entire weekend.

The Wait is Over

Ladies and gentlemen, boys and girls of all ages: your time has come.  Today we're breaking down all the walls keeping from being a productive member in the open source community.  Everything you need is documented and laid out in front of you.  Heck, for this to be any easier, I'd just have to do it for you!  If you've been waiting for just the right chance to come along to submit your first pull request, please keep reading. 

Today we are announcing a special program where we've created a handful of super-duper easy tickets for an assortment of Box products.  These are already entered into our ticket tracker and approved.  All we need is someone to complete them!  You don't even need to know how our products work to help out.  Each ticket spells out what amounts to a one-line change to get your feet wet and experience the process of submitting something that will release to the world in the next version of our product.  We'll even make sure to include your names in the release notes :)

You. Yes, you!

There's a little bit of a catch.  These special tickets are ONLY for people who have never submitted a pull request via GitHub before.  You know who you are.  If you've contributed before, we thank you so much but please step aside so someone who's never been a part of this process can give it a spin.  Please only take one of these tickets too.  If you really love this and want to help more in the future, don't worry-- we'll have lots of other opportunities to put your newly learned Git skillz to good use.  

What You Need to Do

Ok, we've made this super easy.  The tickets already exist in JIRA, but I would recommend creating a quick JIRA account so you can assign yourself to the ticket.  That way, we won't have two people trying to work on the same thing at once.  Here is our guide that covers signing up for a free JIRA account.

How To Create A JIRA Account And Enter ColdBox Tickets

Next, choose one of these simple tickets and assign it to yourself:

Next, follow the step-by-step guide here that will walk you through getting a copy of the code, making the change, and submitting that change back to us.

How To Submit Pull Requests to the ColdBox Platform

If you get stuck or have questions, no worries!  Just jump on the CFML Slack team and give a shout out in the #box-products channel.  Or you can shoot an E-mail off to our Google Group.

Thank You

You did it!  Today you have become part of something bigger than yourself.  You contributed to an open source project and it really wasn't that bad.  A new world of opportunity and collaboration has just opened up to you. Go ahead and kick back while you revel in your new found meaning.  In fact, take the rest of the day off-- I've already cleared it with your boss.

If you happen across this post and the 4 tickets above have already been gobbled up, please give a holler.  I will gladly create more easy-grab changes for first timers to try out.  This is important to CFML and at Ortus we understand that as much as anyone does.  We want CFML to succeed, and for that the CFML community needs to be engaged.  

Sign Up for Box Training before ColdFusion Summit

Brad Wood   |   September 17, 2015


The Box guys from Ortus are going to be hanging out (and speaking) at Adobe's 2015 installment of ColdFusion Summit.  We're so stoked about hanging out in Vegas that we've decided to show up early and put on a deep dive Box training before CF Summit that focuses on the ColdBox MVC Platform and our new CommandBox CLI, Package Manager, REPL, and Embedded Server.  
We've reserved a sweet pad at the close-by Vdara hotel for two days of deep training in the way of the Box.  Luis and I will be leading the classes where you'll be able to get one-on-one help, ask questions, and do hands-on exercises.  This is a great chance for any team who's been pondering jumping into ColdBox or CommandBox but don't know where to start. Or come to learn more and make sure you're getting the best out of your code.  
Registration is discounted 20% for CF Summit attendees, so sign yourself up, sign your employees up, or just bring the whole team.  To keep class sizes small, we have limited space so reserve your seats today and we'll see you in Vegas!

How To Submit Pull Requests to the ColdBox Platform

Brad Wood   |   August 28, 2015


The best part about open source projects is you! Many hands make light work and at Ortus we love getting input from the many smart community members out there.  The first way you can help is to report bugs or enhancements in our ticket tracking system.  You can read our guide for that here:

The second thing you can do is to actually submit fixes yourself!  This may seem scary, but it's a pretty straight forward process once you've done it once.  We can never have too many people willing to help. Let's jump in and cover the steps it takes to submit some code to the ColdBox Platform.


ColdBox Connection 4/23 Noon Central on JS and CSS Workflows

Brad Wood   |   April 22, 2015


We're having another ColdBox Connection Thursday the 23rd at noon central time where special guest Jon Clausen will share how to work with static assets like CSS and JavaScript.  Things he'll cover:

  • Workflows and Dependency Management for CSS and Javascript with Bower
  • Optimizing production CSS and Javascript using NPM and Grunt
  • Be the boss of your CSS with SASS  (Depending on the level of experience with this on the call, I can be brief or go a little further in depth)

And if we have enough time, we'll try to touch on these topics as well.

  • Migrating from Apache: Running blazing fast Coldbox Apps with NGINX/Lucee
  • Automating Coldbox and CFML deployment (and rollback) on ACF and Railo with Capistrano

The show will be in our regular Adobe Connect room.  See you then!

The recording will also be posted here:

Bypassing ColdBox's Error Handling

Brad Wood   |   April 10, 2015


Error handling is one of those important things that many developers neglect.  Your code never errors once you're done testing it, right :) ColdFusion's detailed error messages were always a draw to the platform, but have become a bit of an embarrassment when surfing across a site that's sporting the default, ugly error page because the developers didn't bother to even implement a global error handler. 

When you use ColdBox, errors in your code are handled automatically by the platform.  There are very few features of ColdBox that kick in by default but this is one of them and we feel it's for very good reason.  ColdBox's debugging screen is not only prettier, but it displays a plethora of additional information to help you troubleshoot.  In ColdBox 4, we took it a step further by making ColdBox's default error template secure-by-default.  This means if you install ColdBox, don't change a single setting, and push it to production, errors on your site won't be advertised in juicy detail to the first hax0r that surfs across.

ColdBox's error handling is also incredibly powerful.   There's no need to litter your code with try/catches to ensure all errors are handled.  The framework will capture any error and gives you several ways of handling that error, whether it's the onError() convention in your handler, the exception handler event, or an interceptor.  Take your pick.  You can read about all these options here.

Perhaps surprisingly, this blog isn't about any of those options.  I wrote this up to describe how to completely BYPASS ColdBox's exception handling.  I've only heard one person ever want to do this, but they suggested that perhaps others had wondered the same thing and simply not voiced the question.  Honestly, I'm not sure why you'd want to bypass a perfectly good, extensible error handling subsystem to write another one from scratch, or just leave your site unsecured, but I suppose it's possible you just really like the colors of the default error template.

To cause your exceptions to bubble up out of the framework, simply put this bit of code in your /config/ColdBox.cfc somewhere outside of the configure() method.

function onException() {
  throw( object=interceptData.exception);

Yep, it's really that simple.  The magic that lets this work is the fact that your ColdBox configuration file itself gets registered as an interceptor.  This means you can create interceptor methods right there in your config file and they'll get registered.  In this case, we're listening to the onException interception point, then simply re-throwing the exception object.  This will promote the exception up to your Application.cfc's onError() method, or if that isn't defined, the global error template defined in your CF Administrator.


Attention: MessageBox is Now a Module

Scott Coldwell   |   February 27, 2015


The beloved MessageBox plugin has been a staple of the ColdBox platform since the beginning. With ColdBox 4.0 it's still available, but if you don't need it, you have the freedom to leave it out.

The new modular approach (and deprecation of plugins) of ColdBox 4.0 means much of its built-in functionality has been moved to separate, installable modules. One of the many new modules introduced with ColdBox 4.0 is the MessageBox Module. To install, simply fire up CommandBox:

box install cbmessagebox


For the plugin, you might have had code like this:

getPlugin("MessageBox").info( "Hello" );

With the module, your syntax changes slightly to:

getInstance("messagebox@cbmessagebox").info( "Hello" );

or, leveraging WireBox:

property name="messagebox" inject="messagebox@cbmessagebox";

... "Hello" );


Happy messaging!

ColdBox 4.0 Removed Plugins

Brad Wood   |   February 26, 2015


ColdBox Plugins have graduated to become just models. The plugins convention has been removed and all references to plugin injection or DSL's are gone. You must now place all your plugins in your models directory and request them via getInstance() or getModel() calls.

Plugins are an old ColdBox convention but their baggage doesn't really serve a purpose now that we have modules for easy packaging of libraries and WireBox for easy creation of CFCs. Neither of those existed back when Plugins were birthed. It's time to say goodbye to the concept of plugins, but all their functionality will still be here, just with a slightly different (and more standardized) way of creating them.


The UDFLibraryFile setting is now "applicationHelper"

Scott Coldwell   |   February 25, 2015


If you have a ColdBox config setting UDFLibraryFile, then you'll want to change it when upgrading to ColdBox 4.0. It functions the same, but is now called applicationHelper.

applicationHelper is an optional setting where you can declare the path to a UDF template to load for usage in the views, layouts and event handlers. You can use relative paths to your application's root or ColdFusion mappings.

For example if I have my udf template called udf.cfm in my includes directory I would use:

component hint="ColdBox Configuration" {

	function configure(){
		coldbox.applicationHelper = "includes/udf.cfm";

Or if I have them in a mapping called myudfs, then I would use:

applicationHelper = "/myudfs/udf.cfm";

You can also use an array to declare multiple paths:

applicationHelper = ["includes/udf.cfm", "/myudfs/udf.cfm"];


See what else is new in ColdBox 4.0!

Module Bundles in ColdBox 4

Luis Majano   |   February 24, 2015


With the advent of so much more functionality in modules, in ColdBox 4 we added the ability to group modules in a single directory we lovingly call The Module Bundle.  This feature became a reality due to a real client's need of being able to logically separate modules into logical buckets.  His application had an extensive amount of modules and he wanted to further segregate them, thus module bundles became a reality.  



Module bundles does not add extra functionality or features to the framework, but it is a mere logical boundary between modules.  It will allow you to create a folder with the convention {name}-bundle, notice the bundle suffix.  Then you can drop any amount of modules and sub-modules within it.  You can even drop in module bundles inside of it as well.


  * cbstorages
  * cborm
  * cbsecurity


In ColdBox 4.X we will introduce the ability to package these bundles via CommandBox and even deliver them as a coldbox.bundle archive, which ColdBox will know how to unpack and install.

ColdBox Book