An Architect's View

CFML, Clojure, Software Design, Frameworks and more...

An Architect's View

Entries Tagged as coldfusion

FW/1 2.5 Release Candidate 0

January 11, 2014 ·

You can download it from the FW/1 Releases page on Github.

I want to get this out there for folks to experiment with since it contains a fundamental change (regarding services).

FW/1 2.5 is a "release candidate" insofar as it is feature complete, but it is not yet documented, and the changes to the examples are not yet complete.

#151 Tracing changes:

[Read more →]

Tags: coldbox · coldfusion · fw1

cf.Objective() 2014 - now you can spread the love!

January 07, 2014 ·

Promotional badges:

If you're a ColdBox fan, don't forget Into The Box the day before cf.Objective()!

Tags: cfobjective · coldbox · coldfusion

TestBox - replacing MXUnit and providing BDD

December 23, 2013 ·

If you've seen my tweets over the last couple of days, you'll know that I've been taking a look at TestBox, the new testing framework from the ColdBox team.

You might be thinking "Do we really need a new testing framework?" and it's a reasonable question. CFML has had a number of testing frameworks over the years but mostly we've seen each one come and go as maintainers have moved onto other things: cfUnit, then cfcUnit, then a brief resurrection of cfUnit, then MXUnit. Does anyone remember cfSpec? I liked that a lot - I like the Behavior-Driven Development style of writing tests. That's why, at World Singles, we use the Expectations library for almost all of our Clojure-based tests.

So why the interest in TestBox? My initial interest was spurred by the inclusion of the BDD style of tests which I find both more natural to read and a better fit for expressing requirements for software that is yet to be written. Then I read that TestBox has MXUnit compatibility which intrigued me - we have been using MXUnit for several years at World Singles and I don't relish having to rewrite all those tests. If TestBox could allow us to run our existing "xUnit" tests as-is while we write new tests in the BDD style, I'd be very happy.

Adam Cameron has been blogging about Test-Driven Development recently and has also picked up on TestBox. He just blogged about trying TestBox on his extensive MXUnit test suite and you can see he ran into a number of issues, all of which he has reported, and which I expect we'll see fixes for. My experience was more fruitful than his - as I mentioned in my comment on his blog post: just two small changes got the whole of our suite running flawlessly!

My next challenge was integrating TestBox into our automated build / test script, which uses Ant. TestBox provides a runner-template that shows how to do basic Ant integration. I followed that recipe but discovered there was no way for Ant to see that any tests failed and so I couldn't "fail the build" if TestBox found errors or failures. After studying the source code briefly, I realized I could extend the TestBox CFC and provide a way for the runner CFM template to access the details of the TestResult object, and write a property file that Ant could read and fail if a certain property was set. Time to fork the ColdBox Platform Github repo and send a Pull Request to add build failing functionality which Luis merged in within a few hours! Nice!

With that in place, I was able to delete MXUnit from the World Singles repo and rely entirely on TestBox for all our testing needs!

Whether you prefer the "xUnit" style of tests, with assertions, or the "BDD" style with expectations, TestBox can support you, and even if you have a lot invested in MXUnit, migration to TestBox should be straightforward (especially once they address the issues Adam has raised). I think we can be sure of ongoing support and maintenance - based on the well-established track record of the ColdBox Team. I think TestBox is a safe bet. Now you just need to start actually doing some automated testing :)

Tags: bdd · coldbox · coldfusion · tdd · worldsingles

FW/1 2.2 Released!

December 18, 2013 ·

Framework One version 2.2 is now available for production use! You can download it from the Framework One page on RIAForge. This includes one bug fix over RC2 (interaction between renderData() and trace output).

The main focus of the 2.2 release is improved support for REST APIs, through the addition of renderData() to simplify returning JSON, XML and plain text results to the caller, as well as more sophisticated route handling via "resource packs" which let you define a family of related routes for a given resource type, using a shorthand notation. For more information, see this blog post about the latest FW/1 release and the roadmap.

As noted previously, the master branch is the current stable release (2.2), and the develop branch has become the next release (2.5). 2.5 will be released next month and will be a stepping stone toward some substantial changes coming in 3.0. For more detail, read this blog post explaining the changes coming in 2.5 and 3.0.

Tags: coldfusion · fw1

FW/1 2.2 Release Candidate 2

December 02, 2013 ·

Framework One version 2.2 release candidate 2 is now available for testing (download from the Framework One page on RIAForge). This includes a couple of bug fixes, compared to release candidate 1. See the FW/1 2.2 RC2 release notes on Github for more details. Unless any showstopping bugs are found this week, the final 2.2 release will be made early next week, merged to master, and then develop will become the 2.5 branch.

See FW/1 Releases and Roadmap and FW/1 - The Year Ahead for more information about the upcoming 2.2, 2.5 and 3.0 releases, as well as plans for DI/1.

Tags: coldfusion · di1 · fw1

FW/1: The Year Ahead

November 02, 2013 ·

