Rare footage from the Scotch on the rocks team:
Issue with jQuery sortables 1
I've just been spending a load of time with the jQuery UI library and more specifically the sortables extension. What this allows you to do is specify a list of items on your page as sortable, and then every item becomes draggable to re-sort the list as per the demo's here.
However, I've found an issue with the extension in that the update property doesn't fire when the sorting is done by the user (which is said to have been fixed in the next release). For me, this is a showstopper as I need to know the new order immediately, which means I've had to go elsewhere for my sortable lists.
Enter script.aculo.us, the UI extension for the good ol js framework prototype. This supplies much of the same functionality of jQuery UI, but in a much larger package (127K vs jQuery's 70Kb for the same functionality). So how do you work sortables in script.aculo.us?
Well, see the following code:
[The requested file http://neilmiddleton.com/Mods/http://neilmiddleton.com/Mods/2008/01/so rtables.txt could not be found]
This will provide you with pretty much the same functionality as the jQuery option, but will successfully fire the update function when sorting is completed. For more information see here.
Is ColdFusion a dirty word? 12
I've just got back from London's installment of the Flex 3 / AIR pre-release tour at the UK Flex user group in Shoreditch. Around 200 people turned up to listen to James Ward and Serge Jespers from Adobe talk about the upcoming Flex 3 and AIR releases. During the two hour session, BlazeDS was also covered for an hour (for some strange reason).
However, something got me (and a few of the other guys there) and that was the way that the Adobe guys talked when referring to the server-side. Only once throughout the entire session did either of the Adobe evangelists mention the C word (i.e. ColdFusion). To add to it, two demos were done of server-side interaction with Flex. One was in PHP, and the other Java. At no point was CF mentioned when in both cases it was an ideal platform (and a sister product).
What's with this? Adobe had the perfect opportunity, a room of a load of Flex developers, few of which were CF developers, who could have been told that CF was the ideal companion to Flex....or do Adobe not see it that way any more? Would they rather not mention it outside of the CF community?
I was also somewhat surprised afterwards when talking to some of the other Flex developers at the session. When told I was a ColdFusion developer most of the time, the response was generally one of surprise. Some of the comments made implied that these guys (who are surely in the Adobe / MXNA arena quite regularly) were somewhat surprised CF was still actively used.
This got me wondering, why is this? Well, I took a quick look at indeed.com's job trends graphing system for some sort of ideas as to the usage level with what seemed to be flavour of the night, PHP.
Here's a chart showing the mentions of three technologies in job ads in the US over the last three (ish) years, ColdFusion, PHP and ASP.NET. Something for me stands out here, things are on the up for PHP and ASP.NET. Now bear in mind that the market is growing every day, more and more web developers are working worldwide than ever before so I would expect to see a growth. But...CF is a flatline. Surely this means that the number of ColdFusion jobs out there is actually diminishing as a percentage share of the web development market? Surely this means that ColdFusion is going backwards? I would hazard a guess that all those guys in the CF arena are those who have been using it for more than 3 years, and are perfectly happy with it, as they should be. It looks to me like there is no growth in the ColdFusion job market, and after seeing how the evangelists market it outside of the community, I'm not surprised.
Now, I'm not planning on kicking off a whole new "Is CF dead?" thread, they are largely a waste of time, but I do wonder if sometimes Adobe would rather it just went away leaving them to reap the rewards from the Flash Platform (the reason they bought Macromedia) and PDF and the creative tools.
As a footnote, I'm a ColdFusion developer, I have been for years and I like using it. I also have no problem finding new jobs.
Speaking at UKCFUG next week
Next Thursday I have been asked to present at the UKCFUG on the wonderful subject of jQuery.
During the session I will be talking about the library itself, what it's for and what it can do. I'll also be talking a little bit about the extensibility of the library as well as giving a demo of some of the capabilites and how easy it is to use.
For more details (location etc), visit the UKCFUG website
Does the time you blog make a difference? 3
Here's something I've been mulling over for a few months now and I'd be interested to see what other people make of this. For those that don't know I am a developer form the UK, which means that I am at least 5 hours ahead of most of my counterparts in the industry (i.e. those in the US). Therefore, I am normally reading my feeds at around 4am Eastern and having lunch at around 9am Eastern. This means that my working day (and also the time that I tend to blog more is out of sync with the majority of my readers.
So, let's say I blog something at lunchtime (local), this will hit the aggregators first thing in the morning for most people in the US. If I do it in the morning (local), I'll be talking to all the nighwatchmen in America.
Question is though, do people find that this makes a difference to how much traffic they might get on a post or not? When do you tend to post your own items on your blog? Does aggregation make a big difference to your initial traffic?
ColdFusion Code highlighting with GeSHI 6
If like me, you are a ColdFusion developer using Wordpress as their blogging engine, you might have a need to occaisionally put code samples into your blog posts. With tools like Ray Camden's BlogCFC and ASFusion's Mango, this is very easy as they have been designed to do this from the start. However, in Wordpress you need to do some fiddling first.
Ultimately there are a few code highlighters out there that you can use, and I have chosen to use CodeViewer, which lets me upload files of code that then get converted into a nice highlighted form. From here I have a variety of options of things like allowing you guys to download that code in it's raw form. The highlighting is done via another plugin called GeSHI, the Generic Syntax Highlighter. This is a long term open source project designed to create a PHP based syntax highlighter that can be used from a number of other applications (such as Wordpress) and supports a vast range of languages such as AS3, T-SQL, ColdFusion and others.
However, after saying all this, the currently bundled CFML parser does not contain any of the new CF8 syntax, and has only a limited number of attributes listed. Therefore, I have sat down and updated the language file to include all CF8 tags, functions and attributes, which means that should you be using GeSHI, you should have no real problems with any of the new CF8 syntax.
To download the file, click here. I have also sent off the file to the GeSHI admins in the hope that they can include it in a future release. If you can see any problems, and need some help, please don't hesitate to contact me.
Getting the Flash player version number with jQuery 2
Earlier today a collegue asked me how to retrieve the version number of the flash player that was installed in the users browser. Initially this is impossible with jQuery out of the box, but is easy but utilizing the brilliant jQuery plugins structure.To start off, you need to utilize the jQuery Flash Plugin. This plugin allows you all sorts of interaction with the Flash Player and creating and modifying flash objects on the page.So, once this is in place, include the script in your page, and then run the following code to return the version number:
[The requested file http://neilmiddleton.com/Mods/http://neilmiddleton.com/Mods/2008/01/fl ashplayerdetect.js could not be found]
This will return you the string of the version number for flash (major.minor.revision). Should you wish to break this apart simply split() as needed.
New blog skin….but do you care? 5
Today I rolled out my new blog skin for neilmiddleton.com. I did change it a few weeks ago but I was finding quite hard to read and quite crowded. For me, what I have now has a little more thought behind it, and it is more intuitive.
But, when I was working on this I had a thought. How many of you out there actually care that I even have a blog style? I would have thought that on the modern semantic web most of you will be reading this in various feed readers, or aggregators like feed-squirrel.com, therefore, to you I am merely a paragraph of text.
Some people spend ages working on their blog designs, working it up from a clean sheet of paper to a implemented design and for me this makes sense coming from a design background. However, if you are like me, you download and tweak one of the many designs already out there.
But, and here's the question, does anyone really care?
Mach-ii Application Skeleton
Yesterday, I went to download the Mach-ii application skeleton, which you need to create a new Mach-ii app. However, since the framework move to 1.5, the old skeleton has been the only one available (a 1.5 version is still in the works, but very close).
So, if you require the skeleton and can't find it (it's not overly clear), it can be found here.


