An Architect's View

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

An Architect's View

Entries for month: July 2004

Vacation Time

July 27, 2004 ·

I'm heading out to Montana tonight for a friend's wedding. I'll be back at my keyboard some time on August 4th. No blogging for a week.
We're driving - it's just under 1,100 miles - and we'll be going through Reno, Elko, Twin Falls, Idaho Falls, Butte and ending up at Boulder Hot Springs. When I get back I'll be able to add two more states to "my travels" map!

Tags: personal

CFMX J2EE Install Without 'jar'

July 27, 2004 ·

If you want to install CFMX J2EE edition on an existing J2EE app server but that machine doesn't have the 'jar' command on it, you can still do it without downloading the Java SDK!
JAR / WAR / EAR files are really just ZIP files. So run the CFMX installer, select J2EE, select WAR (unless your app server only accepts EAR files - WAR files are easier to unpack / deal with). When the installer is done, you'll have a directory containing cfusion.war and rds.war. Rename both of these to have an extension of .zip instead of .war and now you can simply unzip them (you do have winzip, right? If not, it's a nice small download to get a trial version) into the appropriate directories.
A quick recap on the JRun-based CFMX install: use the JRun Management Console (JMC, the admin server on port 8000) to create a new server instance; manually create a cfusion directory and a CFIDE directory inside that new server directory and unzip into cfusion and into CFIDE; remove the default-ear directory from that server (habit, I can't quite remember why I do it but I seem to remember that it avoids a potential conflict with something); finally use JMC to start the new server instance and off you go!

Tags: coldfusion

Flash 7.2 Updater

July 26, 2004 ·

Macromedia - Developer Center : What Is the Significance of Ellipsis? Ellipsis is the Flash 7.2 Updater. Read what Mike Chambers has to say about it and update your copy of Flash MX 2004 today.

Tags: mx

More on the Blackstone Event Gateway

July 24, 2004 ·

About a month ago, I talked about the Blackstone event gateway and the JMS subscriber I'd built using it. I've been experimenting some more with the gateway, looking at the sorts of things you can do and have recently written an IRC bot using it. IRC - Internet Relay Chat - is the predecessor of the various instant messaging systems we all use today and a bot is a program that joins a chat room and can interact with other users. Some of you may have seen SmarterChild on AOL Instant Messenger (if you haven't, add SmarterChild as an AOL buddy and send it messages...). Macromedia's Web Team has an IRC server with a number of chat rooms that we use to coordinate releases, discuss projects etc - all internal to the company so it doesn't create security risk (you don't discuss confidential information over AIM, MSN or Y!M I hope?).
I started out with PircBot, a popular Java implementation framework for writing IRC bots. That meant I only needed to write about 100 lines of Java to complete the "IRC bot gateway". I wrote an IRCBot class to extend the PircBot framework, an IRCBotGateway class to implement the Blackstone event gateway, a configuration class to encapsulation the bot's property file and a gateway helper class. The latter can be retrieved from the gateway by the CFC (using a new built-in function) and allows the CFC to make calls back into the gateway code - in this case it allows my IRCBot CFC to send messages and perform "actions" directly against the PircBot framework. The CFC has a single method that is invoked automatically by the gateway every time anyone says something in the chat room. The method is passed information about who said what and then decides what to do about it. It returns a structure containing data that the gateway uses to decide what to do next. I chose to allow three options: the method can be silent (effectively ignoring what was said), return a message (which the gateway sends to the chat room) or return an action (which the gateway sends to the chat room). Most bot reponses can be handled simply through the return structure - the helper class allows the bot to send other messages or take other actions before returning.
My bot doesn't do much right now but since all the parsing and response logic is in ColdFusion, it's easy to program pretty much any behavior! So far it just remembers the last thing each person said and when they said it so it can respond to the question "seen {username}?" - it responds that "{username} was last seen at {time} saying {message}" which can useful if you join a chat room and want to know if someone is around and actively chatting.
The nice thing about the event gateway system is that once you've written the Java code to handle a particular protocol, you can reuse that with different CFCs and configuration files to achieve pretty much any behavior you want for that protocol.
Once Blackstone has been released, I'll probably make my IRC bot available as an example.

Tags: coldfusion

Eclipse & CVS

July 23, 2004 ·

I finally got around to setting up CVS support in Eclipse for a couple of projects I'm working on. I'd already got Eclipse projects set up for the directories and I'd been using a separate CVS app to update / commit so persuading Eclipse's CVS repository to overlay my local projects wasn't intuitive and Eclipse gave me an error about directories but it still went ahead and bound the project to CVS anyway. Creating new projects with CVS support already configured seems much easier and I'll probably make sure I do that in future!
Anyway, what have I got for my efforts? Stunningly simple yet extremely comprehensive CVS integration. Wow! The Navigator View shows CVS versions and whether files are up to date or not. The context menu on files offers a very rich set of CVS-related commands and the Text Compare (between versions) is very slick too.

Tags: programming · coldfusion

CFEclipse 1.1.15

July 23, 2004 ·

cfeclipse: CFEclipse 1.1.15 released: I'm very pleased to see the CFC Method View enhanced to have an alphabetic order toggle as well as double-clicking a method now taking you to the source of the method (both enhancements I requested so kudos to the CFEclipse team for a speedy response!). The color-coding seems to work pretty well (I've gone for soothing greens and blues). Other features and fixes are listed on the web page but they're mostly not things I'd use - YMMV, e.g., the "Jump to end tag" feature might be very useful for a lot of folks.
The new "Scribble Pad" feature is interesting although I can't get it to work. It allows you to quickly test fragments of code without ending up with a directory full of short test pages - nice idea! I already have a project defined over my web root so I can't define a separate "Scribble" project in the web root - I tried setting the preference to use the existing project for the scribble pad but F8 doesn't bring up the scribble page. At least, it doesn't on my Mac. And I couldn't find how to change / check the assigned function key because I can't find how to access the scribble functionality from the menus. Oh well. Definitely a nice idea tho'.
Looks like the Browser View / CPU usage issue didn't make it into this release (based on my preliminary testing and the brief "Bugs Fixed" list on the website).

