June 01, 2013 · By Sean Corfield · 4 Comments
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
May 19, 2013 · By Sean Corfield · 5 Comments
It's Sunday afternoon after the best cf.Objective() ever and I'm looking over my notes to offer some thoughts on the last three days.
[Read more →]
Tags:
cfobjective · coldfusion · javascript · mongodb
May 18, 2013 · By Sean Corfield · No Comments
The slides and code for my third presentation at cf.Objective() 2013 are now online:
Tags:
coldfusion · mongodb
May 16, 2013 · By Sean Corfield · No Comments
The slides and code for my second presentation at cf.Objective() 2013 are now online:
Updated with the correct PDF link - sorry about that!
Tags:
coldfusion · mongodb · orm
May 16, 2013 · By Sean Corfield · No Comments
The slides and code for my first presentation at cf.Objective() 2013 are now online - Polyglot Lessons to Improve Your CFML:
The other presentations will be posted after I've given them and the code will appear in that Github repository.
Tags:
clojure · coldfusion · groovy · javascript · programming · scala
May 14, 2013 · By Sean Corfield · 2 Comments
A while back I blogged about how we instrumented our Clojure code to show up in New Relic traces and we also did some stuff in CFML to get better data out of New Relic. Just now Joe Swenson asked on Twitter how to get CFML page names to show up in New Relic so I figured I'd blog a quick note about that.
You should already be starting up your servlet container with the -javaagent: option if you're using New Relic for monitoring your web app (and indeed New Relic has documentation about adding the Java agent to ColdFusion). That means you'll have the New Relic JAR on your classpath and so you can instantiate the New Relic agent API class in your CFML code. We do this at application startup:
application.NewRelic = createObject( "java", "com.newrelic.api.agent.NewRelic" );
Then at the start of each request, we do something like this:
if ( structKeyExists( application, "NewRelic" ) ) {
application.NewRelic.setTransactionName( "CFML", CGI.SCRIPT_NAME );
}
The first argument is a 'category' name and is currently ignored by the New Relic API (and you can pass null if you want). The second argument is how you want this web transaction reported in the New Relic traces. We actually just use a fake path to represent groups of requests since we have a lot of internal instrumentation (in Clojure) and that gives us better data about where time is being spent in the code.
Tags:
coldfusion
May 13, 2013 · By Sean Corfield · No Comments
A month ago I posted that java.jdbc 0.3.0 alpha 1 was available for testing and since then I've made a few more alpha releases as the API and code settles down so I figured it was time to blog about the recent changes.
[Read more →]
Tags:
clojure
May 12, 2013 · By Sean Corfield · 1 Comment
Other than noting back in January that all three(!) of my talk proposals were accepted, I haven't blogged about them since, so the only information about them is on the cf.Objective() web site. The session overviews give a fair sense of what you should get out of each presentation and roughly what they'll cover.
[Read more →]
Tags:
cfobjective · clojure · coldfusion · groovy · javascript · mongodb · scala
May 07, 2013 · By Sean Corfield · 1 Comment
I've been asked this several times recently so I figured it was worth a blog post. First of, why would anyone want older versions of the framework? Well, if they're running on Adobe ColdFusion 9.0.0 or earlier, they can't use the 2.x release stream: they're stuck on 1.x. Also, if they're currently using an old version and don't want a major upgrade, they might want a minor upgrade for a bug fix.
Okay, so why haven't I blogged about this before? Truth be told, I thought it was "obvious" how to find specific legacy releases on any Github project. Apparently, it is not obvious for everyone so it is worth blogging about. Every properly managed project on Github tags every official release so that all past releases can be found on the 'tags' page. You can see FW/1's 'tags' page where you can find every release since 1.0. Unfortunately, my choice of naming for tags has not always been consistent and I forgot the 'v' prefix for a while around the release of 2.0. Oops. Unfortunately the typical naming convention for prereleases tends to sort them above their gold release versions - see Clojure's core.logic library's tags for a more striking example. At least Github provides an easy mechanism for provided tagged archive releases.
It's probably worth pointing out that downloading FW/1 directly from the FW/1 RIAForge project page will give you the latest stable release which is currently 2.1.1. That's because it downloads a ZIP file of the "master" branch from the Github site. All development is performed on the "develop" branch. The only time the RIAForge site will slip you something different is when a new release is in the Release Candidate stage and I update the RIAForge page to download a ZIP file of the "develop" branch - and I update the page to clearly state that! - and this is to increase adoption of the new release and help flush out any remaining bugs that haven't been caught during the alpha and beta testing phases.
Tags:
coldfusion · fw1 · oss
May 03, 2013 · By Sean Corfield · 1 Comment
I saw that Nolan Erck had blogged his cf.Objective() schedule so I thought I'd do the same. The decisions are not generally as hard for me as for Nolan: when I'm not speaking or attending a general session, I'm going to be focused on JavaScript since that's where I'm weak and that's where I'll learn the most. Mostly focused on JavaScript, that is.
[Read more →]
Tags:
cfobjective · coldfusion