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

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 (17) [RSS]
For Sale (2) [RSS]
Image Manipulation (1) [RSS]
Java (1) [RSS]
JavaScript (4) [RSS]
PHP (1) [RSS]
Railo (2) [RSS]
SQL (1) [RSS]
Useful Tools (3) [RSS]

Recent Comments

Hashing Passwords
Richard Lord said: You really need to salt the passwords before hashing them, otherwise you're exposed to a rainbow-tab... [More]

Using Railo and Resin with domain aliases
Jonny Shaw said: Thanks for that. I am already using <host regexp="(.+)"> <host-name>${ho... [More]

Using Railo and Resin with domain aliases
Gert Franz said: Hi Jonny, it's even easier if you do it this way: <host id="allmead.com" root-dir... [More]

BlogCFC on Railo
Jonny Shaw said: Thanks for the advice ray. I was surprised at how easily BlogCFC went accross to to railo. The onl... [More]

BlogCFC on Railo
Gert Franz said: Congratulations to your new websites. I just wanted to add two things: CFIMAGE and CFCHART are suppo... [More]

Recent Entries

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