Coldfusion to PHP?

I have recently accepted a position for a web developer

Unfortunately the company uses PHP for its front-end websites with C# DLLs behind it, I have used PHP many years ago when i started out in web development. But nowhere near using them tih DLLs.

What i really want to know is how hard will it be to take my knowledge from Coldfusion to PHP?

Any advice would be appreciated

Comments
ike's Gravatar Well the basics aren't going to change much - objects, functions, etc. All the things that are inherent in most "imperative programming" languages. The particulars will be all different though. If I remember correctly the syntax for addressing a structure is -> instead of . and I think that also holds true for object methods, although I'm not certain.

I'm probably not telling you anything you don't already know, but that's the gist of it anyway. It's nothing you don't already know. The only thing that will really change significantly will be the syntax and fiddly things like the fact that PHP won't allow you to have white-space before the body of the html document.

You're liable to really miss having cfquery handy. You'll probably be working with a lot of native functions named mysql_this() and mysql_that(). There is a mysql-specific equivalent of cfqueryparam though, which is good because I've had a few sql-injection attempts against http://www.woohooligan.com.

Oh and CreateUUID() is md5(uniqid(rand(), true)).
# Posted By ike | 13/12/08 18:26
Craig Kaminsky's Gravatar As Ike mentions, the main thing will be syntax. It's significantly more verbose for nearly all code than CFML. O'Reilly's "Programming PHP" 2nd Edition is an excellent and not too expensive resource.

The thing I dislike most about PHP compared to CF is DB access. It's just so easy in CFML and far, far more cumbersome (IMO) in PHP.

I often end up working in both PHP and ColdFusion and, far more than in CFML, I recommend learning a PHP framework. They make such a bigger difference in PHP than in CFML (and I think they make a huge impact in CFML). Recently, I started using CodeIgnitor as a PHP framework. I like it a lot. It's fast to pick up and follows the convention over configuration approach similar to ColdBox and Fusebox 5.5 (no XML). It's (CI) also very fast to compile and easy to pick up. I know you might not have that option (framework or choice thereof) in your new position but it's worth looking into (there's also a Fusebox for PHP, the Zend Framework is excellent and so is Cake).

Best of luck!
# Posted By Craig Kaminsky | 13/12/08 18:53
duncan's Gravatar The syntax and documentation are the big problems for me. Trying to get a handle on the hundreds of functions in PHP.

I recommend you download the PDF from this page, I've found it useful:
http://stores.lulu.com/ucffool
# Posted By duncan | 13/12/08 20:01
Jonny Shaw's Gravatar The framework i will be using is Zend, Has anyone used this?
# Posted By Jonny Shaw | 13/12/08 20:50
Rob Wilkerson's Gravatar You won't have any problems as long as you keep your mind open. I made the same move about 2 years ago. There will be an adjustment period, but it will be a syntax-only adjustment. The principles, concepts, techniques and constructs will be the same as those you're used to. This is particularly true if you've written any Java as part of your CF work.
# Posted By Rob Wilkerson | 13/12/08 23:55
psikoteknik's Gravatar Very nice blog.Thanks for the valuable contributions to this site. Have good works.
Thanks for your help
# Posted By psikoteknik | 31/12/08 15:55
Rob's Gravatar @duncan - thank you for that link. I am having to start learning PHP and having a guide locally will be of great help.

@jonny how has your transition been?
# Posted By Rob | 27/08/09 16:37
Jonny Shaw's Gravatar PHP is very similar to most other OOP languages, which i am quite familiar with, so it wasn't really a problem.
you just need to adjust to the syntax and learn the functions.
# Posted By Jonny Shaw | 28/08/09 08:59

Archives By Subject

Advertising (4) [RSS]
Blog Design (1) [RSS]
CFProject Scripts (2) [RSS]
Coldfusion Charts (3) [RSS]
Coldfusion Functions (5) [RSS]
Coldfusion Overview (1) [RSS]
Coldfusion Tutorials (16) [RSS]
For Sale (2) [RSS]
Image Manipulation (1) [RSS]
Java (1) [RSS]
JavaScript (4) [RSS]
PHP (1) [RSS]
Railo (4) [RSS]
SQL (1) [RSS]
Useful Tools (3) [RSS]

Recent Comments

Simple Coldfusion Upload Script
Alban said: Here is the error I get on the cffile line: String index out of range: -1 [More]

Coldfusion 8 Functions
Mark said: Can Cold Fusion do math functions similar to say Excel? I need to make several calculations, and if ... [More]

BlogCFC on Railo
iphone clone said: Thanks for sharing [More]

Coldfusion Protx VSP Form Integration Kit
confinedspace said: @Dom: Cheers for that - helped me out. Just one thing to note, I would add "all" as a thir... [More]

Coldfusion to PHP?
Jonny Shaw said: PHP is very similar to most other OOP languages, which i am quite familiar with, so it wasn't really... [More]

Recent Entries

No recent entries.
ColdFusion Blog | ColdFusion Hosting | ColdFusion Q & A