Category: ColdFusion

119 posts

REFinding your voice

I've lost mine, and am trying to find it again. I loved when I was blogging regularly, and being an active part of a thriving community. Over the last few years, that has slipped away from me. I haven't made a blog post in ages, and don't feel like I'm much a part of any community at all.

Read more…

Easy Thread Throttling in ColdFusion

I do a lot of large processing tasks at LandsofAmerica, and in order to get these scheduled operations to complete in any reasonable amount of time I use the <cfthread> tag to spin off multiple processing threads at a time. Unfortunately, some of these threads take longer to complete than it does to spin up another 5,000 threads in the queue. Once you break that thread limit, ColdFusion to stop accepting new threads and will throw an exception. So I use the method below to make sure that I don't spin up too many threads at one time.

Read more…

Meet me at cf.Objective()

Today I posted on Twitter that I would need to re-evaluate my friendship with anyone who couldn’t make it to cf.Objective(). But alright alright… I’ll still be your friend, even if you don’t make it to cf.Objective. But you should… I just finished working up my schedule, and I’m once again excited to attend a conference. I’ve been “meaning to attend MAX again” for years, but the last few times I’ve been it’s seemed more a social event, and less an “inspire me to build great things” event. But I still remember hanging out with Jared, Sean, Simeon, and “the rest of the gang” after the first cf.Objective() conference I attended.

Read more…

Installation Wide contentRenderer for MuraCMS

I have a fairly large Mura installation, with a good number of sites on it. I have some customizations that I’d like to be pushed out across all of the sites in my installation. For example, I’ve changed the way the dspPrimaryNav function works, so that I can prevent child pages from being displayed. Unfortunately, as flexible and customizable as Mura is, there is no good to make global changes to the contentRenderer.cfc without losing those changes everytime you perform an update to your core files.

Read more…

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:

Read more…

Convert IPs to Binary

I'm working on some SQL to search for data based on IPs and IP Ranges. Doing this with character data in the database is horrendous. When searching through millions of records using JOINs with LIKE comparisons, the performance is completely unacceptable. So I'm working on converting the IP addresses to Binary format to do some (hopefully) faster searching.

Read more…

Error when Upgrading to CF9

I finished the installation of our new CF9 license with just one hiccough along the way. I installed CF9 next to CF8 so that we can move clients over to the new CF9 server one at a time and test as we go. After the file installation is finished, CF9 opens the migration wizard to allow you to bring over all of your old CF8 settings. During this process I got the a monstrous cfdump with the following error:

Read more…

IE8, ColdFusion, and Color Profiles

We do a massive amount of image processing on LandsofAmerica.com. Our image processing scripts take uploaded photos from realtors and create multiple versions at different sizes for use throughout our applications. This has been working without a hitch for ages. Unfortunately, IE8 was released...

Read more…

Everything you didn't know about cfdump

My tip this morning about the TOP attribute on the cfdump tag has been pretty popular, which makes me wonder what else people don't know about the cfdump tag. In ColdFusion 7 it was just a variable, a label, top, and whether the dump was expanded or not. ColdFusion 8 added the show, format, hide, keys, metainfo, output, and showUDFs attributes.

Read more…

CF Tip of the day: Speed up dumps with TOP

I do a lot of cfdumps with queries, but always forget to use the top attribute introduced in ColdFusion 8. You can use the top attribute to dump just the top x number of records from your query. When dealing with a wide query 500 rows, dumping the first 10 will give me more than enough information to do what I need to do, without waiting for the browser to finish rendering a huge dump table.

Read more…

SQL Counting with Conditions

