Blog

Luis Majano

June 28, 2018

Spread the word


Share your thoughts

Ohh happy day! ColdBox 5.1.0 is now available. Using CommandBox just issue a simple update coldbox and you are done! This release is fully documented and you can find the what's new guide here: https://coldbox.ortusbooks.com/intro/introduction/whats-new-with-5.1.0. Below you will find the major areas of improvement for this release and you can visit the link for the full release notes.

Event Caching Improvements

The event caching cleanup and clearing methods did not work when using granular query strings. This has now been resolved and optimized.

New Auto-Deserialization of JSON Payloads

If you are working with any modern JavaScript framework, this feature is for you. ColdBox on any incoming request will inspect the HTTP Body content and if the payload is JSON, it will deserialize it for you and if it is a structure/JS object, it will append itself to the request collection for you. So if we have the following incoming payload:

{
    "name" : "Jon Clausen",
    "type" : "awesomeness",
    "data" : [ 1,2,3 ]
}

The request collection will have 3 keys for name, type and data according to their native CFML type.

Flash Scope getAll()

The flash scope needed a way to get all of its name-value pair elements in one shot, you can now with the getAll() method.

Complete Rewrite of the HTML Helper

The HTML helper has been completely rewritten in 5.1 into script notation, optimized for performance and security. All HTML output is now XSS encoded for attributes and tag content.

View and Directory Helper Combo

You can now declare a view and directory helper and ColdBox will use them both instead of always picking the view helper only. The order of inclusion is:

  • directory helper
  • view helper
  • view

ColdBox Fail Fast

This is a nice feature that will give your applications stability when doing deployments or production reinits. We have added a new application variable flag: application.fwReinit which is set to true when the framework is reinitializing and false when it completes. We have also added a new directive called COLDBOX_FAIL_FAST which defaults to true.

If fail fast is activated, the framework will present a nice message to users that the application is not yet available instead of holding them in a queue waiting for the reinit or application load to finish. This fail fast will release your traffic queue and produce less timeouts and failures.

The fail fast directive can also be a closure. Then we will execute your closure and you can do whatever you like within it to advice your users' about the reinit. Below you can see what happens with the fail fast code.

// Global flag to denote if we are in mid reinit or not.
cfparam( name="application.fwReinit", default =false );

// Fail fast so users coming in during a reinit just get a please try again message.
if( application.fwReinit ){

    // Closure or UDF
    if( isClosure( variables.COLDBOX_FAIL_FAST ) || isCustomFunction( variables.COLDBOX_FAIL_FAST ) ){
        variables.COLDBOX_FAIL_FAST();
    } 
    // Core Fail Fast Option
    else if( isBoolean( variables.COLDBOX_FAIL_FAST ) && variables.COLDBOX_FAIL_FAST ){
        writeOutput( 'Oops! Seems ColdBox is still not ready to serve requests, please try again.' );
        // You don't have to return a 500, I just did this so JMeter would report it differently than a 200 
        cfheader( statusCode="503", statustext="ColdBox Not Available Yet!" );
    }

    return false;
}

Release Notes

Bugs

  • [COLDBOX-679] - viewmodule parameter not used in system.web.renderer.renderLayout
  • [COLDBOX-680] - When using Resources the POST incorrectly sets action to UPDATE instead of CREATE
  • [COLDBOX-681] - AbstractFlashScope fails on autoPurge property check
  • [COLDBOX-683] - Event Caching Should Include Response Headers
  • [COLDBOX-686] - coldbox create app template doesn't work with a servlet context other than /
  • [COLDBOX-687] - Event caching broken due to not evaluating renderdata as a valid struct thanks to the EC OIL Team (Christian,Sebastian,Didier)

New Features

  • [COLDBOX-682] - Add auto-deserialization of inbound JSON payloads into the RC on request capture
  • [COLDBOX-689] - New flash method: getAll() which retrieves a struct of all flash keys and their content
  • [COLDBOX-693] - Complete rewrite of HTML Helper to Script
  • [COLDBOX-694] - HTML Helper XSS Encodes all output from content to attributes by default

Improvements

  • [COLDBOX-343] - Allow view helper AND directory helper at the same time.
  • [COLDBOX-592] - Have ColdBox bootstrap advertize when Coldbox is reinitting, and have a fail fast routine
  • [COLDBOX-678] - Default Flash Ram to client if session scope is disabled
  • [COLDBOX-685] - Event Cache Key and Storage Enhancements to allow for granular querystring evictions
  • [COLDBOX-690] - Add support for cgi.https to isSSL()
  • [COLDBOX-691] - Ignore AllowedMethods when using runEvent on non-default method calls

Add Your Comment

Recent Entries

Ortus June 2024 Newsletter!

Ortus June 2024 Newsletter!

Welcome to the latest edition of the Ortus Newsletter! This month, we're excited to bring you highlights from our sessions at CFCamp and Open South Code, as well as a sneak peek into our upcoming events. Discover the latest developments in BoxLang, our dynamic new JVM language, and catch up on all the insightful presentations by our expert team. Let's dive in!

Maria Jose Herrera
Maria Jose Herrera
June 28, 2024
BoxLang June 2024 Newsletter!

BoxLang June 2024 Newsletter!

We're thrilled to bring you the latest updates and exciting developments from the world of BoxLang. This month, we're diving into the newest beta release, introducing a new podcast series, showcasing innovative integrations, and sharing insights from recent events. Whether you're a seasoned developer or just getting started, there's something here for everyone to explore and enjoy.

Maria Jose Herrera
Maria Jose Herrera
June 28, 2024
BoxLang 1.0.0 Beta 3 Launched

BoxLang 1.0.0 Beta 3 Launched

We are thrilled to announce the release of BoxLang 1.0.0-Beta 3! This latest beta version is packed with exciting new features and essential bug fixes, including robust encryption functionality, enhanced Java interoperability, and more efficient event handling. Key highlights include the introduction of query caching capabilities, seamless coercion of Java Single Abstract Method (SAM) interfaces from BoxLang functions, and support for virtual thread executors. So, let’s dive into the details of what’s new in BoxLang 1.0.0-Beta 3 and how you can start leveraging these updates today!

Luis Majano
Luis Majano
June 28, 2024