I have to say, when I learned Coldfusion (CF) I was just starting out in dynamic data. Just a “Green Newb”. So from the standpoint of a novice, it was a great language to learn on. CF taught me, in an easy to learn fashion, some of the fundamentals of displaying dynamic content on the web. Things like:
- Processing online forms
- Working with variables and session data
- Connecting with a database
- Tracking user activity
- Displaying content based on user page activity
- And much more
However, several years ago I was forced (by circumstances beyond my control) to move on into PHP. So after about 2 months of exclusively using PHP for website content, I was hooked and couldn’t go back.
What I learned very quickly is that CF and PHP share basically the same principals of data flow, but the main difference is that Coldfusion is primarily a tag based inline language. It mingles itself right along side of the HTML tags. So you’ll see code that looks like…
<table> <cfloop query=”mydata”> <tr><td>#name_of_data#</td></tr> </cfloop> </table>
PHP, on the other hand, is typically processed in a different location completely and then the specific data chunks are pulled in and displayed on the page. It might look something like this…
<?php include(‘processing code from a different page’); ?> <table> <?php echo $tableContents; ?> </table>
I have to say, I really like PHP. When I try to go back and program using Coldfusion I find it difficult to get some of the processes that I do all the time in PHP to work in CF. Working with arrays, for example, is somewhat clunky and difficult. PHP just seems much sleeker and powerful in general.
I think one of the real reasons I like PHP better than Coldfusion is that it is FREE and community run. Sort of an open source type framework. So people are constantly contributing and making it better. CF is owned by Adobe. And while I really like Adobe products in general, CF simply doesn’t have the support base that PHP does.
So my conclusion… If you don’t know anything about dynamic data and want to learn how to interact with a database, display dynamic content, work with variables, etc… Coldfuson is a terrific option. I highly recommend it. But at some point CF will begin to feel too small for you. You’ll start to see some of the limitations. From there you’ll probably want to expand out to something else PHP, ASP, JAVA, C++, etc.
They’re both very good. PHP just seems to be more usable overall to me.