Using an array to sort dates.

{ Posted By : Eric Cobb on October 7, 2010 }
2939 Views
Related Categories: Tips 'n Tricks, CFML, ColdFusion

Here's an interesting little tidbit I thought I'd pass on. Yesterday I had a case where I needed to select the latest date out of about 4-5 given dates. The dates could range anywhere from today to a year ago. My first inclination was to just have a bunch of CFIFs comparing the dates and filtering through and determine which one was the latest. But then, I thought about how easily arrays can sort values and wondered if I could apply that to dates as well. As it turns out, you can, and it's really simple to do.

More »

ORM vs. SQL in ColdFusion, which is better?

{ Posted By : Eric Cobb on October 4, 2010 }
3154 Views
Related Categories: ColdFusion

This morning I was reading through Marcos Placona's review of John Farrar's ColdFusion 9 Developer Tutorial. When talking about the chapter on ColdFuion's built in Hibernate ORM functionality, he said something that really seemed to jump out at me.

"ORM really seems magical, and will do wonders for small to medium projects, where high performance is not the major concern."

What really struck me about that comment is the suggestion that for really high performance applications you may not want to use CF's ORM.

More »

All CFCs inherit component.cfc

{ Posted By : Eric Cobb on July 21, 2010 }
3401 Views
Related Categories: ColdFusion

This is a pretty cool feature built in to ColdFusion that I'll wager many people don't know about. I had certainly never hear of it until this morning. Did you know that ColdFusion has a built in component.cfc component that is automatically inherited by all CFCs on your server?

More »

ColdFusion debugging breaks jQuery AJAX calls

{ Posted By : Eric Cobb on June 17, 2010 }
3028 Views
Related Categories: Tips 'n Tricks, jQuery, ColdFusion

This may be a no-brainier for some, but I fought with it for about 2 hours yesterday so I wanted to make note of it in case it happened again.

I had a situation where my code worked correctly on my local development machine, but wouldn't work in our staging environment. The exact problem was that I was using jQuery to call a CFC, which returned some JSON, and jQuery then populated a div with it. Pretty basic stuff. But for some reason, on our staging server jQuery encountered problems and would never populate the div, even though I could see in FireBug where the CFC call was returning the JSON correctly. All code was identical in every comparison, and both sites were using the same database so the data was identical as well.

More »

ColdFusion feedback from a Java/Ruby Developer

{ Posted By : Eric Cobb on May 17, 2010 }
1615 Views
Related Categories: ColdFusion

I just came across this blog post and wanted to share it. For me, it's always interesting to hear from someone coming to ColdFusion from another language/background and get their thoughts on it. As he openly admits, when he started working at a ColdFusion shop two years ago, he didn't think much of CF. His exact quote is, "With more than 15 years of development experience, primarily as a Java, ActionScript, and Ruby developer, I had a relatively low opinion of ColdFusion."

Read the whole post here

Query struct gets added to the Variables scope of Application.cfc, whether you like it or not.

{ Posted By : Eric Cobb on March 29, 2010 }
3415 Views
Related Categories: CFML, ColdFusion

I've been spending a lot of time lately working on porting a legacy ColdFusion application over from Application.cfm to Application.cfc on ColdFusion 8. One of the things I'm paying close attention to is what gets put into the variables scope inside of my Application.cfc. I don't want to accidentally have stuff floating around in there and causing problems. So, my constantly checking the variables scope of various methods is how I found this little gem.

Did you know that, even if a query name is var scoped in Application.cfc, you'll still get CFQUERY.EXECUTIONTIME stored in the variables scope of your CFC?

More »

Since Hibernate is in CF 9, will Spring be in CF 10?

{ Posted By : Eric Cobb on March 12, 2010 }
2128 Views
Related Categories: ColdFusion

While going through my morning blog roll, I came across a post where someone mentioned using both CF 9's Hibernate ORM and ColdSpring in an application. This got me to thinking, since Hibernate was incorporated into CF 9, should we expect to see Spring in CF 10 (or another future release of CF)?

To me, this seems like a logical progression. What do you think?

Upcoming CFUG meeting that you do not want to miss.

{ Posted By : Eric Cobb on February 12, 2010 }
2761 Views
Related Categories: General, Flex, ColdFusion

I just saw where the Connecticut ColdFusion User Group has their next meeting coming up on Monday and I wanted to comment on the topic of that meeting, Integrating ColdFusion and BlazeDS, which will be presented by Aaron West. I have been fortunate enough to see this presentation by Aaron in person, and let me tell you, you do not want to miss it! Even if you currently have no need for BlazeDS/CF integration, you will want to see this presentation. Aaron does an excellent job of showing just how dead simple this processes is, and it really got the gears in my head turning.

Trust me, when his presentation is over you'll be thinking about all of the cool little apps you can build with this stuff.

Discrepancies in the way ColdFusion validates dates.

{ Posted By : Eric Cobb on February 8, 2010 }
5117 Views
Related Categories: CFML, ColdFusion

There seems to be discrepancies in the various date validations used throughout ColdFusion, or at least I've found one case where it inconsistently considers a value a valid date. It's probably easier to demo what I'm talking about than to try to explain it. Here's an example:

More »

ColdFusion 9's built in ORM support

{ Posted By : Eric Cobb on July 8, 2009 }
2000 Views
Related Categories: ColdFusion

Ben Forta has done an excellent job (as always!) of explaining the built in ORM support that will come with ColdFusion 9.

I have to admit, I've heard a lot of buzz about Hibernate being added to CF 9, but I wasn't exactly sure what it was. I knew that it gave you a way to connect to a database without having to use cfquery, but that's about the extent of it. I had no idea how to use it or how it would work.

More »

More Entries »