An Architect's View

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

An Architect's View

Entries Tagged as coldbox

Clojure and log4j

May 20, 2011 ·

As my readers will no doubt know by now, I have a large CFML application and I'm migrating low-level parts of it to Clojure to that I can reuse those pieces from both CFML and Clojure (and Scala). I recently migrated all of the environment control logic, which automatically configures the application based on which server the code is running on top of, to Clojure so that my CFML, Clojure and Scala code could all leverage the same environment control logic. I'll probably blog about that at some point. I've also created a Clojure replacement for the CFML ORM we've been using (Reactor). Today, however, I want to talk about logging.

[Read more →]

Tags: clojure · coldbox · coldfusion

cf.Objective() 2010 - Great Pre-Conference Classes!

February 03, 2010 ·

This year's cf.Objective() is offering SIX pre-conference classes! You can choose from Building Secure CFML Applications, ColdBox: 100 Training, Developing Applications with ColdFusion 9 ORM, Getting Started with Flex / AIR Development, Mach-II / OOP from the Ground Up, Rapid Development with Model-Glue 3! Wow! Some of these are one-day courses (Wednesday April 21st) and some are two-day courses (Tuesday April 20th and Wednesday April 21st).

Tags: air · cfobjective · coldbox · coldfusion · flex · machii · modelglue · orm

ColdBox Error Handling

January 14, 2010 ·

Since I spent quite a bit of time wrestling with this over the last week, I figured this blog post may help others. First off, a caveat: I'm running the latest version of ColdBox 3.0.0 from SVN which is "almost" Beta 4 and the details of error handling have changed a little over the last few Betas (for the better). ColdBox provides a number of ways to handle different types of errors. I'll cover the following options:
  • onMissingAction
  • onInvalidEvent
  • ExceptionHandler
  • onException
  • MissingTemplateHandler

[Read more →]

Tags: coldbox · coldfusion

Quick ColdBox / i18n tip

December 21, 2009 ·

Today I needed to update a custom tag we use to display form fields in a ColdBox app to treat the labels as i18n resource keys. Normally in a view you can just call getResource(key) and get back the translated value based on the current locale. Simple. Part of what makes ColdBox great for international apps! However, you can't call getResource() inside a custom tag called from a view. You might think you can just do caller.getResource(key) but that fails with an exception that the variable controller is not defined. That's because your views run in the context of a CFC and the custom tag has its own context. I initially came up with a slightly complicated way to pass things to the custom tag but I ended up having to make getResource() public in ColdBox's FrameworkSuperType.cfc. Not ideal. It worked but it was clearly a hack. I complained to Luis about how hard this seemed to be and he sent me the following code snippet to use in a custom tag:
<cfset variables.controller = caller.controller />
...
... caller.getResource(key) ...
Remember that you're in the context of a CFC in your view? Well, getResource() is in the variables scope and it, in turn, references controller - which is in the variables scope of the view... or rather the context that the view is executed in. So by setting variables.controller in the custom tag, the call to caller.getResource() finds it and runs properly. It's still a bit of a hack in my opinion but it's slightly more elegant than what I was trying to do so thank you Luis. I'm posting it here so a) I can find it again in future and b) others may benefit from this.

Tags: coldbox · coldfusion

Testing a ColdBox Controller that Redirects

August 08, 2009 ·

I'm working on a ColdBox project right now for a client and, as some may have gathered from my occasional tweets, I've set up Hudson as a Continuous Integration server that pulls the latest code from git, restarts the test server instance, reloads the test database and automatically runs the MXUnit-based test suite, whenever someone commits files to the main git repository. We have unit tests for individual components and we have integration tests for the ColdBox event handlers. Luis has provided pretty good documentation for writing such tests but one of the challenges I faced in getting some of the integration tests working was that they redirected to a new event!

[Read more →]

Tags: coldbox · coldfusion · tdd

ColdBox training at CFUnited

June 18, 2009 ·

Luis Majano just announced ColdBox training the day before CFUnited. If you're going to CFUnited this year and you're interested in learning more about ColdBox from the creator of the framework, I can highly recommend this intense, one-day pre-conference training class! I was privileged to sit in on parts of this course before cf.Objective() this year and was very impressed at the amount of material covered, the quality (and thickness!) of the handouts and the hands-on approach that Luis takes.

Tags: cfunited09 · coldbox · coldfusion

Review of cf.Objective() 2009

May 19, 2009 ·

I've almost recovered from this year's cf.Objective() so I wanted to get my thoughts on paper before the memory blurs too much. As usual, it was an excellent conference with top-quality sessions from top-quality speakers. It's the only conference that I would pay to attend - and would pay out of my own pocket if I had to. I learn plenty of new things at cf.Objective() every year and the networking is phenomenal because it's a relatively small, friendly conference (around 200 attendees this year).

[Read more →]

Tags: cfml-advisory · cfobjective · coldbox · coldfusion

My cf.Objective() 2009 Schedule

May 11, 2009 ·

In the absence of a printable schedule - sorry, Joe Rinehart says it's a problem with the Media3 hosting and he's been trying to get them to fix it for months! - here is my schedule for cf.Objective() 2009:

[Read more →]

Tags: adobe · air · architecture · cfobjective · coldbox · coldfusion · coldspring · flex · iphone · j2ee · jquery · machii · orm · oss · ria · saas · swiz · tdd

cf.Objective() 2009 - Adobe session descriptions

April 24, 2009 ·

Adobe has provided four of their five topic descriptions. You can see them on the cf.Objective() sessions page. They're covering Advanced ColdFusion 9 Server Administration, Advanced ORM in ColdFusion 9, Extending Adobe Bolt with CFML and ColdFusion 9 as a Service. These topics have been added to the schedule - and the online scheduler (yes, we know the Printable Summary doesn't work - Joe is having an issue with his hosting company and hopes to get this fixed soon). Another Adobe topic - covering Flex - is on the schedule but we do not yet have the title or description. cf.Objective() 2009 is offering last year's price of just $629 for three days of all-new material - no repeats this year! - so it represents incredible value. Also, don't forget that there is a one-day ColdBox training course on the Wednesday before the conference!

Tags: adobe · cfobjective · coldbox · coldfusion · flex

Scotch on the Road topic change

April 22, 2009 ·

Since Mark Drew was also covering cloud computing in London, we've decided to offer a version of my framework comparison talk instead. I'm looking forward to that first week of June despite the crazy travel schedule (I arrive Sunday afternoon and fly back the following Saturday, hopping from Edinburgh to Heathrow on a horribly early flight).

Tags: coldbox · coldfusion · machii · modelglue · scotch09