Shaun Mccran

My digital playground

14
S
E
P
2010

Cookies in ColdFusion - cfcookie or cfset?

Cookies are a platform independent scope, by this I mean that even though we can create and manipulate them in ColdFusion, they are not inherently ColdFusion technology. Cookies are ideal if you want to access data at a browser level, in ANY technology, (cfml, asp, javascript etc), and they are also a good way to store non critical data on a users browser. They basically work by sending their data to the browser instance, to be used as temporary storage.

ColdFusion can create, edit and delete cookies quite easily, but what are the functional differences in how you create them? Is one way better than another?

[ More ]

08
S
E
P
2010

Jquery Rounded Corners Plugin Example - cross browser CSS replacement

A while ago I wrote an article on how to implement CSS3 and Cross browser rounded corner CSS. That article (http://www.mccran.co.uk/index.cfm/2010/7/8/CSS-3-Rounded-Corners-Example) mentions that the CSS3 code has not been adopted as a standard by some browsers (IE - I'm looking at you) but that there are some work around's to it, most of which involve re writing DOM elements using JavaScript.

This article deals with a JQuery plugin that can emulate a totally cross browser CSS3 rounded corners solution.

There is an example of the finished code here: JQuery Rounded Corners example

[ More ]

07
S
E
P
2010

Forcing an SSL redirect using Coldfusion

I've never really coded much around individual Secure templates, but this afternoon I found myself working in a framework where certain templates were required to be called with the 'https' URL instead of standard non secure URLs.

This turns out to be incredibly easy. There is a variable in the cgi scope that tells you if the request is served under a secure port or not, cgi.server_port_secure returns true or false (1/0), so you can use it to redirect people to where they should be.

view plain print about
1<cfif NOT cgi.server_port_secure>
2
3    <cflocation url="https://#cgi.server_name##cgi.script_name#"
4    addtoken="false">

5
6</cfif>

I've used other cgi values above as I've put this in a 'prefuseaction' function in a fusebox CFC controller file. That way all requests to any actions in that file are routed to the SSL equivalent.

04
S
E
P
2010

Twitters OAuth changes break HTC Peeps login

I've got a HTC Desire Android handset and I use the Twitter Application that ships with it, Peep. Recently it stopped logging in for me, after a quick search around online it looks like Twitter have finally made their OAuth login authentication mandatory for third party applications.

This is a good thing in itself, but it does raise the question of when a platform changes from being just 'open' to being so wide spread that it is considered as a public API. I'm not in a position to comment on why Peep wasn't updated to work with OAuth before it was released, but it does make you question who is responsible for maintaining the service levels of public API's.

If Twitter have published and promoted their API, surely it is their best interests to maintain its functionality, and ensure some level of backwards compatibility? This is a tricky point to argue, as on one hand it is very good that they are maturing their platform with new features and security, but on the other hand they do risk alienating the community they rely on by introducing new features that require third party application changes. By this I mean changes that require an update, and are not backwards compatible, rather than just not updating and missing out on any new functionality.

This is especially prominent in this instance as it affects the Twitter Application that actually ships with HTC Android handsets, so it is guaranteed to be quite widespread.

_UNKNOWNTRANSLATION_ /