ColdFusion 9: AJAX Controls and Techniques

AJAX: The panacea for all of your Web 2.0 problems...

Well not really... AJAX can sometimes cause more problems than it solves. Especially if you don't have a good handle on exactly what it is you're doing with it. The AJAX frameworks available today are large and daunting, and can be extremely intimidating.

ColdFusion, sticking with its "make hard thing easier" mantra, has done a lot of work to make it easy to incorporate AJAX functionality into your sites. Unfortunately, this requires a little training as well :-)

To get you started, I'm happy to announce the release of ColdFusion 9: AJAX Controls and Techniques.

This course will take you through all of the basics of using AJAX controls and techniques in ColdFusion 9 (is that a descriptive title or what!?)

After watching this course, you'll come away with the following nuggets of wisdom:

  • Manipulating and securing container contents
  • Debugging AJAX behaviors
  • Building UI elements such as accordions and border layouts
  • Using rich prompts with cfmessagebox
  • Understanding advanced cffileupload
  • Sorting and grouping data in grids
  • Binding data to form fields
  • Creating a map with markers

I hope you enjoy the new title, and let me know if you have any questions. I'll be watching the comments :-).

0 comments | Posted by Daniel Short on Jun 7, 2010 at 10:06 PM | Categories: ColdFusion -

ColdFusion Builder Essential Training Launched

ColdFusion Builder has finally been launched!

It seems like it's been forever since the original Bolt beta started, but CFBuilder is finally hitting the streets. I've been using Bolt and CFBuilder as my one and only ColdFusion IDE since the early Bolt betas, and I can tell you that I have no intention of going back to one of those "others".

After a few frustrations with early betas I tried going back to CFEcilpse (and even Dreamweaver at one point), but just couldn't bring myself to go without all of the fantastic component auto-completion and server integration.

There's lots of blog coverage of the release of ColdFusion Builder, including talk of new features, so I won't talk at length about any specific features. I do, however, want to point you to my new ColdFusion Builder Essential Training title at

ColdFusion Builder Essential Training is designed to teach both new and experienced ColdFusion developers how to configure servers and services, generate data-aware components, and create custom extensions. It doesn't cover every single little in and out of ColdFusion Builder, but it will go a long way to helping you get up to speed with the new product. Topics include:

  • Installing ColdFusion Builder
  • Customizing the ColdFusion Builder workspace
  • Managing assets within a project
  • Setting up ColdFusion servers
  • Coding with Code Assist, code coloring and syntax checking
  • Using snippets
  • Working with components and variable mappings
  • Creating ColdFusion Builder extensions

I hope you enjoy the new title, and let me know if you have any questions. I'll be watching the comments :-).

2 comments | Posted by Daniel Short on Mar 22, 2010 at 6:58 AM | Categories: ColdFusion -

SQL Blocking and Client Variable Purge

We've had continual issues with our ColdFusion applications locking up on us. I've spent the last week cleaning out huge tables, creating indexes, and tuning queries, but could never seem to track down what was causing the issue. Today I caught it in the act... As the the applications locked up, I ran the following query in SSMS: SELECT st.text , r.blocking_session_id , r.session_id, r.status , r.command , r.cpu_time , r.total_elapsed_time FROM sys.dm_exec_requests r CROSS APPLY sys.dm_exec_sql_text(sql_handle) AS st This showed me what queries were getting blocked, and who was doing the blocking. It turns out that it was ColdFusion's Client Variable purging that was causing the blocking. This is the query that was running: DELETE FROM CDATA WHERE CDATA.cfid in (SELECT CGLOBAL.cfid FROM CGLOBAL WHERE CGLOBAL.lvisit < {date} ) DELETE FROM CGLOBAL WHERE CGLOBAL.lvisit < {date} Unfortunately, there are no lock hints anywhere on the query. With 7,500 records to delete in a table with more than 30,000,000 records, the table was getting locked for more than 2 minutes, a complete disaster for a production application dependent on client variables. So I went to work creating a new query that will delete the client variables at a much more reasonable pace, with only as much locking as is necessary to keep things humming along smoothly. The new query looks like this: SET NOCOUNT ON DECLARE @cfid char(64), @rowsaffected int, @rowsdeleted int; SET @rowsaffected = 0; SET @rowsdeleted = 1; WHILE @rowsdeleted > 0 AND @rowsaffected < 100 BEGIN BEGIN TRANSACTION SET @cfid = ( SELECT TOP 1 CGLOBAL.cfid FROM CGLOBAL (NOLOCK) WHERE CGLOBAL.lvisit < DATEADD(d, -30, GETDATE()) ORDER BY CGLOBAL.lvisit ) DELETE FROM CDATA WITH (ROWLOCK) WHERE CDATA.cfid = @cfid DELETE FROM CGLOBAL WITH (ROWLOCK) WHERE CGLOBAL.cfid = @cfid SET @rowsdeleted = (SELECT @@ROWCOUNT); SET @rowsaffected = @rowsaffected + 1; COMMIT END PRINT CAST(@rowsaffected AS varchar) + ' client records deleted' The query will loop through and delete one record at a time, until it hits the limit of rows affected specified. This is set up as a scheduled task in CF so that I know exactly when it will happen, and can watch for issues if there is a failure using existing global error catching.
10 comments | Posted by Daniel Short on Dec 11, 2009 at 1:50 PM | Categories: ColdFusion - SQL -