Rob's tech blog...

How I got started in ColdFusion...

I'm a day late to the party but, at Steve Bryant's suggestion here you have, less a quick overview of my CF origins and more a comprehensive history of my time online and in code.

Read the rest of this post »

Please don't default to GPL

This post may seem odd to anyone who knows me. I'm a massive advocate of open source software and free (as in speech or beer - hey it's free) technologies. I'm no FSF zealot but I do believe that sharing source code, development tools, libraries even the platforms on which they run is a great way to encourage innovation and produce amazing projects. That said I'm increasingly running into issues with one of the most common open source licences - GPL (v2 or v3). One of the main implications of the GPL is that including code licensed under this model requires that the calling application be licensed under the same model. For ColdFusion this has some interesting and awkward implications.

Read the rest of this post »

Scotch on the Rocks 2011 – Day 2 – Expand your mind with noSQL and then relax on the CouchDB - Mark Drew

Final day, final session and the gods of tech had intervened by killing Mark’s laptop first thing Friday morning which meant I was able to go and see his presentation* in place of the EHCache session I was due to see. NoSQL and I have a love hate relationship – I’d love to be able to use it and hate that I can’t. That said, Mark’s preso covered the basic issues surrounding relational databases in the modern world and how poorly a lot of data fits into the table / join concept as well as pointing out the differences in some of the common NoSQL alternatives. After a global overview (which given the amount of data and the number of platforms was pretty impressive in itself) Mark moved onto the specifics of CouchDB and the ease with which a quick Key Value data store can be setup. I was already aware of the RESTful nature of the platform but didn’t realise that this protocol was used by everything (client tools, replication, the works). It was quite impressive to see the JSON being returned live with the listener requests and the act of inserting data, attachments etc. was demonstrated very quickly and cleanly. One thing I thought about later was, considering the issues surround ColdFusion and the inconsistencies in serializing / deserializing data to and from JSON had any one actually tried this against a CF server? The replication demo was fantastic (fully replicated servers in ~ 10 seconds) and certainly raised some eyebrows amongst those (myself included) who’d setup MySQL replication. The big issues surrounding alternate data stores  will be present for some time yet but Mark gave us a 60 minute, whirlwind around what the future should look like for a lot of apps and did it all (well most of it) with a pint in his hand! Scores (out of 10) Direct Professional Value: 9 Ongoing General Value: 9 Contention / Debate: 8 Style: 10 Overall: 9 *Rumours that I was seen lurking around Mark Drew’s laptop with a magnet on a fishing rod are total fabrications and it’s just a happy coincidence (for me at least) that I managed to see his fantastic preso.

Scotch on the Rocks 2011 – Day 2 – AJAX Longpolling with ColdFusion 9 and BlazeDS – Stephen Moretti

Cor blimey day 2 was technical! And Steve’s session was easily the most in depth of any I saw over the two days. Long polling is pretty well established as a technique and the use of BlazeDS to handle the connection is something that everyone talks about doing but very few actually implement. In a great preso, Steve ran through the basic of the concept and quickly jumped into code to setup the BlazeDS configuration, the Event Gateway to wire it all together and the basic AJAX / jQuery client to send the messages. I’ll be frank and say that a lot of the configuration was lost on me – it’s the kind of thing I’ll always have to look up in the docs as I’m never going to be doing it regularly but the actual concepts were neatly outlined. Some of the gotchas were also well worth hearing about: the blocking IO model in BlazeDS, the need to separate out onto a different server to prevent long polled requests exhausting your app server thread pool. I was also really impressed to see a very technical demo, running on Ubuntu and pretty much live coded (a fair whack of copy and paste but built up over the hour) – all of this from a guy who could barely stand for the 2 days of the conference! Scores (out of 10) Direct Professional Value: 6 Ongoing General Value: 8 Contention / Debate: 5 Style: 8 Overall: 6.75

Scotch on the Rocks 2011 – Day 2 – Building a Video Platform: ColdFusion, HTTP Dynamic Streaming and OSMF – David Collie

