An Architect's View

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

An Architect's View

Entries for month: October 2003

RSS / Query UDF

October 30, 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!

Tags: coldfusion

HTML / Flash - Sharing Common Code

October 30, 2003 ·

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!

Tags: coldfusion · mx

Brandon Purcell - a Must-Read 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.

Tags: coldfusion

BACFUG : Impart - a CFC Case Study

October 30, 2003 ·

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.

Tags: coldfusion · bacfug

MySQL 4.0.x

October 30, 2003 ·

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...

Tags: osx · programming · coldfusion

Central WiFi HotSpot Finder

October 30, 2003 ·

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!

Tags: wifi · mx

Forta Rocks in Brazil!

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!

Tags: coldfusion

Reducing Coupling

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!

[Read more →]

Tags: coldfusion

Custom Tag Store

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!

Tags: coldfusion

Mach II & Flash Remoting

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...

Tags: coldfusion · mx