Viewing By Month : October 2003 / Main
October 31, 2003
I subscribe to the CFLib.org RSS feed but, to be honest, not many functions grab my attention (so I'm old and jaded...). This one did, however, especially since it works with CF5 and therefore does not rely on CFMX's XML functions: TranslateRSSItems. Written by Jeffry Houser - a veteran ColdFusion author - this function takes an RSS feed and converts it into an easy-to-use CF query object. What really piqued my interest was how it worked without actually parsing the XML! It tokenizes the RSS data, using < and > as delimiters and effectively implements a SAX parser, processing opening and closing tags on the fly to extract the relevant data. Clever!


Christian Cantrell asks a very interesting question about the pros and cons of writing a single back end code base that is used by both an HTML and a Flash front end. He's thinking of building an application that is essentially a collection of web services and then building a Flash UI (using Flash Remoting) and an HTML UI (using CFMX to cfinvoke the same web services). Share your thoughts with him by commenting on his blog!


October 30, 2003
I've been meaning to recommend Brandon Purcell's blog for a while. Brandon is part of Macromedia's team of product support engineers and was instrumental in the successful launch of the new macromedia.com back in March. He has some really useful and insightful hints and tips on his blog - essential reading!
Recent posts cover the CFMX 6.1 Hot Fix (for data source connection pooling), performance of large structs and a programmatic way to refresh CF's Web Service cache. Brandon always has something interesting to say about using ColdFusion in the real-world.


Tonight Nathan Dintenfass gave a terrific presentation to the Bay Area ColdFusion User Group about Impart - a blogging system for ColdFusion MX.
Impart is an open-source project that provides a blogging toolkit with pluggable persistence, caching etc, using CFCs and also providing a custom tag layer to make the toolkit very, very easy to use.
Nathan talked about the design goals and the OO principles behind Impart and showed how the various layers are constructed - with many peaks under the hood at the (well-structured) CFC source code. He explained the various design trade-offs involved in his implementation and some of his ideas fo future development of the system.
It was an extremely worthwhile talk and I thoroughly enjoyed it!
During the post-talk Q&A session, there was quite a bit of discussion on the Eolas '906 patent issue. I pointed folks to the Active Content Developer Center on macromedia.com where they can find out more about the facts and the impact of the changes that Microsoft is planning to introduce to Internet Explorer.
Thankfully discussion quickly moved on to ColdFusion migration - someone wanted to know what people's experiences had been going from CF4.5 or CF5 to CFMX. Most folks very pretty positive about the upgrade process, saying their code ran with no changes, although a few gotchas were pointed out (e.g., multiple SQL statements in a single
&lt;cfquery&gt;
, dots in variable names). The general consensus seemed to be that if your CF code was reasonably well-written, the upgrade would be pretty painless.
Next month's BACFUG (in two weeks!) looks like being Brian Ghidinelli talking about Cascading Style Sheets. Incidentally, Brian's blog is built with Impart!
Decemeber's BACFUG (12/18) will be me, talking about Mach II.


I finally got around to downloading and installing MySQL 4.0.16 on my Mac. The package installers made this a piece of cake although the post-installation test instructions don't seem to be quite right somehow - I ended up needing to specifiy -u root -p where the examples didn't have it. Overall tho' it was a very easy install and I created a couple of databases and connected ColdFusion to them in a matter of a few minutes. Pretty impressive.
Why did I finally install MySQL? Well, I want to take FarCry v2 for a spin and it was either install MySQL or fire up my Oracle 9iR2 instance (which is a bit of a memory hog!). Watch this space...


It's been a while since I blogged anything about wireless networks but this is too cool to pass up. Intel have produced a Macromedia Central version of their HotSpot Finder. The really cool thing is that Central caches results so that when you're offline, you can open Central and access the HotSpot database locally!
It confirmed the HotSpots I already knew about in the various local McDonald's and also showed that my local Starbucks has WiFi. Near work, I was surprised to see that the CalTrain station has WiFi!


October 29, 2003
Sounds like Ben was part of a very different style of technical event in Brasilia and it went over very well! Having seen the passionate Brazilians at JavaOne, I can only imagine what it was like with comedians and a rock band... and Ben Forta!


October 27, 2003
I've just started work on an application that has several paths through the logic that all do something like:
  • perform some setup
  • scan a directory
  • process each file
