evaluate() is still a cry for help

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

evaluate('this.set#local.property#(arguments.properties[local.property])');

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 http://www.markireland.com.au/stepbystepblog/step4/index.cfm

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?

queryToAssociativeArray


<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" />

<cfscript>
     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 );
        
</cfscript>
</cffunction>

shortcuts - really short cuts

Amazon
B
C
D
Ebay
Facebook Flickr
Google
Hotmail
I
J
K
L
M
N
O
Paypal
Q
R
S
Twitter
U
V
W
X
Yahoo Youtube
Z

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.

Apache Axis 1.4. and Adobe Coldfusion 9

On the cfAussie list Mr Buzzy said he was able to upgrade to Apache Axis 1.4 for use with Adobe Coldfusion 9.

He warned that some official update releases will roll it back to Axis 1.2

Cant Adobe release some advice on this?

Managing live tracker development on the Web

Ben Koski posted Behind the scenes of a live World Cup and it reminded me of all the times I have advised people to avoid having one of every different web server technology in production.

I see now that this advice is not good since this application uses Ruby, Ruby On Rails, Flash, PHP, XML feeds, fancy CSS and Amazon S3 with reporters watching logs with their Apple Macs.

It makes my BHPBilliton ScoreCard app look lame.

More Entries

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