jQuery Autocomplete returning multiple values

This is a quick reference for getting the jQuery autocomplete working with ColdFusion, components (CFC), a remote search method, and with the Autocomplete returning multiple values such as a name, and id and a code which may be stored in hidden fields or displayed on screen.

More ...

Hello World with ColdFusion and Spring

Firstly, what is Spring? Spring is a Java based 'dependency injection' framework, which is a complicated name for something that simply 'helps objects to talk to each other' in a well designed way. Spring is the framework that was the basis for the popular ColdFusion dependency injection framework, ColdSpring.

Learn more about dependency injection in ColdFusion

Visit the ColdSpring site

Visit the Spring site

So why use Spring? Typically you would not need to, but using Spring in a ColdFusion application is only applicable when you want to develop larger aspects of your application in Java rather than CFML. This may be useful, for example, if you were to develop your business logic layer in Java and use CFML for your views.

More ...

Clear all connections to a MSSQL database

Simple script to close all connections to a MSSQL database.

USE master;
GO
ALTER DATABASE dbName
SET SINGLE_USER
WITH ROLLBACK IMMEDIATE;
GO
ALTER DATABASE dbName
SET MULTI_USER;
GO

Should Your Objects Validate Themselves?

It seems quite common in the ColdFusion community to see objects with a validate() function. This is used to handle when your object contains potentially invalid data, such as invalid data supplied from a form.

This leads to a good question; should your objects be allowed to have an invalid state?

More ...

Nested Set Trees in ColdFusion (v1.0)

A common technique to manage hierarchical data in a relational database is to use an "Adjacency List" model, where you have both an ID column and a Parent ID column in a table. This is easy to understand and maintain but can be difficult or inefficient when you want to retrieve hierarchies of records.

The "Nested Set" model provides an alternative technique for managing this kind of data and is more efficient at reading a hierarchy but requires a little more work for inserts, updates, deletes and moves.

This project provides a library of ColdFusion code that you may like to use to help manage your hierarchical data using the nested set model.

More ...

Nested Set Trees in ColdFusion (v0.8)

A common technique to manage hierarchical data in a relational database is to use an "Adjacency List" model, where you have both an ID column and a Parent ID column in a table. This is easy to understand and maintain but can be difficult or inefficient when you want to retrieve hierarchies of records.

The "Nested Set" model provides an alternative technique for managing this kind of data and is more efficient at reading a hierarchy but requires a little more work for inserts, updates, deletes and moves.

This project provides a library of ColdFusion code that you may like to use to help manage your hierarchical data using the nested set model.

More ...

Nested Set Trees in ColdFusion (v0.2)

A new version of this project is available.

A common technique to manage hierarchical data in a relational database is to use an "Adjacency List" model, where you have both an ID column and a Parent ID column in a table. This is easy to understand and maintain but can be difficult or inefficient when you want to retrieve hierarchies of records.

The "Nested Set" model provides an alternative technique for managing this kind of data and is more efficient at reading a hierarchy but requires a little more work for inserts, updates, deletes and moves.

See the references below for some good links that describe the Nested Set model in more detail (or just try a search in Google).

This entry provides a library of ColdFusion code that you may like to use to help manage your hierarchical data using the nested set model.

More ...

Nested Set Trees in ColdFusion

A new version of this project is available.

A common technique to manage hierarchical data in a relational database is to use an "Adjacency List" model, where you have both an ID column and a Parent ID column in a table. This is easy to understand and maintain but can be difficult or inefficient when you want to retrieve hierarchies of records.

The "Nested Set" model provides an alternative technique for managing this kind of data and is more efficient at reading a hierarchy but requires a little more work for inserts, updates, deletes and moves.

See the references below for some good links that describe the Nested Set model in more detail (or just try a search in Google).

This entry provides a library of ColdFusion code that you may like to use to help manage your hierarchical data using the nested set model.

More ...

Using Constants in ColdFusion Components

In code we often need to make use of constant values. It is good practice to use named constants rather than literal values, but what is a good technique for managing constants in an object oriented ColdFusion application?

More ...

Executing System Commands with ColdFusion

Update 13 May 2008: This project has been moved over to RIA Forge at http://systemcommand.riaforge.org/

This is an update to a previous entry.

Typically when you want to execute a system command you would use the <cfexecute> tag, but there are some situations when this may not be ideal such as when you want to capture both the "standard output" and "error output" streams of the system command.

More ...

More Entries