CFUNITED 2008

Viewing By Category : oss / Main
May 3, 2008
Vince Bonfanti hosted a Birds of a Feather session this evening where he officially unveiled the Open BlueDragon project.

[More]


April 30, 2008
Adobe just announced it is opening up the SWF and FLV/F4V formats amongst other initiatives for the Open Screen Project. This aims to bring Flash Player ubiquity to all devices, large and small - and, in due course, AIR as well. The list of partners is very impressive and includes chip and phone manufacturers, network companies, content providers...


April 14, 2008
If you use Mark Mandel's awesome Transfer ORM in a cluster, you've probably wondered what to do about keeping the cache in sync across servers in the cluster. I've had to solve this problem a couple of times now and I figured I should publish an example of how to do this.

[More]


This time it's me in the spotlight, interviewed by Alan Williamson. Previous interview victims have been Mike Brunt, Peter Amiri and Andy Allan. Keep you eye on Alan's blog for interviews with the remaining members of the Open BlueDragon Steering Committee.

Don't forget that cf.Objective() 2008 is the first place to get your hands on Open BlueDragon where Vince will launch the project to the public and a number of the OpenBD Steering Committee members will be present to answer your questions.


April 11, 2008
This year's cf.Objective() has a lot of firsts. If you're not attending, you're going to miss out on a lot of world premier events!

We've worked hard to make cf.Objective() 2008 a "must see" event. We have a number of firsts this year that we're very proud of:

  • The public release of Open BlueDragon on May 3rd!
  • The public unveiling - and Alpha - of Model-Glue 3: Gesture!
  • The public unveiling of Mate, the new Flex framework from AsFusion!
  • The first conference to feature the latest rising star in the frameworks world: ColdBox - with an introductory session and a two hour, hands-on advanced workshop!
  • The first public information about Swiz, the new Flex framework from Chris Scott of ColdSpring fame!
  • Speaking of Chris Scott, we're the first conference to feature a two-hour, hands-on workshop for ColdSpring!
  • We're also the first conference to feature a two-hour, hands-on workshop on agile development for ColdFusion developers by the leading light in automated process & testing, John Paul Ashenfelter!
How can you pass this up? $629 for three full days of brain-cramming, enterprise-level information in a hotel that's only $120 a night! Register Now! The room rate is only guaranteed for a few more days!

If you're a Mach-II user - or thinking of using Mach-II - you might also be interested in the pre-conference classes.


April 8, 2008
Alan Williamson introduces the members of the Open BlueDragon Steering Committee in a post today that includes quotes from each committee member about their hopes for the project.

[More]


April 4, 2008
Mike Steele has updated CFEasyMock to add strict and nice mocks, making this a 1.0 release. If you are doing unit testing and haven't yet checked out this framework, you really should download it and see just what it can do for you.


April 3, 2008
Alan Williamson just announced that the BlueDragon open source project has an official name: Open BlueDragon, or OpenBD for short. The steering committee has also created a public mailing list for discussing all things related to the project.


March 31, 2008
As a fan of unit testing, I was interested to hear about a new mock object generator project appearing in the CF world.

I've been using Brian Kotek's ColdMock for a while and I really like how easy it makes it to test CFCs that depend on several other CFCs - because you can create "mock" versions of those CFCs on the fly that return specific values. Mock objects are a good way to provide a consistent environment for your CFCs under test, as well as a way to let your CFCs be tested without them affected the "real" environment (because you can create a "mock" environment which can even include things such as data access objects to fake the whole database layer).

As I blogged recently, I've switched from cfcUnit to MXUnit and the mailing list is pretty active. Mike Steele posted that he had ported EasyMock to CFML. My first reaction was "Have you looked at Brian Kotek's ColdMock project?" and Mike explained that EasyMock isn't just about creating simple mock objects but about verifying behavior in those mock objects.

Intrigued, I read about EasyMock, a Java project that targets JUnit, and realized the power of being able to create mock objects that expect to be called in certain ways and can, as part of your unit test, actually verify the calls made on them!

I asked Mike to send me a build and I played with it and liked it a lot, pretty much instantly. I sent him some feedback and very soon I got an updated build that incorporated much of my feedback - and a note saying he was already going in that direction. Nice to find a project where I'm on the same page as the author!

You can download the latest build from the CFEasyMock project page on RIAForge. It's a very simple but very powerful concept that should really help you with your unit testing!


March 28, 2008
No fair! No fair! Brian Rinaldi leaks the upcoming Transfer 1.0 release along with the ColdBox-powered documentation wiki.

Transfer continues to evolve at a rapid pace. The SVN repository is light years ahead of the last "official" release (0.6.3) and 1.0 is "coming soon". Mark Mandel deserves huge kudos for his work on this project - and his intent to turn this into "Professional Open Source". In other words, making Transfer something we can rely on like we rely on JBoss or MySQL today.

Come to cf.Objective() 2008 to hear Mark talk in person about Transfer in two great sessions!


March 15, 2008
Vince Bonfanti has posted a good explanation of several of the details and implications of opening up BlueDragon. I was pleased to see him call out my blog post about the announcement! Hopefully his post will clarify a lot of the misconceptions I've seen expressed in a number of discussions.

Vince points folks to the new Open Source forum on the New Atlanta website which has a lot of good information about the details of dual licensing, the expected process for contributions and so on.