The file processing is different for each directory but the setup and directory scanning are the same. Since I like to use CFCs extensively, I have a CFC that has a method to perform the setup (called init() of course) and then a method to scan the specified directory (scanDirectory()). I create an instance of this CFC for each directory (so that it can manage information relating to that directory as instance data).
I also have a separate CFC for each type of processing that is required. The scanning CFC creates an instance of the processing CFC - and stores it in its own instance data - and then calls processFile() on that instance. This means that the scanner CFC needs to know which processing CFC to create - an unwanted coupling that we need to implement carefully!

[More]


October 26, 2003
A resource I've been meaning to investigate for some time is the CFTagStore website. It's a store front for authors to sell their custom tags. It looks very professional and the documentation on the tags seems pretty thorough. Several of the interesting tags I browsed cost $100 which still has to be cheaper than developing them yourself. Worth a look but also check out free resources (see my ColdFusion Resources page).
Update: I've just been told that there is also a Free CFTagStore website that will focus on non-commercial offerings!


October 24, 2003
If anyone is interested, I'm prototyping a small extension to Mach II that will allow it to act as a back end for Rich Internet Applications. So far I have a core base component (FlashRemoting.cfc) that you extend for your application (as index.cfc or whatever) and then your Flash movie simply does this:
gwConn = NetServices.createGatewayConnection(
"http://{server}/flashservices/gateway/");
myService = gwConn.getService("myApp.index", this);
myService.handleRequest({event:"eventName"});
I'd be interested in feedback on what sort of API Flash developers would like to see...


October 23, 2003
Ever wanted to put an interactive Flash movie on your desktop? Or, better still, build a Flash application and distribute it as interactive desktop wallpaper to your clients? Check out ScreenTime Media's SWF Desktop! I just downloaded the demo for Mac and very quickly had two SWFs installed as desktops - a slideshow created with Flash MX 2004 Professional and my favorite "singing kitten" animation. The slideshow was fully functional with back / forward buttons and the transitions operating as expected. The singing kitten loaded and ran, with sound, perfectly! What a wonderful product!


Well, it seems to be official now... I'm speaking at MXDU 2004 about my current favorite topic - Mach II. According to current plans, I'll also be previewing a version of the talk to BACFUG in December (on the 18th) - for those Bay Area folks who can't make the trip to Sydney.
Since I was on the schedule for last year's MXDU but had to drop out at the last minute, I'm very excited to be asked back this year and I'm really looking forward to the event, as well as meeting several of the cfaussie mailing list denizens!


After the recent talk about certification exams, I was interested to see this great Central application from Andrew Muller (of Daemon) that provides a neat way of searching for Macromedia Certified developers worldwide.
A background task runs on the Daemon server that screen scrapes macromedia.com to get the data into a SQL Server database, then the Central app queries that database via CFMX. Very nice!


October 21, 2003
I finally got around to converting my bookstore from static HTML to a dynamic system, driven by XML. I've been meaning to do this for some time, so that it is easier to maintain the contents of the bookstore. I now have a simple XML file that defines sections, books, authors and keywords which I can update easily without having to worry about messy HTML code. The code that reads the XML is quite simple and I decided to write classes (in PHP) for the bookstore, section, book and author representations to make the manipulation of the XML easier. All told, it's about 400 lines of code that I will never need to change again!
This has allowed me to update the contents of the bookstore - finally - to include some ColdFusion recommendations, which was the main point of this blog entry!


