For over a dozen years now I have been coding web applications using ColdFusion, from version 3 all the way through version 8. I love ColdFusion, and given the choice I would choose it over any of the other server languages. Unfortunately, the people who pay the people who employ me are forcing me to go another route. It's not offical yet, but at the very least the Department of Education is adding the LAMP stack (Linux, Apache, MySQL, PHP) to it's preferred list of web development platforms, and I have heard opinions that it may displace ColdFusion in the future. So, in the interest of remaining gainfully employed, I am becoming a PHP developer over the next few months.
The trick of this is that I am going to have to become proficient on my own time, they won't pay me to do this. So I am going to have to use my personal projects as training grounds for PHP. I have some work that I need to finish that I am going to keep in ColdFusion, and I am not going to rewrite sites in PHP, but new tasks on existing sites, and new sites, are going to be done primarily in PHP for the short run.
To aid me in my learning process, I will be using this blog as a brain dump to note what I like, don't like, and struggle with as I go about learning PHP.
Oct 13, 2009 at 1:04 PM PHP should be something you'll like. I worked with it very, very peripherally on the sites I work with, and moving forward an old business acquaintance of mine will be launching new e-commerce platforms using a PHP/SQL mix and embedding pre-existing shopping carts, with his own special brand of SEO work.
I almost wish I knew more about it so that I could help, the equity on the last set of sites he sold was considerable, and they weren't nearly so advanced and mutable as the new ones will be.
He's on the learning curve of PHP too, so you both have my sympathies. I think I'll stick with logistics and operations...it's more my style than language and development.
Oct 14, 2009 at 11:56 AM So far what I have seen of PHP is it takes twice as much code to do the exact same tasks as in CF. I don't think I'll be changing my personal work over to PHP outside of having a sandbox to learn it for work...
Oct 28, 2009 at 3:14 AM i like to see people appreciate instead of hate. i feel like everytime coldfusion and php come up in the same conversation there is an argument. not knowning much about php other then reading books (no practical knowledge) the notion that anything is free like running all open source software LAMP for example is crazy. NOTHING IS FREE! it all comes with a cost.
Oct 28, 2009 at 4:40 AM I had to take the opposite route, I was originally a PHP developer but landed a job that required ColdFusion. I think CF is great although I've always missed some of the extra power PHP has available as I can never get my head fully round the underlying Java in CF. As luck would have it, PHP has come into my workplace as well but along side CF rather than as a replacement so at least I can have the best of both.
Going to PHP from CF, I'd recommend using a framework. CF takes care of a lot of things for you compared to PHP, but with the right tools PHP can provide some too. If you're in charge of setting the server up, take a look at Zend Server (they have a free community edition) which has a CFIDE like admin for PHP. Also, it comes with Zend Framework (also available seperately) which is a huge collection of loosely coupled objects that can be used as needed or strung together as a MVC framework.
Oct 28, 2009 at 8:14 AM @Carey it's interesting that you mention the costs, that is the driving force behind this. My counter to LAMP would be to point to a Railo/Tomcat setup (like this site is hosted on) which costs exactly the same. But I don't make the decisions on this, and there's definitely a tunnel vision approach going on by management that, try as I probably will, won't be cracked.
@David thanks for the tip. I am generally not a frameworks kind of developer (I see their usefulness, I just haven't needed one for myself. I put as much backend code into CFC's to separate from presentation, but opt for a traditional linear directory and file structure), but maybe this is a place where that will be the case.
I'll be honest and upfront, so far I am having a lot of trouble seeing the benefits of PHP over CFML. As David noted, CF packages a lot in their tags and native functions that it seems (in my current state of knowledge) that I have to write out line by line in PHP. It just seems... bulky is the best word I can think of right now. I accept fully that I am biased heavily towards CF (probably not the last time you'll hear that from me) but learning PHP is still in the "have to" arena, not the "want to".
Oct 28, 2009 at 8:26 PM I would be worried about working for management that would double development costs with no apparent gain over a Railo solution.
My guess if they're not coders and unrealistically will expect you to write twice as much code in the same amount of time.
Neither possibility is attractive.