I strongly encourage folks to read Vince's post and then read all the threads in the forum.


March 10, 2008
In a move that has surprised some folks, New Atlanta has announced plans to create a free open source version of their J2EE BlueDragon product. They will continue to develop, sell and support a commercial version of it, as well as continuing the .NET version and the standalone JX version (neither of which will be open sourced).

[More]


February 12, 2008
Most of us know by now just how easy it is to write Flex applications backed by ColdFusion. Adobe have done a lot of work to ensure that integration with ColdFusion is seamless. It's very impressive.

Browsing through the Grails site, I noticed they have a plugin for Flex so I figured I'd try it out.

Following the instructions, I installed the plugin (grails install-plugin flex) which took a fair while to fetch the plugin from the codehaus.org site and build it and install it into my project. Then I created a service class - a regular Groovy class - with just this one additional line:

static expose = [ 'flex-remoting' ]
It had a method, hello(), that returned a string.

Then I put my main.mxml file in the web-app directory of my Grails project with these lines inside the mx:Application tag:

<mx:RemoteObject id="ro" destination="helloService"/>
   
<mx:Button label="Hello" click="ro.hello()"/>
<mx:TextInput text="{ro.hello.lastResult}"/>
You don't need to build the project. You don't need to set any paths in FlexBuilder. Just create the MXML file.

Then I hit the MXML file in my Grails app:

http://localhost:8080/bookstore/main.mxml

Much churning ensued as the Flex app was compiled on demand and then up it came with the Hello button. Click. The return value from my HelloService.groovy hello() appeared in the text box.

It's a trivial app but it showed just how incredibly seamless the integration is. It uses the Web Tier Flex compiler for on-demand MXML compilation and it automatically manages the destinations for you.


January 22, 2008
And I mean see... Kev McCabe has posted a series of video tutorials about Apache, Subversion and Trac on Windows. This should be very helpful for folks wanting to set up local version control and bug tracking but who feel a bit daunted by all these packages. Kev takes you through how to install each package and then how to configure them to work together.


December 14, 2007
I've had my head down working hard on client projects lately and finally got some time this evening to catch up on blogs. Wow! Adobe sure has been busy!

AIR Beta 3, AIR extensions/updates for Flash CS3 and Dreamweaver CS3, Flex 3 Beta 3, BlazeDS, Brio Beta, Flash Player 9 Update...

Good grief!

I just installed the new Flex Builder plugin but won't get a chance to put it through its paces for a few days. The AIR installer is sitting on my desktop and I'm just about to install the updated Flash Player. Oh, and I have my Brio account but haven't had time to play with that either. Maybe Adobe think we need something to keep us busy over the holidays?

Check out Adobe Labs to see what you might be missing!


October 7, 2007
At MAX, Brian Meloche ran a BOF on this topic and he has published his interim report as well as the specific findings of the non-ColdFusion target group.

Brian focused on what the community can do which is the right approach in my opinion (Ruby and PHP got popular because of their community, not because of corporate marketing) and one of the key suggestions from the non-ColdFusion target group was for the community to rally around a single point of promotion and build CF versions of all the free, open source software integrations that are seen in the Java, PHP and .NET communities. We won't get their by constantly reinventing wheels - we need to pitch in and help with existing projects (and authors of projects need to get better about allowing others to contribute - which is one of the problems with RIAforge since it does not support multiple contributors).


October 5, 2007
I recently saw some discussions about how Ruby is way better than ColdFusion because it allows stuff like this:
a = [ "a", "b", "c", "d" ]
b = a.collect { |x| x + "!" }
at which point b is an array containing "a!", "b!", "c!", "d!".

So I added a Collection class to my Closures for ColdFusion library so that you can do this:

a = [ "a", "b", "c", "d" ];
a1 = createObject("component","Collection").init(a);
b = a1.collect( "x", 'x & "!"' );
at which point b is a Collection containing "a!", "b!", "c!", "d!".

It's actually based on the Smalltalk collection class but it lets you do very Ruby-like stuff. I still have a couple of minor tweaks to make it even easier to use and I still have more documentation to add but I figured I'd blog it so folks could download it and try it out - see the Software pod on my blog.

The Closures for ColdFusion library works on CFMX 7 but the new Collection class requires CF8 - sorry!


August 29, 2007
OK, so many of you already think I'm an Apple fanboi but I've resisted Pages and Keynote in the past because they're every bit as proprietary as Microsoft's bloatware Office product.

I have diligently stuck with NeoOffice/J - free, open source, open standards. It's a bit clunky but it works. I've used it for years. I helped (a little) with the Mac OS X port of OpenOffice.org back in the 1.0 and 1.1 days. I've always felt it's quirks are worth putting up with for the karma of Free Open Source and Standards.

I'm putting together my presentation for MAX and trying to work with Adobe's PowerPoint template. Someone really needs to teach those Adobe folk how to use PowerPoint! The template is horrific to work with and, unfortunately, exceeds the abilities of NeoOffice/J. It's all been very frustrating.

So, Apple released iWork 08 and it claims great Microsoft compatibility. Everyone is ooh-ing and aah-ing over the new features and the all-new Numbers spreadsheet. I'm thinking "yeah, whoop-di-do, another proprietary app".