I finally got around to trying one of the sample ColdFusion MX certification exams on Learn By Heart (from Webucator). I haven't read the study guide or done any other preparation - I just wanted to see how I'd do as a someone who uses CFMX on a daily basis. It asked a couple of questions on cfchart that I had no clue about and a couple on Verity about which I was similarly uninformed. Of the others I got wrong, two were careless errors on my part (from not reading the question carefully enough and answering too quickly - I finished the exam in 23 minutes), two were "oh, really?" moments where CFMX does something I wouldn't have expected and the remaining few were about specific tags / functions I have never used and so I guessed the wrong answer.
I passed. I got 80%. And I learned a couple of new things about CFMX (e.g., when you say queryname.field[n] inside a query loop / query output tag, it overrides the natural row ordering and always fetches row 'n', although I'd never write code like that).
Several of the code fragments that were presented - "what does this code output?" - were only tricky to decipher because they don't follow best practice (in fact, they were the sort of code fragments that should be taken out and shot!). This emphasizes the value of following coding guidelines: it makes it easier for other folks to figure out what your code does (and remember that 'other folks' may well include you in the future!).
The other observation I have is about questions that went after specific tags, attributes and function usage - if you're using an editor with code hints, these questions are a non-issue: you don't need to know the exact spelling of tag attributes or the exact order of function arguments because the editor suggests them for you. This emphasizes the value of using a code-aware editor (like Dreamweaver MX 2004 or HomeSite+ which ships free with DWMX2004 for Windows).
Got certification? - read more about Macromedia Certification in Tiffany Beltis' "Logged In" column.


October 20, 2003
Although Royale has not yet started its beta program, it is now accepting applications to join the beta program.


This interview with Bjarne Stroustrup seems to have generated a lot of heat on TheServerSide which has unfortunately devolved into Java vs C++ (again!). The interview actually has some interesting points to make. Stroustrup says that to be an effective OO developer, you should tread a middle ground between too abstract and too concrete - some things are classes but not everything - sometimes a struct is just fine. This has been something I've been seeing in some of the CFMX discussions of late: people who are new to OO try too hard to turn everything into a CFC and then wonder why their program is slow and complex. I've tended to advocate that not everything needs to be a CFC and even when you have a CFC for something, there are times when you don't need to use it. A good example is the concept of gateway objects for database access. Yes, you may well have a CFC for your business object (e.g., an article) but if you are retrieving articles in bulk (select * from ...) you don't need to convert the query object to an array of objects, simply to iterate over it and extract a few fields (via getters). The key is to choose the right level of abstraction in each situation.


October 17, 2003
I have just published Release 3.0.2 of the Web Technology Group ColdFusion MX 6.1 Coding Guidelines. You can get them from my site or you can read them on LiveDocs where you can add comments on the documents!
The Mach II Development Guide has also been updated (Release 1.0.2) and published to both locations.


October 16, 2003
Well, XForms is now an official standard. If you want to see how XForms compares with today's HTML forms, the W3C have written XForms for HTML authors which shows side-by-side code for each technology.
I still don't really know what to make of XForms... It's a great concept, separating the form display from the form logic and providing an XML-based model for packaging up the data but... Until it is supported native in the majority of browsers, I don't see it being very useful. Given that Microsoft aren't going to update Internet Explorer (until Longhorn in... 2006?), I can't see how XForms will gain much traction in the real world. The press release says XForms is "already widely implemented" but the implementations listed are mostly Java applications or applets which isn't going to bring XForms to mainstream websites, in my opinion. The best bet on the list seems to be the Mozquito DENG implementation which at least has a small footprint and works in any browser with Flash Player 6 or higher installed.


I'm pleased to announce that some former colleagues have created TTZ - a company dedicated to website localization and translation services. Uli, Marine, Magnus, Volker and Miki are all former Macromedians that did such a sterling job working on our various international websites so I wish them all the best in their new venture and have nothing but praise for them. If you're serious about an international presence on the web, check them out!


October 15, 2003
Just to give weight to IBM's classic piece of research (that around 15% of bug fixes introduce a new bug), my enhancement to add the current event object to the exception event object introduced a new bug! That new bug is now fixed. See my updated Mach II bug fixes page.


I don't do as much active development these days as I used to - many folks are in the same boat once they start to do more architecture and/or mentoring (and, heaven forbid, managing other folks!) - so I was pleased to get a small development project to work on this last week. Nothing fancy, just a small admin application for a couple of database tables and a web service to serve up the content. I tried to eat my own dog food, in terms of following the WTG Coding Guidelines and the Mach II Development Guide, and I think I've been successful (my code is going into QA tomorrow and will also be peer-reviewed shortly). It also meant becoming familiar with the day-to-day processes that other engineers here have to deal with like the Change Management system for database changes and so on. It's always good to get a little grounding!
Once the code of the application has been QA'd and reviewed, I plan to publish it (slightly modified) as an example of a Mach II application that uses a database per the development guide suggestions of gateway and data access objects. I'll also be publishing small updates to both the coding guidelines (release 3.0.2) and the development guide (release 1.0.2). Also, in response to several requests and after discussion with some internal folks, I will put the revised guidelines up on the LiveDocs system so that there will be a standard way to comment on the documents.


Perry (the webmaster for cplusplus.org) reminded me that his site is still redirecting to my site so there are, from time to time, various bewildered C++ developers finding themselves unexpectedly on my site instead of his.
I recently changed the root page of corfield.org to redirect to the blog since that's what most people come here for so I've just added a link to the C++ section of this site to the left navigation on the blog - hopefully Perry's erstwhile visitors will not be too disoriented.
Those who know me and my history will be well aware of my deep C++ roots and should not be too surprised at Perry's choice here. If you're new to C++ and you're curious, check out the cplusplus link.


October 13, 2003
Joel rails against exceptions in his latest blog entry which I find both surprising and disappointing. Normally, Joel has a lot of good insights but this post is way off the mark in my opinion. Exception handling has been added to most modern languages because the old approach - advocated by Joel - of returning error codes from functions creates ugly code and makes it hard to follow the 'successful' flow of the application. If a function has to return success / failure, then it can't also return a result value unless you either return a structured result (containing the success / failure code and the result - if successful) or you must always pass a result variable by reference as a function argument (something not even possible in every language). The trouble with error code returns is that nothing forces you to check them - you can always go straight to the result variable (because it "can't possibly fail in this case"). Your code ends up totally overrun with code to check error code returns and you can't see the straight line code any more...
By contrast, exception handling lets you cleanly abstract out the error processing. You can write simple, neat code that deals with the straight line case and bookend it with any necessary error handling (using try/catch). You don't even need to be aware of some error conditions - you can leave them for your caller to handle because your code just simply might not be able to do anything useful with the error anyway. Exception handling reduces coupling between components and lets you improve cohesion and reuse - because error handling doesn't have to be inherent to every single component you write.


October 12, 2003
If you're a German speaking ColdFusion programmer, you'll probably want to join the cfguru_de mailing list. This is intended to be an equivalent to the (closed membership) CFGURU list here in the USA, providing a forum for advanced technical discussion of ColdFusion and JRun related material. Like CFGURU, there is also an associated blog (although it has nothing posted in it yet).


Nice to hear Jesse saying something nice about Macromedia technology. It'll be nice once Royale gets a little further down the line and we can start talking more about it!


October 10, 2003
Extensions published on the Macromedia Developer Exchanges now show up in general search results on macromedia.com so you no longer have to dig around in the Developer Exchanges to find things. Try this search for cfx image and you'll get a good selection of extensions as well as the usual list of articles etc.


October 9, 2003
I've just posted fixes to a couple of minor Mach II bugs. One bug was reported on the forums (duplicate calls to configure() for plugins and listeners). The other bug was more of an enhancement - if an event throws an exception, it is useful to have that event available in the exception event for more sophisticated processing of the exception. This was requested by one of my colleagues who busy building a complex Mach II application!


October 8, 2003
I've made some minor updates to the coding guidelines and re-published them as Release 3.0.1. Check out the revision history to see what's changed. Many thanx to the folks who contributed feedback!
The new coding guidelines also include Release 1.0 of the Mach II Development Guide. Many thanx to my colleague Seth Hodgson for the input on and review of the Data Access Objects section!
As always, your feedback is welcomed by email or as comments here.


Fusion Authority has just published a report of the 2003 Fusebox Conference written by James Husum and Mike Brunt. Another reminder that it was a great conference!


Brandon Purcell has a great blog entry about cloning ColdFusion MX applications and deploying them as EAR / WAR files to any J2EE server. The example he gives is developing a CF application on Windows and then deploying to Linux without having to install CFMX itself on Linux. As he points out, by using the pure Java installer on your development system, you can use any J2EE server for development and easily use a different J2EE server for deployment to testing and/or production servers.


October 7, 2003
The "almost final" draft of the Mach II Development Guide is now available. Please send me your feedback (or add comments to this entry).
I've also updated the EventToRequest and RequestToEvent filters and added two new filters (described in the Development Guide). You can get these from my downloads page.


The lack of posts since Friday (and probably for most of this week) is because my wife & I flew to Chicago for a cat show and, while I was there, I spiked a high fever on Saturday and have been miserably sick ever since. It was a very unpleasant flight home with such a bad head cold and congestion!
I'll be posting some new Mach II filters shortly (written during the cat show!) and an "almost final" version of the Mach II Development Guide. I'm hoping to get the "final final" version posted tomorrow.


October 2, 2003
About a month ago I mentioned Black Knight which was under development at the time. Montara Software have now released the Black Knight product. Check out the tutorial to see how easy it is to use .NET code from ColdFusion with Black Knight!


October 1, 2003
Much as it pains me to mention sys-con (I get endless unwanted free copies of their magazines and every now and then I get a flurry of unwanted email newsletters from them that always take several complaints before they stop!), there is a good article from Hal and Ben in the latest CFDJ about Mach II.


Sorry for the lack of posts recently. I've been busy tidying up a number of loose ends at work and my weekends have been taken up with cat shows and other cat-related travel.
Today I've gone over the ColdFusion and Mach II sections again making a few small changes and updates and I've added a Mach II Downloads page. In addition to my MachWiki sample application, it has a couple of useful filters. I'll be adding more in due course.




Hosting provided by