Not sure why I never thought of this before (and I know I'm not the first to come to this conclusion judging by Google), but I just figured out how to count records in a query based on their value.

Read more…

Incorrect Variable Values in AjaxOnLoad

I just ran into another goofy Ajax problem with my ColdFusion apps. I have a page using a bound cfdiv to load a form. The form, once submitted, is supposed to take the value of a form field entered on the page and run an AjaxOnLoad event to use that value elsewhere. Here's a simple test to show what I mean.

Read more…

Error Building Struct with CreateUUID

This is more for myself than anyone else, but I hit an odd snag in ColdFusion this morning. I got an error when trying to create a new structure member using a CreateUUID() function and ColdFusion's shorthand structure notation. The following code fails:

Read more…

Authorize.net and ARB Race Conditions

So I've had a problem on a recent project ever since I started using Authorize.net's recurring billing system. While it works fantastically for the most part, I've had issues with canceling subscriptions during their nightly billing process. The issue at hand is that Authorize.net doesn't actually cancel a subscription if a transaction is declined. They leave the subscription active and will just continue to try again and again until the subscription actually ends.

Read more…

ColdFusion, Image Processing, and Memory Spikes

I've been having some serious memory issues with a ColdFusion application that I've narrowed down to CF's image processing functions. Processing no more than 14 megs of images causes a spike of nearly a full gig of RAM while the images are being processed. Here's an example of what's happening when I process images through CF's built in CFImage functionality.

Read more…

Missing Instance Manager in CFusion Instance

UPDATE: Downloading a copy of CFIDE from a production server that was working like it was supposed to fixed the problem. Unfortunately the CFIDE directories are full of encrypted cf files so I have no idea what the difference was. Move along, nothing else to see here...

Read more…

Galleon Forums Installed

I just installed Galleon Forums on our internal user admin for LandsofAmerica.com. It's not open to the public yet, but I built integration to keep our Accounts tables in sync with the Galleon User tables. When a new user is added, or a user is updated, the Galleon User tables also get updated. That way we have a "single signon" capability and user don't have to log in twice.

Read more…

Getting to a Deep Understanding

Nice short article from Hal Helms on what it takes to even start understanding object oriented programming. Just learning the terminology can be excruciating and disheartening. That was my original impetus to create OO Glossary. Unfortunately, I haven't had the time to enter my own definitions, or petition the community to help.

Read more…

Still ACE'ing after all these years

Just got my renewal email from the wonderful folks at Adobe. Looks like I'm good for another year as an Adobe Community Expert. I'm hoping to post more smaller tips and tricks here on the blog, and hopefully get even more involved in the Community this year. And hell, I might even make it to MAX (all fingers crossed).

Read more…

Why I love ColdFusion

Because my first use of the ColdFusion AutoSuggest control took me 10 minutes to implement. I was doing a cfselect with a bind to load all cities in a state. Unfortunately, with more than 5,000 cities in some states the application was getting seriously bogged down with huge asynchronous http responses in the background.

Read more…

Finding Missing Indexes

I learned yesterday that SQL Server will tell me which indexes it thinks I need to have. Just use these three queries to get a look at what your SQL Server thinks you should be doing to take care of your queries

Read more…

AjaxOnLoad and cfhtmlhead

I had an odd issue today where I was using AjaxOnLoad to run a javascript, and I was getting an error that the function was not defined. The function and the ColdFusion.Event.registerOnLoad even were both getting added to the page. I could create an anchor tag on the page with an onclick and it would run the code fine, so I was perplexed as to why it was telling me that the function wasn't defined. See if you can spot the problem.

Read more…

onMissingMethod Issue Cleared Up

At LandsofAmerica I've been making extensive use of the onMissingMethod() functionality of CF8 to provide implicit getters and setters. This has worked fantastically well, and I'm never going back to explicitly declaring these unless I have to :). But one problem I've had was with using my implicit getters and setters inside my objects. It just didn't work...

Read more…

Building a Backup Strategy

My brother is a new mac user, and is starting to get into recording and audio engineer stuff I don't know anything about. I know he has lots of big files though, and needs to know how to back them up. So I was telling him about my current backup strategy, and figured I should write up a post about it for posterity's sake.

Read more…

Moving on

Today I gave my two week's notice at lynda.com. After 2 and a half years there it's time to move on. I've learned a lot about enterprise application development in my time at lynda.com. Working on CF clusters and SQL Server 2005 upgrades and cluster management. Through all the trials and tribulations (moving to Austin, starting a team, and disbanding a team), I grew a lot and have become a better developer for it.

Read more…

Working on a Mango Conversion

I got a little nudge from the Transfer group the other day about my ASP blog for ColdFusion code :). Well this blog has been around since February 2002 (if you can believe that) with almost no architectural changes. I've changed the display a bit here and there, but it's essentially the same ASP code I wrote 6 friggin' years ago...

Read more…

Managing the Transfer Cache with Clones

In my recent adventures with Transfer, I ran into a problem where objects that weren't yet saved were showing up in my cached Transfer objects. Since I don't make mistakes (uh huh...) I immediately assumed this was a bug in Transfer, and went about documenting my problem on the Transfer group.

Read more…

Getting Moving Again...

Things have been rough on the work front lately, but I'm starting to finally move forward again. It's been about 6 months since I've actually built anything worth mentioning, and I'm finally starting to get back into it :)

Read more…

Not of type Numeric when it damn well is...

I have a problem, and it's ColdFusion... We're working on some complex object interaction, and moving data in and out of our objects. Part of the "moving in" part involves building out a structure of arguments based on query columns, and then passing them all in via the ArgumentCollection. Unfortunately, ColdFusion doesn't love us here at lynda.com... It's pitching a fit and saying that our IDs aren't of type numeric, when I know damn well that they are (grumble grumble)...

