Object-Oriented Coldfusion – Learning the techniques

I must admit working in an environment where you are the only application programmer can be less then satisfying as there is limited ability to interact with fellow developers. I find the biggest downfall is the single vision of techniques and solutions. This unfortunate scenario leads to a lot of online reading of articles from leading developers and programming enthusiasts. I recently (past few...
readmore

Get current directory with Coldfusion

Recently, I have been working with reading of text files and xml files. To do this you can use the Coldfusion cffile function. The function, getCurrentTemplatePath(), will return the full path of the current template. By path we mean the directory and file name. The function, getDirectoryFromPath(), will then get just the directory from the path. Code Example: <span style="color: #800000;">&lt;cfset...
readmore

Using Transfer with Coldfusion

I have recently explored the use of transfer with my Coldfusion Applications as the tedious coding of beans, gateways, and service components was too time consuming. This post is more of a documentation of my experience with it and I will be adding to these posts as I continue to explore the and gain experience developing new applications. First the installation was a breeze, actually there isn’t...
readmore

Get File Information with Coldfusion 7

Recently I had the need to check for files existence within a directory and trigger an actioned based on a file update date. Now this was not a difficult task but one that not everyone may be familiar with or use on a daily basis, this is why I am documented a brief example of its use. In ColdFusions newest version CF8 this is can be accomplished with the use of the getFileInfo() function, with the...
readmore

How to Prevent an SQL Injection Attack with Coldfusion

SQL Injection attacks are one of the easiest ways to hack into a website. One recent hack, using a script from verynx.cn, involves injecting SQL into a web form that then appends some JavaScript code into fields in a database that then gets executed on the client side when a user views a database-driven page. To learn more about this hack, go to this link. If you’re using ColdFusion, to harden...
readmore

Using cfqueryparam within SQL LIKE and IN Clauses

ColdFusion’s cfqueryparam tag is important for several reasons, most notably data type validation, improved query performance, and foiling SQL injection attacks. A basic example of cfqueryparam in use is as follows: <cfquery datasource=”yourdsn”>   SELECT     column1     , column2     , column 3   FROM     yourtable   WHERE     column1...
readmore

Display dates in various formats with Coldfusion

This is a simple example that can save some manual coding among new developers. Most established developers will already be using these methods but it is surprising how many still do not. Depending on your work environment or country of origin, you may be required to provide content in various languages. This is the case at my desk job, all content must be provided in English and French, of course...
readmore
line
footer
Network: Thomas Craig Consulting | Designed by Elegant Themes