Tuesday, June 28, 2005

Coldfusion Basics

I've been working on a new job possibility, and been meeting people who are new to Coldfusion and Coding, and it intrigues me. Reminds me of the struggle we all go thru in teaching ourselves to code.

So I really like to go over, on the basics, maybe it's boring, but I personally finally , we focus so much on the cool stuff, that we may not master the basics.

If you know me by now, i find it really important to make sure each application is scalible. Meaning, I don't want to have to re-write an application, because I didn't take the time and effort to write the SQL and logic code to be fast.

I know we can be lazy at times, but that's why we need to maintain the core basic disciplines.

1. Take pride in your code, and make sure it won't go back and bite you because you did not give everything you had to make sure the quality is high. To our end users, the application layout and functionality are most important, but in the real end in terms of long term costs, the quality of the code is just as important.

2. Commenting, whatever system your company uses, more is better. Remember if you died, how would anyone know what exactly you did, and how to change or fix it?

3. Indenting, for other coders it's really important to be able to read the code, in case they have to change or fix it.

4. CFSWITCH vs CFIF, if the comparrison value is simple, then use CFSWITCH, because cfswitch executes faster. But only for simple values, keep using cfif for complex logic.

5. SQL Code, even if this application is only meant to be for a low-traffic site, what if they suddenly get a huge bend in traffic, but it keeps crashing the server? That is exactly why you have to write the SQL Code for scalability.

6. Modularity, I know as the lines of code grow, we want to split it up, so it doesn't get too out of hand. In the old days of coldfusion there were not as many ways to break up your code, and that has changed so much. The key thing to think about is how it effects performance and whether it takes up more to setup than necessary.

That's it guys, and feel free to send me any cold fusion question, I would love to help others learn.


  1. Anonymous10:20 AM

    Why not release some small app to show us how it's done? I'd like to see how my code compares to yours. And maybe even learn something from you. ;-)

  2. Anonymous2:24 PM

    Your blog entry seems very much the same as your last blog entries on the topic. Extremely generalized and vague, how about something more specific such as a small app like the previous commenter suggests?

  3. All my code from the applications is at the companies I worked for.

    But here are some of the presentations , from my local CFUG, that i did.


    Okay, one thing i need to figure out, is how to post code into blogger, without it trying to interpret it. But I will do it.

  4. Anonymous5:44 PM

    Where can I get a hat like yours?

  5. Where can I get a hat like yours?