How Interfolio Uses ColdFusion 8
November 13, 2007
Sean Corfield recently blogged about some of the ways his company, Scazu, uses ColdFusion 8. I started to write a comment but it got long and morphed into this entry. At Interfolio, back in March, we received permission to build our revised product line on ColdFusion 8. I estimate that we saved at least a month of development time (4 to 3 months) due to this. We also won the Best of Scorpio contest as mentioned by Jason Delmore for which we won a PlayStation 3 (and has exposed how woefully bad I am at video games).
Here are some of the ways Interfolio uses ColdFusion 8:
- cfajaxproxy -- use of cfajaxproxy has allowed us to write web interfaces that are dynamic based on a single proxy to a cfc. Both our delivery and add document pages have different sections that rely on each other for rules and data, and implementing this has been very straightforward. The serializeJSON function has allowed us to take a ColdFusion query and return it to the browser as JSON simply by passing the query to the function.
- cfsprydataset -- use of the cfsprydataset tag and form bindings has allowed us to refresh a dataset based on criteria a user selects.
- cfwindow -- we use this to collect survey data and provide quick updates in our admin section.
- cfselect bindings -- we use this to simplify the classic two selects related functionality.
- cfinput type=datefield and cfinput autosuggest -- the ease of adding a html calendar to a form and an autosuggest is staggering and has led to us using these features in places where we might not have spent the time in the past.
- cffeed -- our company blog is hosted by Wordpress, we use cffeed to pull in the latest entries and display them in our product.
- cfzip -- we use cfzip to combine multiple pdfs into one download.
- cfpdf and cfpdfparam -- previously we used a third party tool to create a cover sheet and merge pdfs together. Now we use cfdocument to create the cover sheet and cfpdf with cfpdfparam to merge the pdf.
- image functions -- we use several of the new image functions, in particular, to resize uploaded images.
- cflocation statuscode -- our present application has many pages that we will not be using anymore. By using the new statuscode attribute of cflocation we can set permanently moved header information.
- file functions -- for more efficient file operations we use the new file operations such as FileMove() and FileCopy().
- Retrieval of auto generated identity keys -- previously we would have an extra query to obtain the value of the new ID, now we use the result structure and the generated_key key.
- Application defined mappings and custom tag paths -- by defining mappings and custom tag paths inside an Application.cfc file has allowed us the ability to dynamically set these at runtime and drop and run our code with ease.
- Implicit structure and array creation -- fewer lines and more readable code makes our development faster and cleaner.
- onMissingMethod -- we have implemented a service layer for our application but, instead of writing a bunch of very similar functions that simply call a Gateway, we use onMissingMethod to call the gateway.
- onMissingTemplate -- we create a "tinyurl" like short url for placing in emails. These links do not actually exist but are caught by onMissingTemplate which looks up the correct page and sends the user there. (I will be releasing this functionality in the next few days)
- We have an old computer running in our development room with server monitor up at all times for a real time view of the server. We have also used the slow requests and slow query features to tune our application.
Some comments have been lost over the years due to moving hosts.