Entries Tagged as 'ColdFusion'

Definition of a Function vs Method

ColdFusion , Javascript , Misc No Comments »

After a recent discussion as to the correct terminology to use when referring to code written in CFCs I've decided to share my opinion so people have a general idea as to what is meant when someone is referring a function or a method in its simplest sense. 

  • A function is a piece of reuseable code that is called by name.  It can be passed data to operate on (arguments / parameters) and can optionally return a result.
  • A method (also known as a property method) is a piece of code that is called by name that is associated with an object.  A method is almost identical to a function but it's purpose is generally to operate on the data contained within the component (class).

For example, in JavaScript, methods are defined as object properties that contain a function() whose intent is to operate on the data within that object.  Whereas an example of JavaScript functions would be built in global functions such as isNaN(), alert() or user defined functions function debugLog( content ){ console.log( content ) }.

Likewise, in ColdFusion, you could probably say that UDFs (User defined functions) and the standard built in functions provided by ColdFusion are "functions" and the functions within CFCs are methods.

I'm sure people have their own opions on this but in general that's how I like to refer to functions or methods.


Bookmark and Share

IE 8, Excel 2010 not opening content on Windows 7

ColdFusion , Gotchas , MS Office , Tips and Tricks No Comments »

Thought I'd dust the cobwebs off my blog by sharing something I came across today...

I came across an issue where a user reported that a web application was not opening Excel content they were requesting.

Basically the application was sending csv formatted text to the browser and the browser (Internet Explorer) was supposed to open this with Microsoft Excel 2010.

The template sending the content had the correct headers configured to instruct the browser to open this in Microsoft Excel and the content was valid but for some reason the new window was failing silently without promting the user to open \ save the file.  The only clue was that this was a new PC with Windows 7 and Internet Explorer 8 installed and their previous PC worked fine.

I decided to check with Firefox and voila - I was prompted to Open / Save the file.

So after diagnosing different scenarios through the code I then started looking into the settings on the PC for Internet Explorer.


ColdFusion 9 - CFZIP Example

ColdFusion 1 Comment »

I was recently asked to provide a quick link for allowing administrators to download _all_ user uploaded assets for a particular form.
The obvious choice for this was to use <CFZIP /> to create an archive, compress the download file size and also provide one download link.

It didn't take very long to do, but I thought I'd share a quick example of this for others who might need the same.


QR Code Service Project - Part 1

ColdFusion , HTML5 , jQuery , QR Code Service Project 5 Comments »

Just to clear things up and to get things started, I thought I'd formally introduce a little project I'm working on which I have, for now, ingeniously named the "QR Code Service". 

If some of the details look like you're reading a Wikipedia article then please forgive me but I have used some summarised references from there as my source of information.

The objective behind this project is to create a common interface \ facade for utilising and implementing some of the existing APIs out there that provide QR Code creation and decoding functionality for your projects.

It is not intended to facilitate your own code creation and decoding without requiring a 3rd Party service on your own server for this phase although whilst doing some research for this project I discovered that Ryan Stille has already created a project called 2DBarcode_j4l which uses the J4L Barcode Package.  I may at some stage decide to implement this into the project but for now I will stick to using my chosen 3rd Party service providers for now.

I will implement a solution for each provider one at a time and when ready release each individual class \ component as part of the entire project.


Congrats ACP's and bring on ACC's

Adobe Community Champion , ColdFusion No Comments »

Just a quick post to say congratulations to all those who have achieved Adobe Community Professional for 2011.

I know a few people now who have been awarded this status and I can only say that it's well deserved and hard earned!!

Also, if anyone feels that this blog and the content I provide, and for anyone who knows me my contribution to the community, is worth nominating for ACC, then please feel free to do so ;-)  Honestly, I won't be offended whatsoever ;-)

For those of you who don't know what ACP and ACC are you can find out more below.

ACP (Adobe Community Professional) - http://www.adobe.com/communities/professionals/

ACC (Adobe Community Champion) - http://blogs.adobe.com/community/2011/01/adobe-community-champions-program-launch.html#comment-286


Bookmark and Share
Powered by Mango Blog. Design and Icons by N.Design Studio
RSS Feeds