Tags: cfeclipse · coldfusion

Useful JRun / CFMX Enterprise Links

July 22, 2004 ·

gregs - server - jrun - JRun resources - Helping me remember what I figure out: this is a very useful collection of links to important resources for anyone running ColdFusion MX but especially for the Enterpise Edition since it covers JRun stuff as well. Looks like there's a blog associated with the site too but I couldn't see an RSS feed link unfortunately...
Update: The RDF/RSS feed is at

Tags: coldfusion

ECMAScript for XML (E4X)

July 22, 2004 ·

I saw the big press release a few days ago and everyone's blog picked up on that but no one seemed to talk about what E4X will do. Officially designated ECMA-357, you can read the ECMAScript for XML (E4X) Specification to see that it adds several new syntax elements for handling native XML documents in an intuitive way. It's based on BEA's scripting extensions so it's already been tried out in the field, which is always encouraging for a new computer language standard!
In E4X, you can now specify XML literals that create fully-formed navigable XML structures behind the scenes, and you can traverse these structures using notation similar to XPath, with dots used instead of slashes:
var over27inEng = empdoc..employee.(department.@id == 500 && age > 27);
This will return all employee nodes (like //employee in XPath) which have:
  • a department child with an id attribute equal to 500 and
  • an age child with a value greater than 27
Powerful and fairly intuitive - a little knowledge of XPath is needed but it doesn't seem much of a learning curve.
I look forward to seeing E4X support appearing in various implementations of languages based on ECMAScript!

Tags: programming

CSS Training Course

July 21, 2004 ·

Having seen Sandy Clark in action talking about Cascading Style Sheets, I was very pleased to see that TeraTech Training now offers a comprehensive 4-day course on this subject! The course covers a huge variety of material from an introduction to web standards and CSS right through to the intricacies of browser quirks and the "IE7" CSS package that makes IE6 more standards-compliant.
Note: TeraTech are also offering a one-day Mach II training course from Hal Helms to give developers a fasttrack way to learn Mach II. At just $349, this sounds like a bargain to me - and it's the Monday after Fusebox 2004 so you can easily combine the two events for very little additional outlay!

Tags: coldfusion · programming

Fusebox Explorer for DWMX2004

July 21, 2004 ·

Dynamic Code Insighting - Steve Nelson's Personal Blog: Steve Nelson and others are building a tool for Dreamweaver that does some very sophisticated things for Fusebox developers. The project is hosted on CFOpen which is a nice touch since it opens it up for collaborative development. I found this link through John Beynon's blog where he says that this single tool has enabled him to move back to Dreamweaver from Eclipse!

Tags: fusebox · coldfusion