An Architect's View

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

An Architect's View

Entries Tagged as railo

Getting Started

June 03, 2014 ·

Sometimes it's very enlightening to look back at the beginning of a project to see how things got set up and how we started down the path that led to where we are today. In this post, I'm going to talk about the first ten tickets we created at World Singles as we kicked off our green field rewrite project five years ago.

[

Tags: clojure · coldbox · coldfusion · coldspring · mongodb · railo · worldsingles

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 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- 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 - a shout out!

August 21, 2013 ·

Just a quick post to point people to which is an awesome free service provided by Russ Michaels ( / 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

On My Radar?

July 24, 2013 ·

Mark Mandel and Kai Koenig were recently inspired by the ThoughtWorks "Technology Radar" to create their own, which they featured in episode 31 of 2 Devs Down Under, their conversational podcast. Because they're both somewhere along the spectrum of CFML-to-ex-CFML developers and have worked with Flex etc, their opinions on various technologies are probably of more interest to other CFML developers than the original ThoughtWorks radar. This podcast episode is longer than usual - nearly two hours - and Mark and Kai would love to hear your responses in comments. I decided my response was a bit too long to post as a comment, so I am turning it into a blog post instead.

[

Tags: coldfusion · oss · podcast · railo

Railo 4.2, Tomcat 7, Clojure - how simple could it be?

June 01, 2013 ·

Thanks to Shantanu Kumar, if you have Leiningen installed for Clojure development, creating a skeleton web application based on Railo 4.2.0 and Tomcat 7 that blends CFML and Clojure is as simple as running these commands:

  • lein new lein-servlet railo myapp
  • cd myapp
  • lein servlet run

At this point you have a mixed CFML/Clojure web application running on port 3000 and you'll be seeing the home page in your browser!

The first time you run the application, it will take a while to download all of the libraries, but once those are cached locally, it will start up pretty quickly.

Shantanu's Leiningen plugin doesn't use cfmljure so Clojure integration into CFML is fairly low-level but as a way to get a mixed CFML/Clojure environment up and running on the latest Railo release, this really can't be beat!

If you want to see these commands in action, here's a short screencast I recorded [requires Safari - but it will play on iPhone / iPad as well as Windows and Mac with Safari!] showing the whole process end-to-end (including my inability to type 'cd' correctly!). This is a 'first run' so you see the full download of all the Railo / Tomcat libraries but it will give you a flavor of the simplicity involved.

Tags: cfmljure · coldfusion · railo

FW/1 2.0 Alpha Available

August 06, 2011 ·

I just declared the official "2.0 Alpha" of Framework One. Although there are a number of minor issues still open against this release, all the major new features are in place and ready for extensive public testing.

The main new features (in no particular order) are:

  • custom URL routes with parameter substitution are supported, along with HTTP method restrictions and wildcard routes
  • setLayout() to override layout conventions
  • view() can be called from a controller, as a way to render email or documents for PDF delivery etc
  • controller/service execution can be short-circuited, providing more control over the request lifecycle
  • populate() and autowiring now support property-based injection as well as setter-based injection
  • additional lifecycle hooks for global before() / after() and pre-rendering setupView()
  • complete rewrite of the code to use cfscript - for Adobe ColdFusion 9.0.1 and Railo 3.2.2 or later

In particular, note the last bullet - if you are on earlier CFML engines, you will have to stick with FW/1 1.2 (there will be a 1.3 maintenance release). The mix of tags and script was driving me crazy and I didn't want to add all this new functionality with the code as it is!

Tags: coldfusion · fw1 · oss · railo

D2WC, FW/1, Railo Training

July 07, 2011 ·

Back in early May I talked about presenting FW/1 at D2WC, the upcoming Designer/Developer Workflow Conference in Kansas City, MO. I was really looking forward to visiting a new city and trying out a new approach to presenting. Unfortunately, personal issues have conspired to rob me of that opportunity and I'm no longer able to make the trip. Fortunately, my esteemed colleague at Railo, Mark Drew, has agreed to take over my talk at very short notice so you can still look forward to:

  • An introductory talk about FW/1 by a stout, bald bloke with a funny account - you'll hardly know the difference!
  • Sponsorship by Railo Technologies, with a key staff member on site to answer all of you Railo questions and, hopefully, encourage you to let the Railo consulting team help solve your CFML problems!

What's new is the opportunity to take advantage of the comprehensive Railo Server Administration training course that Mark is running after the conference!

If you haven't registered for D2WC, there's still time. The conference offers an unparalleled blend of designer/developer topics focused on workflow and a host of expert speakers. I'm dead jealous of those of you attending!

Tags: coldfusion · d2wc · fw1 · railo

What do you want from Santa? Railo 3.2!

December 24, 2010 ·

Happy Holidays!

Whether you've been naughty or nice, you can read all about the new Railo 3.2 release with many community contributions and new core features!

Tags: coldfusion · oss · railo

OpenCF Summit - Speakers & Partners

November 30, 2010 ·

It's now official: I'm speaking at the OpenCF Summit in Garland, TX in February! This will be a unique event in the CF world, with its focus on open source, and it has a lot of interesting types of sessions on the schedule: Pecha Kucha, Open Spaces, Hackfests - as well as regular sessions - and several BOFs and panels!

In addition, many of the OpenCF Summit partners are listed, including Railo Consulting, O'Reilly Media, Packt Publishing, hosting companies and consulting groups.

I think it's one of the most exciting new conferences on the schedule - I hope lots of people will agree and take advantage of this event with it's low price of $199!

Tags: coldfusion · fw1 · openbd · opencfsummit · oss · railo

The demise of OpenCFML

July 22, 2010 ·

By now, many of you will have read Adam Lehman's blog post that Adobe is no longer part of the CFML Advisory Committee. Adam has disabled comments on that post and folks have been asking me all morning for my take on this so, as chair of the committee, I'm going to post my thoughts - and leave comments open so the community can provide feedback.

[

Tags: cfml-advisory · coldfusion · openbd · railo