Issue with jQuery sortables

by Neil Middleton 10:43 am Monday, 28 January 2008.

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:

[viewcode] src=”2008/01/sortables.txt” geshi=js [/viewcode]

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.

Comments (0)



Is ColdFusion a dirty word?

by Neil Middleton 1:59 am Friday, 25 January 2008.

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.


ColdFusion, PHP, ASP.NET Job Trends graph

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.

Comments (0)



Speaking at UKCFUG next week

by Neil Middleton 1:14 pm Tuesday, 22 January 2008.

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

Comments (0)



ColdFusion Code highlighting with GeSHI

by Neil Middleton 11:24 pm Monday, 21 January 2008.

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.

Download CF8 GeSHI Language File

Comments (0)



Getting the Flash player version number with jQuery

by Neil Middleton 5:12 pm .

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:[viewcode] src=”2008/01/flashplayerdetect.js” geshi=js[/viewcode]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.

Comments (0)


Older Posts »