A Question of Speed

I have been doing some code review lately and am seeing quite a few cases that look something like this:

<cftransaction>
<cfloop from="1" to="#arrayLen(aData)#" index="i">
<cfquery ....>
<!--- insert query --->
</cfquery>
</cfloop>
<cftransaction>

You have a structure with some information in it and you are looping over the structure and adding the data from the structure into the database. No bid deal right?

Well you probably won't be surprised to find out that having a loop around the cfquery tag forces the Coldfusion server to execute that query N number of times, where N is the size of your array.

So what can you do?

[More]

Design Patterns

Sean Corfield has published a recording of an extended version of his Design Patterns talk that he gave at Adobe Max. I attended the talk at the Barcelona MAX and recommend it highly.

You can see the recorded version here

Spry HTMLPanel Problem

Last week I posted about loading dynamic content into a Spry Tabbed Panel, which as we learned ended up being pretty easy.

The tricky bit comes when your dynamic content is also Spry content. By default when you use the HTMLPanel it doesn't parse any javascript on the page. But you can enable script parsing on pages using two different methods.

[More]

Spry Panel with Dynamic Content

I am continually impressed with how lightweight and simple the spry framework is to work with. It's not a solution for everyone but to do some simple Ajax things it's really quite simple.

I was looking at an idea to do a tabbed dialog box, the content of the dialog boxes should be loaded when the tab is clicked. Simple stuff really but Spry makes it really simple.

[More]

Coldfusion and LiveCycle Data Services

As a, sort of, justification for sending me to Max in Barcelona I have been asked to give a presentation on some of the things that I learned, heard about or otherwise experienced (minus the huge amounts of alcohol I consumed).

The four things that immediately came to mind are: CF8, AIR, Flex 3 and LCDS. Each one of these subjects really deserves their own presentation but I need to fit as much info into as little time as possible and still manage to ignite a fire under certain peoples butts and get them excited about this stuff

[More]

EXTJS 2.0 Alpha

For those of you who like the new Ajax tags of Colfusion 8 the framework, ExtJS, has released the Alpha version of their next major release.

This release is a rather large upgrade to the code base that Coldfusion uses and fully separates its reliance or dependence on other frameworks (yahoo ui toolkit for example).

The host of new features are too many to go into here so you can read about the major and exciting new features here. You can also read more about the general release news on their blog.

All I can say is that Jack Slocum and his crew do a fantastic job and I am continually impressed with the quality and level of their work. Add on top of that the three licensing options (open source, oem/reseller, and commercial) and you end up with a product that everyone can use.

An important thing to note is that this release while extensive has not significantly increased the size of the library. The whole library measures in at 522kb (thats everything you need) and it is possible to reduce that size rather significantly by importing only the library files that you need for a specific task. Though that being said the general practice is to include the ext-all.js file and be done with it.

Happy Coding...

30 Days Free Online Training

Last Tuesday Ben Forta posted on his blog about free Adobe Flex training offered by Total Training. But thats not the only free training you can get.

[More]