Read more…

Ant, Eclipse, and FTP

I'm having an absolute bear of a time getting Eclipse to play nicely with Subversion, Eclipse, and an Ant build file. One of the wonderful things about working with Dreamweaver is the great FTP integration. I can upload, download, all that wonderful stuff, with a single keyboard shortcut directly in the IDE. I'm not having any such luck with Eclipse.

Read more…

Considering "the switch"

As part of my new job, I got myself a MacBook pro and have been running Bootcamp on it over the last few days. All in all the experience is good, but there are issues with Windows running on the MacBook that bother me (bad sound drivers, and the fact that the clock resets on each startup). However, before I installed BootCamp I spent quite a bit of time on the Mac and got over some of my "floating windows" phobias. To that end, I'm considering going all the way and switching to OSX. So to get to my point, is there anyone out there that's recently been through this that can give me some pointers on what I might miss?

Read more…

cf.Objective().Rocks()

I got back from cf.Objective() late Sunday night (or was it Monday morning) and I have to say it was by far the most educational conference I've ever attended. I attended every session I could (a change for me, I usually skip a particular session time when there's just nothing to see). The full list of sessions I attended is:

Read more…

ooGlossary Feature List

I've had several people ask about things that could be done to improve the ooGlossary so that people will start adding new content to the site. For that reason, I've added a Feature Wishlist so that you can add whatever feature you think will make the site more useful for you. So just follow the link, click Edit Page and wish away!

Read more…

ooGlossary.com

The hardest thing about learning anything OO related is simply getting over the language barrier. Anytime you talk to an OO afficionado, you always end up hearing a term you don't understand. My biggest problem with learning Model-Glue, Reactor and ColdSpring, three things I really want to start using, is finding out what IOC, AOP, DAO, Beans, Transfer Objects, Gateway Objects, and all of the other terms mean, so that I can actually make it all the way through the documentation. Google searches are alright, but I've never had one spot I could go to find out what it all meant.

Read more…

VC Star Article - Front and Center

Dan Short recordingWhile I was in Ojai recording the Dreamweaver 8 Beyond the Basics title for lynda.com there were some reports from the Ventura County Star writing an article on lynda.com. They wanted to take a few photos of someone doing a recording, and they ended up using a shot of me on the front page of the Business section of their February 15th article. See mom and dad, I really do do real work :). Click the image for a larger version.

Read more…

CFDUMPing the Variables scope

Don't ask me why I never tried this before... I've always just done a <cfoutput>#myVar#</cfoutput> when I needed to find out what a local variable value was. This often meant scattering them all over my page to figure out what piece of code I got wrong... I finally decided I'd just try dumping the local variable scope, and wallah voila! I get a full dump of every local variable on the page, including queries, available functions, the whole bit. I don't know why I never tried that before...

Read more…

Another one bites the dust...

I finished up the new Dreamweaver 8 Beyond the Basics title for lynda.com on Friday. After 4 solid days in a little sound-proof room, it's time to head back home and catch up on all of the emails and questions from readers. The Beyond the Basics title covers advanced template usage, building multi-column CSS layouts, using some rapid coding techniques in Dreamweaver you might not have known where there, as well as a chapter on getting your feet wet with dynamic development in Dreamweaver 8.

Read more…

Discovery of the Day

I'm a big fan of virtual directories. I like sharing assets across sites without having to duplicate a bunch of folders. Angela and I were doing some planning for a site and she asked if you created a Virtual Directory in IIS, what would happen if you also had a physical directory of the same name. Well it turns out that if you have a Virtual Directory defined in IIS, the server will completely ignore the contents of any physical directory in the same location. So if you had this:

Read more…

Recording Complete...

I finished recording Dynamic Development with Dreamweaver 8 today for Lynda.com (this time using ColdFusion). I'm not sure when it will be released, but the turnaround is usually just a couple of weeks. Hopefully this will be up right after the new year...

Read more…

IISAdmin to the Rescue

I've always gone through the trouble of setting up a separate full-blown Windows 2003 Server here in my office for doing development work. The reason being that I didn't want to test on the production server, deal with FTP lags when uploading constantly changed files, and I like to keep my sites clean. I don't like testing in a base wwwroot directory and either setting up tons of subfolders or constantly clearing the wwwroot directory to get a site in the root.

Read more…

ColdFusion on Wheels

I've played a bit with Ruby on Rails, but just can't leave my ColdFusion behind, so it was great to see a post on Ben Forta's blog about ColdFusion on Wheels. Rob Cameron announced it on the Cube 6 Media blog today, and I'll definitely be playing with this one over the next few days. My only concern is the need for URL remapping, which I've never dealt with, and will have to find some time to get a handle on, but this is definitely going to be an exciting thing to watch, especially in connection with Joe Rhinhart's recent postings on Arf.