Eventually... Well, I decide to at least download it and try it out. I open up Keynote and open up the Adobe PPT file. Perfect rendering. Wow! I create a few new slides and reorder them. Everything. Just. Works.

OK, I'm impressed... so I open up Numbers and bring in my invoicing spreadsheet. Ooooh, I think I'm going to faint! A spreadsheet actually looks attractive! And guess what? It. Just. Works.

Damn. I guess I'll be buying Apple's proprietary office suite after all. I'm stunned at how good it is. I love Free Open Source software and I'm willing to cut it a lot of slack but Apple has really hit the nail on the head here and the suite is definitely worth the $79 entry fee...


August 22, 2007
I just added my cfcUnit facade code into my Google Code project that already contained Closures, Concurrency, IRCBot and Scripting. Rich Kroll sent me a nice little fix for a bug in the facade so I figured it was a good time to move that file under version control and make it part of my regular builds process.

Feel free to file bugs and enhancements in the issue tracker - and thank you for using my code!


July 23, 2007
I read this article a few years back but a friend just reminded me of it, in response to some questions being asked on a mailing list that we are both on.

Eric Steven Raymond's How To Ask Questions The Smart Way may come across as rude and elitist but it contains a lot of useful information about getting your problems solved effectively (and if you think it really is rude or elitist then you may be one of the people he insists doesn't "get it").

Compared to how the ColdFusion community behave (at least, in general), the Unix community is much less tolerant of laziness and "stupidity" but I expect we all recognize certain people or certain questions in ESR's article.

I know I have certainly answered questions with a link to a Google search or to a LiveDocs page (when all I have done is copy'n'pasted the user's question into Google and found the user's answer).

Underlying the basic advice is an important sentiment. Well, several important sentiments. Don't assume the problem is the software (and that applies especially to open source projects that the authors have poured their soul into). Don't assume you are entitled to an answer. Don't ask a question you haven't at least tried to answer on your own - read ESR's article if that makes you in the least bit indignant!

I make myself available on lists and IM for questions. I try very hard to be polite and tolerant and patient when I'm fielding a constant stream of questions. Sometimes I don't succeed but if you read that article you should get a sense of why I might sometimes be a bit sharper in my reply than you would like!

