Twitter API Coldfusion component

Here is a nice component for using the Twitter API by:

Matt Gifford AKA coldfumonkeh

Mark Ireland's Twitter favourites

Adobe should host ColdFusion code examples with access to Performance Monitoring.

Adobe should host ColdFusion code examples with access to Performance Monitoring.

The apps could be very small but that should be highly available and very scalable.

One app should be an all javascript front-end and ColdFusion webservices on the server side.

There should be some good load testing examples that users can run while they observe the Performance Monitoring and garbage collecting.

If Charlie Arehart says this is already availble I will puke.

How well do you know your host?

Working at a small university changed my code because the university hosted its own sites.

I knew just enough about the hardware setup to see where problems might occur for me and started adding 'just-in-case' code.

Then I read a ColdFusion book that suggested using a simple database query wrapped in a cftry/cfcatch tag just to see if the database connection was up and running.

I laughed because I thought I invented that. My code used a cfmail tag to emailed me so I could go and nag the database guys.

evaluate() is still a cry for help

Line 169 of Entity.cfc from Blade 0.62 (an ORM example):


Even with all the CF9 conventions this is still the only way to do it?

Upgraded to Blade 0.62

My install of the Blade demo has survived an upgrade

moved to CF 9.0.1

This is just a test post to see if the move to CF 9.0.1 is all good.

I am checking out cfScaffold and Blade both examples using ORM.

ColdFusion applications do not really exist

This is a little counter-intuitive so I am quoting Ben Nadel here:

"ColdFusion applications do not really exist. At least not in the way you might think of a traditional desktop application that has a running process. ColdFusion applications do not have a constant process. Instead, they have memory scopes. Each application has its own name which ties it to a chunk of memory somewhere. Every time you define an application through the Application.cfc (or CFApplication), what you are really doing it associating the current page request to the chunk of memory that is associated with that application name.

When you start to look at ColdFusion applications this way, it becomes a little more clear why you cannot explicitly kill an application or a session; there simply is nothing to kill. An application doesn't run unless you have a running page that requests to be associated with it."

So how is a count of sessions calculated? Is it simply not gone until 8 hours (the default setting in the servers xml) has passed? Add it, wait 8 hours and subtract it?


<cffunction name="queryToAssociativeArray" returntype="struct"
                output="false" access="public"
hint="This turns a query into an struct of structures.">

<cfargument name="Data" type="query" required="yes" />
     <cfargument name="Key" type="string" required="yes" />

     var LOCAL = structNew();
         LOCAL.FromIndex = 1;
         LOCAL.ToIndex = ARGUMENTS.Data.RecordCount;
     // Get the column names as an array.
     LOCAL.Columns = listToArray( ARGUMENTS.Data.ColumnList );
     LOCAL.ColumnCount = ArrayLen( LOCAL.Columns );
     // Create an struct to keep all the objects.
         LOCAL.dataStruct = structNew();
     // Loop over the rows to create a structure for each row.
        for (LOCAL.RowIndex = LOCAL.FromIndex ; LOCAL.RowIndex LTE
LOCAL.ToIndex ; LOCAL.RowIndex = (LOCAL.RowIndex + 1)){

            // Create a new structure for this row.
            LOCAL.dataStruct[ARGUMENTS.Data[ ARGUMENTS.key ][ LOCAL.RowIndex ]]
= structNew();

            // Loop over the columns to set the structure values.
            for (LOCAL.ColumnIndex = 1 ; LOCAL.ColumnIndex LTE
LOCAL.ColumnCount ; LOCAL.ColumnIndex = (LOCAL.ColumnIndex + 1)){

                // Get the column value.
                LOCAL.ColumnName = LOCAL.Columns[ LOCAL.ColumnIndex ];

                // Set column value into the structure.
                LOCAL.dataStruct[ ARGUMENTS.Data[ ARGUMENTS.key ][ LOCAL.RowIndex
] ][ LOCAL.ColumnName ] = ARGUMENTS.Data[ LOCAL.ColumnName ][
LOCAL.RowIndex ];


        return( LOCAL.dataStruct );

cfImage and Jcrop and RaphaelJS and ckeditor

Here is a nice use of the deepliquid Jcrop jQuery plugin by Matt Gifford

If you like this check out RaphaelJS

The fckEditor is now a jQuery plugin called ckeditor.

Stop using returnType="query" with ajax and jQuery

Would it be worth it to stop using returnType="query" with ajax and jQuery?

I could try to standardise the way the data returned uses JSON. I would prefer a structure that always has a key that I can use as an index.

More Entries

BlogCFC was created by Raymond Camden. This blog is running version Contact Blog Owner