With FW/1 Version 2.2 just around the corner - after a long time in incubation - and FW/1 itself being almost four and a half years old, it's a good time to look ahead at what's in store.

[Read more →]

Tags: coldfusion · di1 · fw1

FW/1 Releases and Roadmap

November 02, 2013 ·

FW/1 Version 2.2 Release Candidate 1 and a maintenance release for FW/1 1.3 (Compatibility Branch). For detailed changes, and more about the roadmap, read on...

[Read more →]

Tags: coldfusion · fw1

Upgrading Railo 3 to Railo 4

October 23, 2013 ·

At World Singles, we're just going thru the process of upgrading from Railo 3 to Railo 4 (specifically from 3.3.4 to 4.1.1) and I thought I'd jot down a quick blog post about it. First off, I should explain that we use the WAR install on a vanilla Tomcat install, and mod_proxy_ajp to connect Apache to Tomcat. See my Railo for Dummies blog post from 2009 about setting up that sort of environment for background. We have three web contexts (web applications), each running their own configured WAR install of Railo, so we can package each web application up easily and move it around, including the Railo runtime. We can also upgrade each web application separately.

We'd already upgraded from Java 6 to Java 7 (download and unpack the JDK from Oracle into a new folder, update the symlink for the default java executable), and from Tomcat 6 to Tomcat 7 (download and unpack the Tomcat archive from Apache into a new folder, update the symlink for the current version, copy setenv.sh and context.xml from the old to the new - we'd customized those - and then add <Host..> entries to server.xml as necessary). Piece of cake so far.***

I expected the Railo upgrade to be more work than Tomcat. I was wrong. A pleasant surprise! I downloaded the new Railo 4.1.1 WAR file and unpacked it into a temporary folder (using jar xf /path/to/railo-4.1.1.009.war). Then I copied the WEB-INF folder over my existing Railo installations:

tar cf - WEB-INF | ( cd /path/to/application/webroot; tar xf - )

That's just my go to method for non-destructively copying a whole directory tree on top of an existing set of files. The only file that needed customization was web.xml in one web application context where we had some SES URL patterns that matched subfolders. That was just a matter of adding three <url-pattern> lines to the <servlet-mapping> section for the CFMLServlet. That's all it took: download, unpack, copy (and a small edit). Started up Tomcat and Railo happily deployed itself into each web application context, without overwriting any of my previous Railo 3.3.4 settings in the three admins. Nice!

Any code changes? Yes, just two: ColdBox has a MessageBox plugin that uses isEmpty() which is now a built-in function - changing the two unqualified calls to this.isEmpty() solved that - and a couple of strange places where I'd accidentally used float and int as function return types in cfscript - this worked in Railo 3 as if I'd written numeric but in Railo 4 it was type checked as a Java primitive type (interesting in itself!) so I just changed those to numeric and everything else just worked!

***Piece of cake except for Braintree which is one of our payment providers. We were using an older version of their library and once we moved to Java 7, the security certificate processing was more strict and calls to their sandbox (not their production system) failed. Updating to the latest Braintree JAR on Maven Central fixed that.

Tags: coldbox · coldfusion · railo

cf.Objective() 2014 - call for speakers!

October 21, 2013 ·

The cf.Objective() 2014 Call for Speakers is open until November 1st so you have just under two weeks to submit your topics. You can also vote for existing topic submission at that same link.

Right now we've only had two general CFML topics submitted (and seven ColdBox-related ones!) but there's a good number of JavaScript-related submissions - and remember that cf.Objective() has a dedicated JavaScript track in js.Objective(), as well as a mobile/front-end track so it's more than a CFML conference... but we still want to see a good spread of CFML topics!

And if you want to submit non-CFML web development topics that you think would appeal to a CFML / JS audience in terms of broadening their skills, you should do that too! Last year Scott Stroz did an excellent talk about Groovy on Grails, and I touched on some advanced CFML techniques inspired by other languages in my polyglot talk.

Note: when you submit a talk, please make sure to follow the guidelines outlined in this blog post about cf.Objective() 2014 submission format!

Tags: cfobjective · clojure · coldbox · coldfusion · grails · groovy · javascript · programming

cflive.net - a shout out!

August 21, 2013 ·

Just a quick post to point people to cflive.net which is an awesome free service provided by Russ Michaels (CFMLDeveloper.com / Blue Thunder Hosting) that allows you to quickly try out snippets of CFML code in a browser, and even run them in ColdFusion and Railo side-by-side!

In the past you would always have to have some "scratch" file lying around in one of your local websites to test out snippets and then you'd have to copy it to another location to test on another CFML engine - if you even had the other one installed! Russ's site allows you to simply type the code into a form, check some boxes for debug output and which engine(s) to run it on, and submit - done!

This also has the great benefit of allowing new folks to try out CFML without needing to install anything - an approach which has been used very successfully by a number of other languages to let you play with code without commitment!

Kudos to Russ for building this on his own time and offering it to everyone for free!

Tags: coldfusion · railo