I went a long, long time before I added a wishlist to my blog (and I've stated several times very publicly that I will never, ever add paid advertising to my site). That said, an iTunes gift certificate makes me much, much, much more tolerant and patient and much more inclined to answer questions that I may think you haven't tried hard enough to answer yourself!

Anyway, read the article - if it offends you, read it again. Once it stops offending you, absorb all the hints and tips on how to get answers faster - and then look at the various mailing lists and forums you're on and you'll see why some posters are ignored (if they're lucky) or answered with rude retorts.

Newbies are always welcome, "lusers" are not (read ESR's article for commentary on that).


July 13, 2007
The all-new Bay Area ColdFusion User Group website just went live. It is based on Matt Woodward's open source Capitol Hill User Group application, built with Mach II 1.5 and ColdSpring 1.0. It's still a bit of a work in progress (both as an application and as a website) but more content and functionality will be added over time.


July 1, 2007
After the networking event, Joe Rinehart hosted a Birds of a Feather session on frameworks. He covered the new release of Model-Glue 2.0 for ColdFusion, the Alpha 1 release of Model-Glue for Flex (which looks very exciting!) and said that Model-Glue for Java, developed by Chris Scott (I think) would also become an official Model-Glue project - all on the new Model-Glue website.

Next up I covered the Fusebox 5.5 release which is currently in limited Alpha with a public Beta planned in July (as soon as we can get enough documentation together on the new features). I also announced publicly that providing a migration path for Fusebox 3 was on the roadmap (for Fusebox 5.7 probably).

Matt Woodward (and Peter Farrell) presented Mach II 1.5 which is in Beta right now, and the new website. He also talked about plans for their 2.0 release (but didn't go into specifics).

Next up was Chris Scott, who said that an official 1.2 release would appear within a few weeks and then they would be working toward a 1.5 release. This will be the last release of ColdSpring that will run on CFMX 7 - ColdSpring 2.0 will require CF8 because they want to take advantage of cfinterface and onMissingMethod() to make ColdSpring faster (and simplify the core files).

Last up was Doug Hughes who assured us that Reactor would hit an official 1.0 release as soon as the documentation was complete. Ah, the dreaded documentation...


June 13, 2007
Just sat through a very interesting presentation on Open Source initiatives at Adobe by Dave McAllister and wanted to put out some links and notes.

Dave noted that Adobe has been active in Open Source for a good long while but has recently begun to move away from the Adobe Open Source License (a vanity license - like the old Fusebox license) to more standard licenses such as BSD and MPL. We've seen the ActionScript Virtual Machine released to the Mozilla Organization (as Tamarin) and this week the Flex 3 SDK was just released as Open Source with the ActionScript and MXML compilers and ActionScript debugger all following later this year.

You can keep tabs on Adobe's voice for Open Source on the Open at Adobe blog.

You can read about (some of) Adobe's Open Source projects on opensource.adobe.com, which includes the Adobe Source Libraries and the Generic Image Library. The latter was accepted into the Boost project for C++ - an open source library project that I was involved with back in 1998, when I was still involved with the ANSI C++ Standards Committee!

Dave also mentioned RIAForge which is probably the most well-known Open Source effort around Adobe technologies, as far as the ColdFusion community is concerned.


June 11, 2007
Adobe Apollo is now AIR - Adobe Integrated Runtime and the easiest way to develop for AIR is Flex Builder 3 (beta). The Flex 3 SDK is also available on Adobe Labs with nightly builds as well as a public bugbase.

There are quite a few changes between the Apollo Alpha (aka "M3") and the new AIR (aka "M4") builds so you'll have to make some source code changes to rebuild your Apollo apps. It's not a big deal - I had my Apollo app - an administrative console for a website - up and running as an AIR app in just a few minutes. Despite the new Flex 3 SDK, my (recompiled) Flex apps and my new AIR app seem to work just fine with my existing CFMX 7 and CF 8 sites.

And tomorrow I get a whole day of training on AIR so I'll have more to say in the next few days.


June 4, 2007
I just updated the Scripting for ColdFusion 8 project to compile and cache the embedded scripts.

The PHP example runs in around 35ms on the first hit and around 1ms on subsequent hits. The Ruby examples run in around 100-200ms on the first hit and around 2ms on subsequent hits.

Over the next few weeks I'll be adding more languages and reorganizing the code structure (and changing the custom tag API a little bit). I'll declare a Beta once I have things nailed down a bit more but if folks want to play with the Alpha and provide feedback, I'd appreciate it.


June 2, 2007
The title says it all - visit Scripting for ColdFusion 8 on RIAForge!

I'll be working on documentation (using the RIAForge wiki) over the next few weeks - as well as adding documentation for my other projects on RIAForge: Closures for CFMX and Concurrency for CFMX.


Here's a couple of examples of Ruby running inside ColdFusion 8.

First off, the example that follows the lead of the PHP example (albeit a little more complicated):

<cfset session.marker = "Hi, I'm a session variable!" />
<cfset who = "Sean" />
<cftimer label="Executing Ruby" type="outline">
   <script:ruby>
      # since we need to return the last expression in the script
      # we run other code first, unless the PHP example:
      
      # set a page level variable in ColdFusion:
      $coldfusion["greeting"] = "wibble"
      # read a URL variable and set a session variable in ColdFusion:
      $test = $url["test"]
      if $test then
         $session["what"] = $url["test"]
      else
         $session["what"] = "test was not passed as a URL variable"
      end
      
      # this builds a single string which is the result of the script:
      "Hi " + $coldfusion["who"] + "<br />" +
      $session["marker"] + "<br />" +
      ($test ? $test : "") + "<br />" +
      $cgi["SCRIPT_FILENAME"] + "<br />"
   </script:ruby>
</cftimer>
Several ColdFusion scopes are available directly in Ruby as global variables (the variables scope as $coldfusion and CGI, form, session and URL as global variables of the same name, lowercased).

Unlike the PHP scripting engine, any actual output from Ruby is lost (puts, print) or, more accurately, written directly to the system console which is not very helpful. Instead, the last expression evaluated is converted to a string and used as output of the custom tag.

Here's another example showing a Ruby class used with a block and an iterator:

<cftimer label="Executing Ruby with a class" type="outline">
   <script:ruby>
      class Person
         def initialize(firstName,lastName)
            @firstName = firstName
            @lastName = lastName
         end
         attr_reader :firstName, :lastName
      end
      people = [
         Person.new("Ben","Forta"),
         Person.new("Jason","Delmore"),
         Person.new("Tim","Buntel")
      ]
      people.collect {
         |person|
         person.firstName + " " + person.lastName + " rocks!<br />"
      }
   </script:ruby>
</cftimer>
I haven't done much testing with the Ruby version yet, in particular what happens when you manipulate Ruby objects in ColdFusion (or vice versa).

Python, Groovy and Haskell are on my list. I may go through the entire Sun Scripting Engine list eventually (Awk, Tcl and a variety of strange pseudo-languages are there).


Update: now supports Ruby as well as PHP! I'll post a couple of Ruby examples next.

We're always getting grief from those PHP folks, aren't we? What if you could run PHP code directly inside ColdFusion?

<cfset who = "Sean" />
<cf_php>
<?php
echo "Hello ".$_COLDFUSION["who"]."<br />";
$_COLDFUSION["greeting"] = "wibble";
?>
</cf_php>
<cfoutput>greeting = #greeting#</cfoutput>
This outputs Hello Sean and greeting = wibble. Yes, you can pass ColdFusion variables into PHP and set variables in PHP that you can access back in ColdFusion land. [Note: Unlike the first version I posted, the new version takes no attributes but instead makes available the entire variables scope from the calling page - and now uses $_COLDFUSION which is more in keeping with PHP.]

How is this possible? Well, ColdFusion 8 uses Java 6 which provides access to the javax.script package and all the J-language implementations available. Quercus is a Java implementation of PHP and it is implemented as a script engine.

Sun has provided a number of JSR-223 ScriptEngine and ScriptEngineFactory implementations and there are Java implementations of a number of languages.

Combine that with a simple custom tag and the code you see above becomes a trivial extension for ColdFusion 8!

Credit to axelclk for the missing piece of the puzzle!


Update: you can download what you need from my 'software' pod on my blog: Scripting for ColdFusion 8. Installation instructions are given inside each script directory's example.cfm page. The project now has Ruby support.

The source code is available on Google Code - along with my other Open Source projects and I'm setting up a central location on RIAForge as well (as soon as Ray approves my project request).


May 22, 2007
I hear so many good things about PostgreSQL that I figured I ought to try it out. That and I have a consulting project that requires it.

Checking the PostgreSQL site, I see no OS X distribution so I Google and find this Apple Developer Center article on PostgreSQL. My first reaction is "Oh, come on! There has to be an easier way!".

Brandon Harper pointed me at PostgreSQL Tools for MacOS X on SourceForge. I download the developer kit and the tools but the installation only seems to be partial so after half an hour of pfaffing around, I go back to Apple's page.

It actually wasn't as painful to get it all installed as it looked (I was just being lazy). So now I have PostgreSQL 8.2.4 running locally. Yay!

Any hints and tips for a new PostgreSQL user?


May 14, 2007
I downloaded the Smith Project and took it for a test drive.

First off, as I mentioned at the end of my earlier blog post, the integrated Linux version, with Jetty included, does not work on Mac OS X.

So I tried the WAR deployment next. My first target was JRun but it wouldn't work there. So I tried Tomcat 6. Nope. Tomcat 5.5. Success!

Smith starts up (in just under 6 seconds) and some very basic CFML pages show it working. I try the admin console and all the pages come up but no setting changes take effect. Hmm...

Well, let's try something a little more complicated. Let's try Fusebox 5 and the skeleton application.

It doesn't like this:

<cfcatch type="any" />
It requires this:
<cfcatch type="any"></cfcatch>
There's a few of tho' in the Fusebox core files.

It doesn't implement cfprocessingdirective. Fine, I'll just comment that out in fusebox5.cfm. Now I'm just getting an impenetrable compiler error about some exception already having been caught in the compiler, flagging a cfinclude.

Anyone else had any experience with Smith yet?


May 11, 2007
Two users reported a strange bug where calls from FutureEvent to FutureTask methods were failing with access denied.

Those CFCs are both in the same directory and the access was specified as package. However, it seems that if CFMX figures out the path used for the code is different in case, it denies access. Both users were on Windows and I believe in both cases they had defined the /org/corfield/concurrency mapping as a Windows file system path that included at least one uppercase letter. When CFMX locates the called CFC (in the same directory), it seems to always generate a fully lowercase file system path and so the comparison fails (between the mapped CFC with uppercase in the path and the "discovered" CFC with all lowercase in the path).

I "fixed" this by changing access="package" to access="public" on four methods in FutureTask.

You can download the updated version from RIAForge.org.


May 7, 2007
Well, we knew it was coming at some point...

Today, the Smith Project went open source! They support CFCs now but there are still quite a few red X's on the tag/function support charts. It'll be interesting to see how well they support CFCs, since that's been one of the big bugaboos with BlueDragon according to a lot of folks I've spoken to. Compatibility is certainly king when you're paying for a cloned product and BlueDragon falls short there: it doesn't run several popular ColdFusion frameworks (but, by comparison, Railo work very hard to ensure they run those frameworks). How will people measure a free open source product? Will they cut it more slack on compatibility?

Clearly, with all the innovation coming in Scorpio at the high-end and Smith entering the field at the low end, the game is going to change.

2007 looks like being an incredible year to be a ColdFusion developer!


FWIW, the basic download and run option does not work on a Mac - it fails with a Null Pointer Exception.


April 26, 2007
Adobe just announced their plans to release the source code for Adobe Flex as open source. You can read more details on Adobe Labs.

The Mozilla Public License will be used to cover the source the AS3 Flex SDK (available in source form since the release of Flex 2) as well as the Java source for the AS3 and MXML compilers, the debugger and the core AS3 libraries from the SDK.

Most of the infrastructure should be in place by the summer with a full transition to open source by the end of 2007.

You might also want to watch the video interview with Ely Greenfield and David Wadhwani by Robert Scoble of PodTech.


March 13, 2007
Adam Podolnick and Ray Camden have released ColdFire, the ColdFusion debugging plugin for Firefox. Installation is simple: install Firebug, install the ColdFire XPI file, drop the coldfire.cfm debugging template into your ColdFusion installation tree (under WEB-INF/debug), select that debugging template in your CF Admin and you're off to the races!

And it works beautifully!! Kudos to you both for this!


February 27, 2007
Just got off a debugging session with a ColdFusion developer. They're using Fusebox 5 and successfully running an existing Fusebox 4 site on it. The developer IM'd me because he was having a problem getting a new application up and running. No matter what URL he tried, the application always showed the same default home page. I suggested a few things in IM but nothing worked. Curious, I fired up my public Adobe Acrobat Connect Professional room and asked the developer to join me. I made him a presenter and asked him to shared his screen and show me his fusebox.xml and circuit.xml files. They looked fine. So I requested control and had a look at a few other files in his application - everything looked fine but the application resolutely refused to display any fuseaction except the defaultFuseaction. As a last ditch idea I edited his fusebox.xml file to explicitly set the fuseactionVariable parameter. Success!

This said that the default value being used was not the documented default. I asked him to show me where the Fusebox 5 core files were on his system. I opened up fuseboxApplication.cfc and saw that someone had changed the underlying defaultFuseaction!

So, someone had modified the core files to create behavior that was at odds with the documentation and the result was a developer spending goodness only knows how much time trying to figure out why their basic little application didn't work - and then about another hour combined of my time and his, tracking down the problem.

Remember folks: Leave that code alone!


February 26, 2007
A common discussion in the ColdFusion community is around which IDE to use and how available IDEs reflect on the language itself. For ColdFusion, the choice is essentially between Dreamweaver at $399 (or HomeSite+ which ships "for free" on the Dreamweaver CD - essentially ColdFusion Studio for $100 less than it used to cost) and CFEclipse, the free plugin for Eclipse. Which you choose depends on whether you are primarily doing visual development (layouts and design etc) or back end development - although I use both (the right tool for the right job etc).

With that in mind, it's interesting to see that Code Gear has just announced Delphi for PHP - an IDE built with Delphi (and inspired by the existing Delphi IDE) but for PHP developers. It's Windows-only right now (because Delphi is Windows-only - BTW, HomeSite / HomeSite+ is a Delphi application which is why it too is Windows-only) and will cost $299.

That places it in pretty much direct competition with Zend Studio which also costs $299. Zend Studio is cross-platform, which is a big plug, and of course there is also the free PDT (PHP Development Tool) plugin for Eclipse.


February 6, 2007
Brian Rinaldi has a great post on why it's usually a bad idea to modify open source frameworks. He gives some very solid reasons why you should treat a framework as a black box instead of changing how it works. There's an interesting stream of comments too. I think the one thing that resonates most with me is not part of the original post but in one of Brian's own comments in the ensuring thread:
I think there is a presumption by some people that open-source is open so that you can modify the code. I think in many cases it is as much or more about transparency and soliciting input from the broader user community than it is about empowering users to modify the code.
Open source is really about culture and mindset and these two sentences sum up, for me, the core misunderstanding that many people have about the process.


January 9, 2007
About once a year, I tend to mention Haskell on my blog. I like functional programming languages - that was my research topic for three years after I graduated from university. Haskell is a very powerful functional programming language that has a number of available implementations and, as I discovered this weekend, a very active community.

Last time I messed with Haskell, I chose the nhc98 compiler because it was easily available for the PowerPC Mac. When Haskell had cropped up in discussions with not one, but two ColdFusion developers this week, I figured I'd install it on my new Intel Mac. Except nhc98 is not available as a binary distribution for the Intel Mac. Easy, I thought, download the source and build it myself. The build failed. The notes suggest using the ulimit command to remove the file-size limitation on the shell. OK. The build still failed. The notes say if you can't solve it with ulimit, use another Haskell compiler to help bootstrap the build.

Try as I might, I couldn't find an existing Intel Mac binary of any Haskell compiler. But there's an IRC channel listed on the Haskell web site. #haskell on freenode.net. I figured that #coldfusion is so helpful that I might as well try the #haskell channel... There were nearly 300 people in there! And, guess what? They were very happy to help me for several hours. First, they pointed me at an Intel Mac build of ghc (the Glasgow Haskell Compiler) which, incidentally, was contributed by a member of the Haskell community (i.e., built from source and submitted back). I installed it and it worked just fine. So far so good.

Then I installed hmake and hi (hmake interactive) which are build and shell tools for using Haskell compilers. I ran into problems with a library dependency. Again, the IRC channel folks were very helpful. Following their instructions, I removed the (obsolete) dependency and successfully built and installed the two hmake tools. Yay!

Then I went back to nhc98, determined to build that from source. I ran into several more dependency problems. Back to the IRC channel. Similar advice (nhc98 is old and the dependencies aren't needed when using newer compilers to bootstrap it). I finally got it built but, unfortunately, every file it generated just crashed. By this point, the IRC folks were wondering why I was bothering since nhc98 has really reached a dead-end. They pointed out that ghc has an interactive tool (ghci) anyway. So I admitted defeat and starting playing with ghci...

Some of the tutorials on the web features code that didn't work. A quick check in with the IRC channel and I learn that Haskell 98 had a flat namespace for libraries but since then the standard library ("Prelude") has been reorganized into a hierarchy of packages. We discussed some of the slight differences between Haskell 98 (per the tutorials I was trying to follow) and "modern" Haskell and I kept on learning.

One of the interesting things about the channel is that members are constantly swapping code fragments and experimenting amongst themselves with ways to solve problems. Very collaborative!

So, once again, I'll suggest to the curious among you to check out Haskell.

I'd also ask you to think about the difference between the #coldfusion channel on DAL.net and the #haskell channel on freenode.net. #coldfusion has 20-30 members most of the time and occasionally gets as high as 50. For the most part it is banter about everyday life but folks will rally and focus if someone comes on asking a ColdFusion question. #haskell has 270-300 members and discussion is mostly about Haskell. We're all so very passionate about ColdFusion and we like helping newbies. Why are so few CFers on IRC compared to Haskell developers?


January 3, 2007
Thanx to Brian Rinaldi's Open Source Update, I found a new blog - Sammy Larbi's. Sammy tried out my Closures library and shows an example that sort of works so I figured I'd post the "right" way to do things so that a variant of Sammy's example works as he expects.

First off, Sammy mentions the fix he had to apply to make the Closures library work on his system. I thought it was a 6.1 / 7.0 difference but it turns out he found a real bug and the fix is needed even on 7.0 if you use a mapping for the library. Secondly, while debugging Sammy's example, I found another bug - a potential thread safety issue. Both are fixed in SVN and the latest "daily" build ZIP file.

So, moving on to Sammy's code, here's the corrected version of his container.cfc:

<!--- container.cfc --->
<cfcomponent>
<cfscript>
variables._arr = arrayNew(1);
variables._curIndex = 0;

// adds an element to the container
function add(value)
{
_curIndex = _curIndex + 1;
_arr[_curIndex]=value;
}

// iterates over the container, letting a closure
// specify what to do at each iteration
function each(closure)
{
for (i=1; i lte _curIndex; i=i+1)
{
closure.call(_arr[i]);
}
}
</cfscript>
</cfcomponent>
Compare his each() method to mine. He names the method and then repeatedly binds the value variable. That doesn't actually do what he thinks. If you want to call a closure, you simply call it with arguments as shown above.

However, in order to do that, you need to identify the arguments when you create the closure. You do that by specifying the argument names in the call to new() like this:

cf.new("<cfset value = value + 3>" &
   "<cfoutput>##value##</cfoutput>" &
   "<cfset beenhere = true>","value")
That fixes part of his problem.

His other problem is the beenhere variable. He wants to bind that variable to the context in which the closure is created. Note that he wants to update the variable inside the closure and output its (updated) value outside the closure. In order to do that, you need to bind the context. First we change the closure to this:

cf.new("<cfset value = value + 3>" &
   "<cfoutput>##value##</cfoutput>" &
   "<cfset outer.beenhere = true>","value")
We've made beenhere a member of a structure. Now we can bind the variables context of the closure_test.cfm page to that structure:
cf.new("<cfset value = value + 3>" &
   "<cfoutput>##value##</cfoutput>" &
   "<cfset outer.beenhere = true>","value")
   .bind(outer=variables)
This causes the (free) reference to outer in the closure to be bound to the (creation-time) variables scope context.

Here's the updated test page:

<!--- closure_test.cfm --->
<cfscript>
cf = createObject("component","org.corfield.closure.ClosureFactory");
container = createObject("component","container");
container.add(10);
container.add(20);
container.add(30);
beenhere = false;
c = cf.new("<cfset value = value + 3>" &
   "<cfoutput>##value##</cfoutput>" &
   "<cfset outer.beenhere = true>","value")
   .bind(outer=variables);
container.each(c);
c = cf.new("<br/><cfoutput>This container has the value ##value## in it</cfoutput>","value");
container.each(c);
</cfscript>

<cfoutput>
#beenhere# <!--- outputs false --->
</cfoutput>
Hope that helps anyone else who is trying to use my Closures library!


November 9, 2006
I love The Register. It always has such a warped view of the world. It covered the Tamarin project announcement yesterday which means that El Reg thinks it's pretty big news. That's definitely a good thing.

Unfortunately, their coverage is a little strange... The article starts out just fine, mostly quoting from the press release, but then quickly goes off the rails. When they talk about Flash Player 9, they completely fail to mention the huge performance boost and the all-new Virtual Machine. Then they say "Adobe was compelled to open its Flash source code" to "stay relevant" and that this is all about "compatibility and stability with Firefox". The author, Gavin Clarke, clearly didn't read beyond the first couple of paragraphs of the press release that he quoted. Mind you, most of his Register articles focus on Microsoft so perhaps I should cut him some slack...


November 8, 2006
Ted has a great blog post that explains visually just what Tamarin is all about. His diagram shows the various components in the Virtual Machine and how they interact - as well as making some observations on what Tamarin might enable in the future.


November 7, 2006
Adobe has contributed source code for the ActionScript Virtual Machine, the powerful standards-based scripting language engine in Adobe Flash Player, to the Mozilla Foundation.
Read the press release for more details.


October 31, 2006
Mark Mandel has released a major update to his Transfer ORM library (don't be fooled by the minor version number change from 0.5 - this is a huge release!).

You can read all about the new features in his blog entry about the new release. If you have any concerns about trying Transfer because it hasn't reached the magic "1.0" release yet, put those concerns aside and try it anyway. My team has been using Transfer happily for a while (and will shortly be launching a new service where the persistence layer is powered by Transfer!).


October 24, 2006
The Mach II team are looking for your feedback! This is one of the great things about the Open Source community - if you use a project, you can have a voice in how it develops. At least, that's how Open Source should work so props to Matt and Peter for doing this!


Firefox 2.0 is here. I'm running 1.5.0.7 and 2.0 side-by-side right now (although only one can actually be running at once) to see how I feel before I commit to upgrading. So far - an hour in - Firefox 2.0 feels very good. I like the subtle UI changes, the better organized preferences dialog and, most of all, the spell-checking on textarea form fields (although it doesn't know the word 'textarea'!).

I was disappointed that the Fusebox 5 reload extension is "not compatible" (strangely the Fusebox 4 reload extension is compatible - go figure!).


October 23, 2006
Mark Mandel has moved his Transfer ORM project to RIAForge with forums, bug tracker and Subversion repository. The current download is still the 0.5 build but Subversion contains a much more up-to-date version (which we are using at Adobe). You can read Mark's blog at Compound Theory.


October 18, 2006
If you have an Open Source project built with Adobe technologies, you can register it at RIAForge, a site developed by Ray Camden, Ben Forta and others. It provides dedicated domain names for projects, Subversion for source code control, bug tracker, project blog, forums... And it's built with Adobe technologies (of course).


October 10, 2006
You can now get Closures for CFMX, Concurrency for CFMX and my IRCBot Event Gateway from the org-corfield-cfmx project on Google Code. Right now you need SVN to download stuff - I'll probably add specific prebuilt ZIP files in due course if folks would find that easier (add an issue to the project!). You can now download "daily" builds.

The Concurrency for CFMX library is halfway between release 1.2 and 1.3(!). The IRCBot Event Gateway needs the documentation updating to match the new directory layout. But I'll get there...


I just added a Google Groups mailing list to the project, also accessible from the project site.


October 9, 2006
Some minor updates to the Closures for CFMX library:
  • You can now make a closure from a text expression - if the factory doesn't find return and ; in the code block it will add them automatically.
  • The call() method is automatically an alias for the generated function which means that if you provide an argument specification, you no longer have to use named arguments in the method call.
  • The code examples have been updated to better illustrate the equivalent of the Ruby select / filter example on Fowler's bliki (link posted by Peter Bell on the previous entry)
I'll try to get the code posted to Google Code but may well reorganize my Concurrency project at the same time to create a single project for all future corfield.org open source libraries.


October 8, 2006
I was having a discussion about closures with someone recently and I said they wouldn't make sense for ColdFusion because the syntax would be too ugly. On Friday evening, I decided to try to prove myself wrong.

You can download my Closures for CFMX library from the "Software" pod on my blog.

Read the comments in the index.cfm file for details on how to use it. Here's one example from that file:

<cfset doubler = cf.new("multiplier * arguments.n").bind(multiplier=2) />
<p>doubler.call(n=21) = #doubler.call(n=21)#</p>
<cfset calc = cf.new("multiplier * n","n") />
<cfset calc.name("do") />
<cfset triple = calc.bind(multiplier=3) />
<p>triple.do(14) = #triple.do(14)#</p>

You'll get 42 each time. No idea what anyone might want to use this for but it's "cool". Enjoy!


Peter Bell added a few comments including a link to Martin Fowler talking about closures. I figured I'd add an example showing how you might do similar things in ColdFusion with this library.

First off, you need a select function to match Ruby:

<cfscript>
function select(collection,closure) {
   var result = structNew();
   var e = 0;
   for (e in collection) {
      if (closure.call(collection[e])) {
         result[e] = collection[e];
      }
   }
   return result;
}
</cfscript>

Now we'll build a collection (a struct) containing some simple struct data elements:

<cfset emps = structNew() />
<cfset e = structNew() />
<cfset e.name = "Sean" />
<cfset e.isManager = true />
<cfset emps[e.name] = e />
<cfset e = structNew() />
<cfset e.name = "Matias" />
<cfset e.isManager = false />
<cfset emps[e.name] = e />
<cfset e = structNew() />
<cfset e.name = "Paul" />
<cfset e.isManager = false />
<cfset emps[e.name] = e />
Finally, we run the Ruby-like select method:
<cfset mgrs = select(emps,cf.new("e.isManager","e")) />
We create the closure to match Ruby's code block { |e| e.isManager } - we name the argument (the second argument to the new() method so it can be called without having to used named arguments - as the select() method expects.


September 27, 2006
There's always a lot of chatter around revenue models in the open source world. Red Hat recently purchased JBoss and it seemed - to me - like a promising consolidation of two big names in the open source world but it seems that Wall Street is not very happy with the union. I'm disappointed that Red Hat isn't doing as well as the market hoped. I'm a big supporter of open source projects and, whilst I have some reservations about the polish and documentation around such projects, I'd like to see Red Hat and JBoss succeed here. Both products are solid and, despite documentation concerns and, frankly, the insanely chatty logging of JBoss, they work pretty darn well.


August 27, 2006
For some reason I missed this when it was released (back in May I think) but Google Notebook is something I've been looking for for ages! When I'm browsing, I often see something interesting and want to make a note of it, with the URL etc, for future reference or blogging or whatever. I've always done this manually in the past, often copying the URL into an email and then copying the highlighted text into that email and leaving it in my drafts until I'm ready to use it. But that didn't really work for just keeping raw information and bookmarking all those pages didn't really help either since I'd end up with a sea of bookmarks and often have no idea why I'd bookmarked it months earlier.

Google Notebook installs into your (Firefox) browser and you just highlight text, right-click and add to your notebook. You can have multiple notebooks, different sections in a notebook and you can also make notebooks public.


August 26, 2006
Since many of the internal systems here actually require IE on Windows, I have IE as my default browser on Windows and Firefox on Mac. However, I just read about IETab on Joel Spolsky's blog and it seemed like the perfect solution: it uses the IE rendering engine inside Firefox on a tab-by-tab or site-by-site basis!

Now I can have Firefox as my default browser on Windows (yay!) and have it automatically use IE to render any internal Adobe sites. The only glitch I've found so far is that Java didn't run inside the embedded IE (but luckily you can just right-click on a tab and open the page directly in IE if this happens!).


July 27, 2006
Google is moving into the SourceForge / Tigris business: Google Code - Project Hosting.

As an experiment