Recent Blog Posts
Blogs » ColdFusion
InFused
: ColdFusion BlogColdFusion myth-busting
I’d like to introduce myself: my name is Kay Smoljak and I’m a ColdFusion developer. I’m going to be posting here from time to time on topics related to my development language of choice.
I’ve been coding in CF for a while now. I started way back in 1999 - the version 4 days - when Netscape Navigator 4 ruled the web, PHP was at version 3 and the dot com bubble was just starting to get interesting.
Things certainly have changed since that time. Over the course of four versions and a complete rewrite in Java, Allaire ColdFusion became Macromedia ColdFusion and then found a new home at Adobe. What hasn’t changed is that CF is still not well-known in the general web development community, and a lot of misinformation regularly makes the rounds of both individuals’ blogs and large tech publications.
So, I’m going to be doing what I can to dispel those nasty myths (number one: no, ColdFusion is not dead!) and highlight some of the cool things that are happening in the ColdFusion community. There’s certainly a lot to cover: from frameworks to open source projects, from built-in features like reporting, image manipulation and Ajax controls to third …
Another year, another CFUnited
Did you make it to CFUnited this year? Yea me neither, I was supposed to go but after my little sabbatical to Shreveport LA plans kind of got lost.
BUT lucky for us we can still experience it even if we didn’t get to sit in the chairs and pal around the conference area. Be sure to check out the feeds to get the scoop.
One post I want to point out in particular is the one Ben Forta made about performance for CF8. Let’s just say the numbers are amazing!
Also if you’re someone who likes to get a quick overview, then Matt Woodward has some great Google Doc outlines of the events he attended.
If you attended or know of some other posts of interest feel free to share them in the comments.
Now you can be as cool as me - GO GET CF 8 BETA!
Yes folks now you get to be as cool as I’ve been! For the past few weeks / months I’ve been involved in the ColdFusion 8 aka Scorpio beta. Today you too can play with the next version of ColdFusion. Adobe today released the first Release Candidate or Public Beta for ColdFusion 8!! I’ll give you a second to jump around, pick yourself up off the floor, or just read that all over again.
So why is this version going to be so great? What can you look forward to exploring? Well here’s my highlights:
- Built in server monitoring - Yes now you can monitor your server for tuning, bottlenecks, and performance issues
- Built in debugger - If you’re an Eclipse fan then this will be something you’ve been dying to have. Now you can!
- Spry integration - Yes folks it’s not getting even easier to build AJAX application with ColdFusion and Spry integration.
- .NET Support - While I haven’t played with this myself it’s now available for those of you who need it.
The stuff / tags I’m most excited about:
- CFFeed tag - Read RSS / ATOM and create RSS 2.0 / Atom …
Are your clocks cleaned?
Here in the states most of us ritualistically change our clocks twice a year in hopes to gain more daylight. This practice has been known as Daylight Savings Time and it’s my understanding that it’s also practiced in other parts of the world. Well the US Government recently changed the dates for when Daylight Savings Time would start and end. This caused in some places a y2k like panic and people feared that their software would all of the sudden start reporting the wrong time for lunch breaks. So much like y2k, software makers started issuing patches for their software and operating systems to account for these changes.
For those of you running your own ColdFusion server you’ll need to take note here because there are things you need to do, in order to be ready for next weekend sine the 2nd weekend in March is when the changes take effect.
For ColdFusion to be “fixed” you need to actually update the Java Virtual Machine (JVM) which ColdFusion uses to process your code. According to Adobe’s web site the SUN JVM Version 1.4.2_11 fixes the Daylight Savings time issues and is certified for CFMX 7.02, CFMX …
What have you done for me lately?
So… what have you done for me lately? I make your life easier. I allow you to create great web applications, impress your co-workers, wow your clients, and I’m sure you’re a hero to your boss at least 3 or 4 times a week because of me. So what have you done for me lately? Have you stuck up for me during a fight recently? Have you fought for me to move ahead? Have you really pushed as hard as you could to upgrade me?
If you haven’t figured it out by now I’m not talking about me, Eric Jones your blogger incognito. I’m talking about ColdFusion, the CFML language and the CF world as we know it. Many times I hear about a new person getting put off by ColdFusion because they don’t think it’s supported by a large community or they don’t hear enough “buzz” about it or they think the “mind share” is too low. You know what? They are probably right when you look at the circles they run in BUT maybe they are only right because we as CF developers have allowed it to be that way.
I’m constantly amazed how the number of people …
Snort, Cough, Cough, Hack….
Not a very pleasant title for a blog post for sure, but that my loyal readers has been mine life for the past week and a half. I’ve been fighting the flu / an upper respiratory infection which has left my online time to very very minimal spurts. So no fancy coding lecture today. Instead just a quick note to wish all of you reading this a happy holiday and a safe and joyous new year.
We’ll return to our normally scheduled posting starting back up in January of 2007 maybe even a bit sooner if i can ever get over this "thing" i have.
Oh yea one more thing I’d like to send a big shout out and congratulations to all the winners of the first annual CFeMmys, who knows maybe next year you’ll see this blog there :)
CFCs for the common developer Part 2
So last time we learned the basics of creating a CFC and the overall structure of a very basic CFC. Today we’re going to talk about the different ways in which we can use this CFC in our code.
So how do we access this function in our CFC? Can we just include it into a CFML page using the CFInclude tag or is there more to it? If you guessed there’s more to it then you are spot on! CFCs have a few ways in which they can be used, tag based, script based and yet another tag based implementation.
Tag Based Implementation #1
Now CFCs ,at their most basic level, are a lot like custom tags. In order to use the functions you create in a CFC you have to call them and then output the data they return. So for our greeting CFC we would call it like so:
<cfinvoke component=”greeting” method=”getGreeting” returnvariable=”myGreeting”>
<cfoutput>#myGreeting#</cfoutput>
This will display Welcome guest! Enjoy your visit and please come back soon. wherever we output the variable myGreeting. Here we are using the CFInvoke tag to “invoke” our CFC, which is just a fancy way of saying “to call”, “instantiate” or even “create”. The CFInvoke tag takes a good amount of attributes but we only care …
“You want to do what?”
Ok I know this isn’t part 2 of my CFC’s for the common developer but I wanted to share with you something cool I did today. I had a query of locations which needed an extra row inserted into it. Now this sounds like an easy thing to do but there’s a catch, isn’t there always a catch. I had to have the query sort the locations alphabetically but this new row which I needed to insert had to be first in line. So my task was to:
- Query the database and get a listing of all locations and their respective ID’s and order them alphabetically
- Insert into the first row of this same query a listing for Corporate Office with an ID of -99
So here’s my query:
<cfquery name=”getLocations” datasource=”MyDSN”>
SELECT franchiseeName + ‘ (’ + city + ‘, ‘ + stateProvince + ‘)’ AS lookupdisplay, franchiseeid AS lookupkey
FROM franchisee ORDER BY lookupdisplay</cfquery>
This returns a nice query result set with two columns lookupDisplay which has my location name / state and lookupKey which has the ID for this particular location. So how do I …
CFCs for the common developer
Recently in the SitePoint ColdFusion forums there was a nice little discussion about CFC’s and how everyone who explains them or teaches them throws in a lot of buzzwords which does more to confuse people then to help them along. Now I know this happens because I’m guilty of it as well as a lot of other seasoned ColdFusion developers. So hopefully with this post I can help move those who are interested but unsure about CFC’s into this wonderful world.
So what is a CFC? First off a CFC is actually called a ColdFusion Component and at its most simple terms it’s just a ColdFusion template (aka a ColdFusion page or file) but instead of a .cfm or .cfml extension it has a .cfc extension.
Now just because a file has a .cfc extension on it doesn’t make it a CFC right away. Once you have your .cfc file created you do have to write some code. Typically a CFC is made up of 2 or 3 basic parts. The first part is the actually CFC tags and they look something like this:
<cfcomponent displayname=”Greeting” hint=”I’m a greeting CFC”>
</cfcomponent>
There is only one tag which makes a CFC and that is …
Holy Hamburgers!
The only thing “Stagnant” about ColdFusion is this blog, or should I say, WAS this blog! It’s been 2 long years since I last posted on InFused and I’m happy to report today changes all that. I remember begging SitePoint to let me take this blog over from David Medlock back in May of 2004, which SitePoint as we know allowed to happen. Then a short six months later I was telling them it was too much for me, and at that time in my life it was. I had just taken a new position with my current employer and was learning so many new things about ColdFusion that I just couldn’t get things in order.
So I quit. I left this blog to become a stagnant collection of articles and a complete failure / social black-eye for the SitePoint ColdFusion community. For this I’m truly sorry but I promise you my departure was not in vain. Even though I left the SitePoint blog behind my involvement in the community has only grown! You’ve hopefully seen me on the forums as well as around the …
Sponsored Links
SitePoint Marketplace
Buy and sell Websites, templates, domain names, hosting, graphics and more.
Download sample chapters of any of our popular books.