Read more…

Transforming XML Server-Side

Angela and I gave a presentation to the Mid-Michigan CFUG yesterday (well actually Angela gave the presentation, and I just showed some XSL stuff), and I showed everyone how to use the new XSLT visual authoring tools in Dreamweaver 8. They're great and wonderful and everything, but they're really geared towards working with local XML files. The reason I say that, is that Macromedia doesn't offer any solutions for transforming a remote XML file. They allow you to write an XSLT file to transform that remote content, but they don't tell you how to actually pull a little Optimus Prime on it and make that XML human readable.

Read more…

Extending the root Application.cfc

I spent a great deal of time fighting with something yesterday for no good reason. I was trying to extend the root Application.cfc in my application from an Application.cfc inside a subfolder. Here's what I had in my subfolder's Application.cfc:

Read more…

Powered by Detroit

Powered by Detroit is happening this coming weekend. If you haven't already made your reservations, I suggest you do so soon :). The cost is just $349 for the conference, which includes the 2 day conference pass, breakfast and lunch for both days, as well as a DVD of all of the presentations at the conference and $100 off of a Macromedia Certification Exam.

Read more…

CFFORM.com

Given my new obsession with CFFORMs, it was great to see that Mike Nimer has just launched a site called CFFORM.com with some awesome Flash and XML style CFFORM tricks and tips. You can submit your own modifications, or take what you need free of charge. I'll definitely be spending some time here as the site grows...

Read more…

The annoying focus-stealing CF Debugger

I'm posting this as much for my benefit as anyone else's. Everytime I reinstall CF I forgot how to change this. I love using the dockable CF debugging on my sites. It allows me to have all of my debugging information in a handy little popup window for reference. It's better formatted than the classic version, and I can stick it on my second monitor for reference as I go. However, it steals focus every single time a page loads. So, to disable this, just follow these simple steps:

Read more…

Bug in CFMX7 XSL and CFSELECT

I've been playing around with the XSL forms in Coldfusion MX 7 and ran into a bug yesterday. If I have a multiple select, then the XSL style sheets don't properly mark each selected value as such. Let's say I have this code:

Read more…

New Site Up and Running

Just launched a new client site based off of Cartweaver, Draw 3 Lines. The site sells a kit to learn to draw (something I could desperately use), and assorted supplies for such. The site is simple, being geared towards a younger audience, but it definitely sells the product well.

Read more…

CFAnywhere

Larry Lyons pointed me to a post on House of Fusion that discussed a way to run CFMX or BlueDragon from a CD, which would allow you to send out mini-applications on CD to potential clients. This is somethign I blogged about some time ago, and it looks like CFAnywhere might be the answer.

Read more…

Odd CF Scheduled Task Behavior

I've had a CF scheduled task running hourly for a few months now without issue. On the 14th of May, for some reason, the scheduled task ran but wasn't rescheduled for it's next run. There's nothing in the CF logs that I can find that says why it might not have rescheduled. After forcing the scheduled task to run through the ColdFusion Administrator, it then successfully rescheduled for it's next run, and has been running fine since. If anyone has seen this happen, or knows where I might be able to dig for more debugging information, I'd like to hear it.

Read more…

Embedded ColdFusion?

I'm trying to find out if it's possible to run a ColdFusion app from a CD-ROM. I can't seem to find anything about embedding a web server onto a CD though. I'm about 99% sure you can't do this with ColdFusion MX, but from a few snippets about New Atlanta's Blue Dragon I think it might just be possible. I just don't have the knowledge to make it happen.

Read more…

Cartweaver 2.4.3 Released

The latest and greatest Cartweaver 2 update is out, with a bunch of new fixes/improvements, including the ability to enable/disable shipping, sort categories and secondary categories, improved international support for the order form, improved support for Shared SSL and new integration with WorldPay Select Junior, not to mention some great extension work from Angela. All around a great (and rather extensive) update.

Read more…

Wonders of CFChart

I just have to say that I'm loving ColdFusion more and more every day. I've been working on a charting application using CF's CFCHART tag, and by golly that's some sexy stuff. If you've never messed with, do...

Read more…

ColdFusion Scheduled Tasks

If you're running your own CF server, or are hosting with a host who's willing to do a little extra work for you, you're going to love ColdFusion scheduled tasks. It's basically a way to tell CF to run a particular file at a set interval. The called file can run a report, update a database, do an XML grab, anything you want. And then you can tell CF that you want it to save the results of the file somewhere else.

Read more…