The RocketBoots community has always been a proud contributor to the open source movement. Below is a list of our currently available projects. We have a lot more projects marked for future release, so watch this space. All our projects:
A wiki is available for reporting bugs and sharing usage information. For enquires about support or alternative licencing arrangements please contact our team.
Our favourite application server — with several of us using CF for over a decade and our founder being a former Allaire employee, this should not be a surprise. If you'd like a less biased opinion, check the 2008 Jolt awards (ColdFusion won the web category, again).
Our most popular project to date, with over 5,000 downloads from RIAForge alone. This tag is an easy to use CFML API for the Recaptcha captcha service created by Carnegie Mellon University, which helps to digitise books as you enter your captcha challenge text:
<html> <body> <cfform> <cf_recaptcha privateKey="...your private key..." publicKey="...your public key..."> <cfinput type="submit" name="submit"> </cfform> <cfif isDefined("form.submit")> <cfoutput>recaptcha says #form.recaptcha#</cfoutput> </cfif> </body> </html> Listing 1: Using the recapture tag in a ColdFusion form We haven't created unit tests for the tag as the main thing we'd need to test is the inteaction with the Recaptcha server, which by its nature is designed to resist automation...
trunk | release | wiki | original announcementThis is probably the ColdFusion project we use the most. RocketUnit is the simplest possible unit testing framework we could come up with for ColdFusion (a single CFC). Most of the projects listed here come with RocketUnit test cases, and we've used it with great success on many client engagements, including test suites with hundreds of tests.
<html> <head> <meta http-equiv="refresh" content="10"> <style> body,table {font-size : 10; font-family : arial} </style> </head> <body> <cfsilent> <cfset test = createObject("component", "com.rocketboots.rocketunit.Test")> <cfset test.runTestPackage("test.com.somecompany.someapptests")> </cfsilent> <cfoutput>#test.HTMLFormatTestResults()#</cfoutput> </body> </html> Listing 2: Call a test case like this — open this in the Eclipse browser view to watch your test results update as you code. <cfcomponent extends="com.rocketboots.rocketunit.Test"> <cffunction access="public" name="setup" returntype="void"> <cfset instance = createObject("component", "com.somecompany.someapp.SomeCFC")/> </cffunction> <cffunction access="public" name="test01Instance"> <cfset assert("isInstanceOf(instance,'com.somecompany.someapp.SomeCFC')")> </cffunction> <cffunction name="test02ATest"> <cfset assert('instance.someFunction(someArg) eq someOutput')> </cffunction> <cffunction name="test03AnotherTest"> <cfset assert('instance.someOtherFunction(someArg, anotherArg) eq moreOutput')> </cffunction> ... Listing 3: Typical test case code — extend the Test CFC and use the assert function to test your results Apart from a much smaller code base, RocketUnit tests are simpler to write because it's single assert() function uses ColdFusion expression evaluation to break up and report on individual components of an assertion expression when it fails, replacing the usual collection of assertEquals(), assertNotEquals(), assertGreaterThan() etc functions included with most xUnit implementations.
trunk | release | wiki | original announcementGalaxy does for components what Application.cfc does for directory trees, and more. Using an undocumented method of the application object Galaxy allows applications running in separate ColdFusion application scopes to communicate with each other, allowing large applications to be broken into collaborating sets of services that can either communicate in-process for performance, or remotely via HTTP web services for scalability.
Here is a condensed version of a presentation on Galaxy given at CFObjective ANZ in November 2010:
Galaxy also supports thread-safe access to services, multiple service instances for performance, scheduled method callbacks for asynchronous processing, service versioning and comes with a console web view allowing services to be monitored and controlled remotely.
trunk | release | wiki | mailing list | demo code zipThere are a few nice ColdFusion wiki web applications out there but we only needed a wiki text converter to use with model (see below), so we wrote our own. Roki is a single component with a wiki2html() method — pass it some wiki text using a Textile-like syntax and it will return the corresponding HTML (you're reading some right now). Right now Roki supports:
All these have unit tests and are working nicely. Tables are still to come, but wait, there's more...
Roki supports built–in and user–provided wiki macros, implemented as good–old CFML custom tags sourced from a list of directories you pass to the component. Macro tags can:
At the moment Roki includes three macros: A code formatter, an alignment macro and an auto–numbered caption macro.
trunk | release | wikiAt RocketBoots one of the languages we get to work with regularly is MXML, the XML–based markup language for the Flex SDK. The power of MXML comes from it's declarative nature — like SQL, MXML concentrates on describing the finished output of a program, rather than the way in which that output is created (imperative, like most programming languages). MXML is mainly used to describe UI layouts in Flex, but it can be used whenever you need to create instances of classes, set their properties and create relationships between instances.
Model is essentially a port of our favourite features of MXML into a single ColdFusion custom tag. Like ColdSpring and Lightwire, Model is used to create instances of CFCs and other types of data, but using MXML syntax:
<cfimport prefix="mod" taglib="/com/rocketboots/core/util"> <mod:model id="launchpad" xmlns:controller="com.rocketboots.launchpad.controller" xmlns:roki="com.rocketboots.roki" xmlns:model="com.rocketboots.launchpad.model"> <controller:Controller id="controller" content="{content}" metadata="{metadata}" wikiConverter="{wikiConverter}"/> <roki:Roki id="wikiConverter" macroPackages="com.rocketboots.launchpad.view.macros,com.rocketboots.roki.macros"/> <model:content id="content"/> <model:metadata id="metadata"/> </mod:model> Listing 4: Setting up the RocketBoots website using the model tag Model supports:
We don't have unit tests for model at present (feel free to contribute some), but it is being used for the RocketBoots site (in combination with Roki) and for process automation / model–driven–development within the community. The future roadmap includes more binding support, inline components/factories and functions.
As they say, we like it, we like it a lot...
trunk | release | wikiAt CFCamp in 2007 Nick Watson from Adobe did a presentation on LiveCycle integration in ColdFusion 8, and I decided to try it out. To see the result, here's a demo.
Ah, not impressesed? You've probably noticed the spelling mistake too. Well of course in the bad old days once a web page had been downloaded that was it, but this web page is special:
<h1>Hello Wold</h1> <cf_javascript>Listing 5: Our helloworld.cfm uses the mysterious cf_javascript tag
To demonstrate what this tag does, here's another page to fix the issue (for the full effect it's best if you have the two pages open side–by–side).
<cf_javascript> document.body.firstChild.innerHTML = "Hello World"; alert("this is live"); </cf_javascript> Listing 6: Our fix.cfm uses the cf_javascript tag with a body containing javascript code Yes, the body of the cf_javascript executed in the browser. How does this work?
When you use cf_javascript without a body it embeds an invisible Flex application on your page. This application opens a connection to the LiveCycle server running alongside ColdFusion 8. Later when you call cf_javascript with a body, the javascript code is sent in a message to the invisible Flex application (it is possible to target individual or sets of recipients too) which in turn uses the ExternalInterface API to create and call a javascript function containing your code in the browser.
This sounds slow, however it's really quite quick. How quick? Here's an example. This is 20 fps animation being run from a ColdFusion thread (If it's more like 1fps it means the Flex application was unable to use the RTMP channel on port 1935 and has failed over to HTTP polling).
Cute — but how is this useful?
Firstly the complexity of writing push applications is greatly reduced. Try this chat application. It was written in 45 lines of CFML and javascript.
Push also provides answers to some of the age–old bugbears of web application usability. Here is an example of real–time record locking implemented using cf_javascript.
There are whole classes of real-time applications that we've never really associated ColdFusion with — remote desktops, collaboration applications, massively multiplayer online games and such. The CF community is still predominantly web–focused, so we hope a tag like this, which addresses a well–established limitation of web programming, will get some interest going in this new class of application and the opportunities it presents.
The source code of the tag and the samples is available below. Check the header comments of the tag for instructions on how to make a minor configuration change to LiveCycle to support the tag (it should also work with BlazeDS although it hasn't been tested — the important point is that Blaze/LiveCycle has to be running in the same JVM as ColdFusion for the tag to call the Java API). The repository also includes my (rough) notes for my WebDU 2009 presentation in case you'd like to present this tag at a work or user group meeting.
trunk | release | wikiWe've been with Flex from the very beginning, some of us from the late alphas of Flex 1.0. Some of us have been developing applications in Flash for even longer, which probably explains our extra fondness for Flex as a development platform (we remember what it's like without MXML and bindings, and we don't like to go back). From 2,000+ class enterprise applications to simple image viewers, we've come across a lot of ways to build applications in Actionscript and MXML.
The RocketBoots community continues to do a lot of work with Flex and AIR, most of it using the Cairngorm Model View Controller micro architecture. We don't have many OS projects available at present but there is a considerable backlog piled up in the wings.
If you examine them from a distance CSS style sheets, property files and their ilk are really fine–grained cousins of the “plugin” architecture used by successful platforms like Eclipse. Every place you access a style is like an extension point, the style value you supply is the extension and the property file or style sheet is the plugin.
It occured to us that we could use the ResourceManager API in the Flex SDK to supply more than simple string values and skin class references, but the limited syntax of property files wasn't the place to do it if we wanted type–checking and IDE code assist: we'd rather use our favorite declarative markup language — MXML.
package com.someco.someapp.plugin { import com.rocketboots.resourcex.ResourceBundleDocument; public class SomePlugin extends ResourceBundleDocument { public var simple : String = "defaultValue"; public var array : Array; public var instance : SomeUsefulClass; public var factory : IFactory; public function SomePlugin() { bundleName = "somePlugin"; } } } Listing 7: Creating a base class for your resource bundle, with typed properties and defaults To use MXML to specify a resource bundle, first create an ActionScript class extending com.rocketboots.resourcex.ResourceBundleDocument and specify the properties, default values and metadata (for FlexBuilder IDE support) that you require. You can then create MXML subclasses of this class:
<mx:Application xmlns:plugin="com.someco.someapp.plugin.*" xmlns:business="com.someco.someapp.business.*" xmlns:mx="http://www.adobe.com/2006/mxml"> ... <plugin:SomePlugin id="main" locale="en_US" simple="A Configurable Message"> <plugin:array> <mx:Array> ... </mx:Array> </plugin:array> <plugin:instance> <business:SomeUsefulClass somePropertyWeCanInject="green"> </plugin:instance> <plugin:factory> <mx:Component> <business:SomeUsefulClass somePropertyWeCanInject="green"> </mx:Component> </plugin:factory> </plugin:SomePlugin> ...Listing 8: When we create an instance of our plugin at runtime it registers itself as a resource bundle
Finally we can use our resource bundle just as if it had been created using a normal properties file:
... private var rm = ResourceManager.getInstance(); private var message : String = rm.getObject("somePlugin", "simple"); private var array : Array = rm.getObject("somePlugin", "array"); private var instance : SomeUsefulClass = rm.getObject("somePlugin", "instance"); private var instance2 : SomeUsefulClass = rm.getObject("somePlugin", "factory").newInstance(); ... Listing 9: Using our resource bundle/plugin We don't automatically use this on all our projects, but when we are building a core API that is intended to be used by a configurable line of software products this would be one of our preferred options.
trunk | release | wiki