Friday 12 April 2013

So... aah... PHP then

G'day:
It's funny how things work out. For various reasons (which I shall not be disclosing) I am going to start shifting my spare time focus from ColdFusion to PHP. ColdFusion will still continue to be my primary focus for the foreseeable future, however I want to get up to speed with PHP as fast as I can. Starting today (Saturday in NZ).


I don't know much about PHP... the only thing I have written in it was a function to produce an RFC-compliant UUID (back before PHP could do such things itself), just as a random exercise. And I've installed it and had a fiddle around with it a few times over the years. I'm sort of familiar enough with it I can read the code, but not necessarily write any (I could not even write "Hello World" off the top of my head). So very much a newbie. I don't like to be partisan about things, eg: "CF rawks PHP sux" because that's just a stupid attitude to have on things: both CFML and PHP have their merits and their weaknesses, and many many people have fulfilling livings producing fine work in both (plus there's a lot of cruft out there too!). However on the whole I have a general feeling that PHP is a bit of a mess of a language, given its seeming lack of oversight and coherent planning. Something CFML has - for the most part - avoided.

Last time I sat down to look at PHP an interesting article found its way in front of my eyes: "PHP: a fractal of bad design", which even from my superficial knowledge of PHP rang true with me, and I asked one of my colleagues who was a PHP dev before switching to CFML, and he said "yeah, I cannot fault anything the guy says... it's an interesting take on it". This does not hearten me, especially as it's this sort of thing that tends to piss me off.

Now, I am a creature of limited attention span and lacking in drive to finish things. I get bored with shit and move onto something else. Remember the Coldbox project I was going to undertake? Well it remains 75% done. Coldbox started pissing me off, so I threw my hands in the air and went "ah screw it then". I say this because there's a chance PHP will have the same effect on me, so I dunno how long this plan will last. However I've got more personal motivation to undertake this than the general messing around I do in CFML. So let's see.

Now... I shall be writing up my findings. However I kinda like the fact that this is mostly a CFML-centric blog, and I'm not too sure about the idea of cluttering it up with "off topic" stuff. Although I will be basing my PHP investigations (and commentary) from the perspective of a CFML dev doing it all, so perhaps it won't be too off-topic? What it definitely will not be is as insightful about PHP as I might be about CFML. So the value to anyone other than myself ("formalising" my findings) could be minimal. On one hand I thought I'd start another blog focusing on CFML=>PHP. On the other hand, if I end up being a quitter, that's a wasted endeavour. I guess for the time-being I'll post everything here. But I was wondering what you bods (the three people that read this thing) think..?

--
Adam