Blog
ColdBox 4.0 and Async Loggers
![](__media/2021/blog/randomImages/coverImage_2.png)
The Asynchronous loggers in LogBox have been removed in preference to the new async property that can be used in any logger. The affected loggers are:
- AsyncDBAppender -> DBAppender
- AsyncFileAppender -> FileAppender
- AsyncRollingFileAppender -> RollingFileAppender
To Plural or not to Plural: The Models Location Changes
![](__media/2021/blog/randomImages/coverImage_11.png)
Have you ever looked at the folder structure of ColdBox and noticed that, grammatically speaking, model
was the odd man out? No longer! With ColdBox 4.0, the model folder has been renamed to models
for consistency.
To upgrade your application, there are two choices to make it compatible with this change:
CommandBox v1.0.0 Released!
![](__media/2021/blog/randomImages/coverImage_7.png)
After almost a year in development, we are so excited to finally announce the release of CommandBox 1.0.0 Final. This has been definitely one of the most challenging and fun projects we have overtaken here at Ortus. We had a vision of how we could accelerate not only development, tools and ultimately the ColdFusion (CFML) landscape by building a tool that could put us up to par with many other technologies. I am glad to say we have now a great foundation to move forward. CommandBox brings CFML to any Operating System and even embedded systems like the Raspberry and Banana Pi. It also gives ColdFusion (CFML) developers a much better workflow to work with their projects and a sense of community we lovingly call ForgeBox.
With anything we do here at Ortus, it is fully documented using our new book formats. So head on over to commandbox.ortusbooks.com to download or read the entire CommandBox documentation. In the next coming weeks we will begin our CommandBox 5 week roadshow that will include weekly blogging tutorials and video presentations, so stay tuned as each week progresses. So without further ado, I present to you project Gideon: CommandBox CLI!
Securing RESTFul endpoints with ColdBox 4
![](__media/2021/blog/randomImages/coverImage_9.png)
ColdBox has sported RESTFul capabilities since the 3.0.0 days (that's since 2011). As each release matures, our RESTFul suite of tools mature as well. In our latest release we introduced a great way to intercept when RESTFul endpoints are called with invalid HTTP methods. Every ColdBox handler has the this.allowedMethods
structure which can tell the framework what actions can be executed with what HTTP methods.
this.allowedMethods = { index = "GET", save = "PUT,POST", remove = "DELETE" }
ColdBox 4.0 Module Enhancements
![](__media/2021/blog/randomImages/coverImage_9.png)
One of the biggest things we changed about ColdBox 4.0 is making tons of the core completely modular. To support this change, we needed to enhance our modules architecture which brought some cool new features to you.
Module Inception
Every time I talk about ColdBox modules with people, I get asked if modules can contain modules, which up to now wasn't an option. But the first Module Enhancement I'd like to bring to your attention is just that. We call it Module Inception. This will allow for even greater ways for you to build and architect your applications. Modules can be nested to the Nth degree. Creating a ton of options and flexibility for you the developer in how you organize your code.
ColdBox 4.0 Error Handling
![](__media/2021/blog/randomImages/coverImage_12.png)
ColdBox has always provided nice, automatic error handling for your code. Errors in your application are caught for you, and you can respond to them via convention-based methods, event handlers, or even interception points as you see fit. (Read more on ColdBox error handling here)
If you do nothing, ColdBox will render a nicely formatted page with all the original exception information plus extra details about the ColdBox request which can be handy for debugging. Due to our focus on security-by-default in ColdBox 4, we found that a large number of people never change the default error template and their production servers give out way too much information! Even though having a 'detailed' template by default was convenient, it wasn't secure.
ColdBox Validation is Now a Module
![](__media/2021/blog/randomImages/coverImage_12.png)
The new modular approach 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 Validation Module. To install, simply fire up CommandBox.
RunEvent Caching - Accelerate your events
![](__media/2021/blog/randomImages/coverImage_3.png)
In ColdBox 4 we have expanded the runEvent()
method to allow you to add caching parameters so ColdBox can take care of caching output from events. This is a great way to accelerate the execution of widgets or viewlets within an application as it will execute them and cache them as needed. Here is the new signature for the runEvent()
method.
Pruning for Growth (Less is More)
![](__media/2021/blog/randomImages/coverImage_12.png)
ColdBox 4.0 is the most significant change in the framework since it was first introduced. Go ahead - let that soak in a bit.
Now, what do I mean by that? Lots. Too much for a single blog post to do justice without becoming tl;dr. That's just how big these changes are.
Pruning
One of the key aspects to ColdBox 4.0 is what is not actually in...