Shaun Mccran

My digital playground

01
O
C
T
2009

Introducing third party applications into your frameworks, good practice?

A recent development involved some changes to a large script that was using a product called ImageMagick (link). It is an image manipulation tool that allows you to perform transformations and other actions on image files. The product seems stable enough, and can be executed from a web interface using cfexecute, in a kind of command line prompt method.

It got me thinking as to why the application wasn't using cfimage, and then lead me to examine the wider topic of whether to use ColdFusion's in built functionality, or opt for other third party products.

I can think of a few obvious deciding factors for both pro and con, the first that springs to mind is performance.

Is there a marked performance difference between a ColdFusion function, and the third party application? Is it better to pass the load of to the operating system, rather than have ColdFusion perform whatever processing function it is supposed to do? In this case it would be a race between cfexecute, and cfimage, so there may be very little difference in it.

The second major point that springs to mind is the knowledge base of the developer, and the structure of whatever framework you are using. What I really mean by this is 'if your chosen technology can perform a function, why not utilise it to its full potential?' . It seems a bizarre choice indeed to deliberately not harness a function that your platform can already provide, and instead introduce another code base or application into the framework.

It also introduces another hurdle for the development staff, they may well be familiar with how an existing Tag works, but be totally unaware of the third party application, as was my case here.

A long winded intro, but here is the code I used:

view plain print about
1<!--- setup vars --->
2<cfset variables.destination = "C:\dev\images\testimage.jpg">
3<cfset variables.source = "C:\dev\images\testimage.jpg">
4<cfset variables.width = "100">
5<cfset variables.height = "100">
6<cfset variables.exec = "C:\dev\apps\imageMagick\convert.exe">
7
8<!--- executing an external application version --->
9<cfexecute name="#variables.exec#" arguments="-size #variables.width# #variables.source# -geometry #variables.height# -strip #variables.destination#" variable="imageinfo" timeout="3" />
10
11<!--- CFimage version --->
12<cfimage source="#variables.source#" action="resize" width="#variables.width#" height="#variables.height#" destination="#variables.destination#">

28
J
U
L
2009

An exploration of automated stress testing tools

Recently I was looking at the scalability of a web platform, and had to perform some stress analysis on it to evaluate whether or not it would accommodate the potential user base for a new application.

The idea was to pose the question:

"N percentage of web pages should load in X seconds, with no more than Z percent errors."

[ More ]

10
J
U
L
2009

Upgrading Blog CFC from 5.8.001 to 5.9.3.006

I've been having the odd database login problem, and RSS feed issue when this site gets spidered by search bots. I can't really give my web host much grief about it as I don't know if either of these issues have been fixed in newer releases of Blog CFC.

So last night I set about upgrading to the newest release. Now like most developers I rarely find that an application does exactly what I want out of the box, so I had modified several small areas of the installation to suit my needs. This left me with the dilemma of not being able to just copy the new code over the top.

There is a tool I have used in the past called Beyond Compare from Scooter software http://www.scootersoftware.com/. It is a file and folder comparison tool that allows you to enter individual files and resolve potential conflicts at line level if need be.

After an hour or so of running through the newest release of Blog CFC, which you can get here, http://blogcfc.riaforge.org/ I had merged in all the new change sets into my base code, and run the database scripts and bingo! I was up-to-date. Far more easily done than I would have thought.

My only gripe is that he wrote SQL change scripts for mySQL rather than MSSQL, but then that's just personal preference.

It would be nice to have an entirely separate skinning module, that way you could just replace code bases, but if you are running your Blog then chances are you can deal with that.

23
F
E
B
2009

Source control client for Photoshop

I already use tortoise SVN and subclipse for Eclipse as a source control plugin. This handles the code base nicely, but I was recently sent this link for an ex-work colleague.

Pixelnovel is a web based source control application designed for photoshop.

It looks like a basic version is free, so I think I'll give it a whirl....

_UNKNOWNTRANSLATION_