Another very relevant session and one which I was a little worried about given my lack of ActionScript experience. I need not have worried. David and Andy Wallace*... the other guy (terribly sorry but I missed the intro’s as the session started on time ... come on, this is SOTR! You’re not meant to start on time!) ran through the OSMF and the Dynamic Streaming Module by way of a demo video portal built in flex. The software demo’d was really impressive when you consider that Flash Media Server would have been needed to do a lot of this in the past. Basically the “Packager” (a command line tool) takes Flash video(s) and chunks them for dynamic streaming. The OSMF player SDK allows you to build a video player which supports all of the features of the chunked video including manifests (playlists), enforceable “no scrub” vids for advertisements etc. as well as supporting auto bandwidth switching based on available network capacity - assuming you’ve encoded multiple band width versions of the video. Considering the breadth of the topic the session was concise and the demo’s intuitive. It was more of an introductory overview of the different apps and products but, to someone who’s looking seriously at video and the best way to process it from within the Adobe tool set, is was well worth the hour spent. Scores (out of 10) Direct Professional Value: 9 Ongoing General Value: 10 Contention / Debate: 4 Style: 7 Overall: 7.5 (weighted to 8.5) * apologies to Andy Wallace for not a) remembering your name or b) actually looking it up and thanks to both David and Andy for a great presentation!

Scotch on the Rocks 2011 – Day 2 – Easy Validation with ValidateThis – John Whish

The first session of the day and the first that had direct business relevance (as in “we’re going to be using this in about 2 weeks” relevant). After missing the Railo Keynote due to the pressures of breakfast and an extra 10 minutes in bed I was in place for John’s session nice and early and I’m very glad I made the effort. Validate This is one of the technologies that I’d looked at but not really got on board with, mostly because of the (incorrect) perception that it required you develop in OO ColdFusion to work. Following a brief introduction to the Framework (jQuery) and the engines it supports (Adobe ColdFusion, Railo & Groovy) John proved my first assumption wrong – Validate This can be used to validate outside of objects using the FORM scope or even JSON calls as the basis for rule application. Oh and it supports jQuery 1.4 & 1.5. John moved quickly onto the guts of the framework showing how a singleton instance of ValidateThis can be passed rules in XML or JSON via a parameter to the constructor of the base class. For those using it in an OO environment, Validate This also supports annotations in the objects to be validated. On the client side, standard validation messages are supplied which can be overridden as needed. The messages can be output in different locations by adding a <cfoutput /> to the code on the server-side. A couple of other notes: Validate This currently uses isValidEmail() for email validation which is less than ideal as it’s a pretty basic ruleset but it can be easily overridden to employ your own regular expression. One great feature that I wasn’t aware of is the support for “Contexts” in forms which allow you to use the same rule sets but apply some of them depending on the context of the data you’re validating. The example of “User Registration” vs “Login” form is a great way to promote a feature that really embodies the kind of DRY techniques that make this kind of framework worth using. Other little tidbits? Of course JS is case-sensitive but having it raised as a gotcha was handy. As was the highlight of the “ignore” class which allows an item to be validated purely on the server-side (great for hidden fields). Finally John pointed out that the validation instance can be injected back into the business object to provide access to validation from within the object itself … which is very cool indeed! I’ll be working more with validate this over the next few weeks but this session was a great into. (Note: John’s presentation is now online at http://www.aliaspooryorik.com/blog/index.cfm/e/posts.details/post/305 ) Scores (out of 10) Direct Professional Value: 10 Ongoing General Value: 9 Contention / Debate (inv): 9 Style: 9 Overall: 9.25

Scotch on the Rocks 2011 – Day 1 – FW/1 – The Invisible Framework – Sean Corfield

This fairly well attended session focused on some of the basic features and driving requirements behind the framework running through the controllers, views, layouts and the flexibility inherent in FW/1. The more advanced information came as results of questions from the floor which Mr. Corfield dealt with in a brisk and technically expert manner (would we expect anything else?) Some items were new to me (caching for example and how this can be disabled if needed) and some were known (the layout cascade and the overrides available) but in terms of a good 1 hour grounding in the framework the session did exactly what it said on the tin. In all honestly the real value of this session was in the debate and discussions afterwards (both sensibly at lunch and less sensibly at dinner and after) where I got to chat on the subject of Frameworks with my fellow attendees and got some great feedback on full stack vs lightweight frameworks and the fit for various projects / phases. That said I will continue to follow FW/1 with interest and will use it where appropriate. I’m especially pleased to see FW/1’s adoption by Mura is bringing new power to a pure ColdFusion CMS – which can only be a good thing! Scores (out of 10) Direct Professional Value: 5 Ongoing General Value: 6 Contention / Debate: 9 Style: 8 Overall: 7

Scotch on the Rocks 2011 – Day 1 - Requirements and Estimating – Peter Bell

Peter’s session resulted in 6 pages of notes, which I won’t go into in masses of detail (yet). Suffice to say there was a massive amount of technique rammed into 1 hour starting with Intent Driven Design as a mechanism for requirements gathering. The basis of this technique is the derivation of Business Intent (the Why of a project) which can determine the driver behind development. Generally speaking, one should avoid projects that introduce more than 5 Intent items as a greater number would denote the need for breaking down a project into further phases or units. The next concept introduced was that of Audiences (the Who of a project) which is fairly easy to understand. These audiences or roles are the functional groups in a project, the user types, the interested parties. Drilling down into the project Peter explained the use of User Stories to identify specific requirements. Effectively User Stories can identify areas of Shared Need within a project. As User Stories are well known and well documented online I’ll skip the next couple of pages of notes highlighting only that Peter recommends the batching of 0 point tasks into a single story with a value for use in estimating. The use of Stories and IDD in terms of production of estimates and trackable units was of great interest to me as was Peter’s focus on the functionality side of a project. The basic concept of build something you can use to fulfil the requirements and worry about making it look good or work more easily sounds commonsensical but is so often over looked! The only downside to Peter’s otherwise brilliant preso was the assumption (or hope?) that we all live in a world where we can afford to say to our clients “Pay me to estimate” all too often good estimating techniques fall by the wayside due to pitch / profit issues. Anyway back to the session, Peter introduced the concept of planning Poker (a bit gimmicky?) and the more useful (for me anyway) Magic Estimating technique which I will definitely be introducing at our larger project kick offs. The tongue in cheek mention of APIs (muted groans from around the room) as the feature that always takes at least twice as long to build as expected was part of Peter’s section on feature types which, whilst a little cynical was pretty much bang on for 99% of the features in any project I’ve ever worked on. A final wrap up of the Iron triangle and the introduction of buffers and the first session of the day came to a whirlwind stop. Scores (out of 10) Direct Professional Value: 8 Ongoing General Value: 9 Contention / Debate: 5 Style: 10 Overall: 8  

YubiKey-CF - ColdFusion Wrapper For the YubiCo API

I received my YubiKey last week and had a spare half an hour to work on a ColdFusion interface to the YubiCo Webservice API to enable easy integration of YubiKey 2nd Factor Authentication in ColdFusion apps. I've popped the initial version of the code onto a Google Code project (under the MIT licence) as well as setting it up on RIAForge. It's pretty basic as things stand but I've got some niceties to add as and when I find the time including HMAC-SHA-1 signing support and support for all the API options. If you've got a YubiKey and you're a CF developer then please give it a whizz and let me know via the YubiKey-CF Google Project if I've missed anything obvious.

GeoIp - Binary DB vs MySQL Lookups

Recently I had to implement GeoIP lookups for a client project to determine which country user's were coming from in order to supply them locale specific content. That, in itself, is not very interesting. What really prompted sufficient interest to write this post was the difference in look up performance between the two available formats for this database.

Read the rest of this post »

14
To Posterous, Love Metalab