Saturday, 25 April 2015

PHP: Silex Controller Providers

G'day:
I'm getting to this earlier than expected (see my observation in yesterday's article: "PHP: Service Providers with Silex")... I was able to write the code last night whilst watching telly, and now I'm stuck on a train due to "signal failure", so have a few (hopefully just a few ~) minutes to start writing this on my phone. Apologies for any autocorruptions I miss during proofreading.

OK, so what's a Controller Provider. Well, for about the first thousand times I read the docs, I could still not answer that. Obviously one can kinda guess from the name: it provides controllers. Ooookay... but what's the ramifications of that, and why would I choose this approach to "providing controllers" over any other way? Obviously it seems to be Silex's prefers way, but they need to do a better sell job on me than that. But the docs weren't doing it. Furthermore, there's bugger-all useful material out there about them (that I could find, anyhow). All the articles I found just regurgitated the docs, or paraphrased them. And the docs just explain "how", but never really explains "why". This is a failing of a lot of docs... explaining the "how" or "what" is easy, but it's the "why" that's important for a given feature. Explain the "why" first, then the "what". Why do I care about this thing you're banging on about? If I'm left with "err... dunno?", that's a fail.

Thursday, 23 April 2015

Help Indy

G'day:
I probably should have got onto this earlier, as it's the last day this funding campaign is running, but... err... didn't think about it.

Indy is a fella I follow on Twitter... he's part of our CFML community. He's one of the brightest potentials in New Zealand's IT industry, as demonstrated by his application Parent Interviews. He's been working on this since he was still at school (he's in second year @ uni now, I think), and has got himself onto the tech radar in New Zealand as one to watch ("Website graduates to take on world").

Indy's 19.

Anyway, he's after some $$$ to expand his horizons, and I reckon he deserves the encouragement.

I've just flicked him some money myself, and I know perennial CFML community member Kai has too.

Go on. It's worth it. But hurry up... the campaign finishes today I think.

URL: https://www.pledgeme.co.nz/investments/81-parent-interviews.

Please also circulate the word:


--
Adam

Wednesday, 22 April 2015

That CFML book I claimed to be writing...

G'day:
Yesterday Daniel asked me for an update on this "Learn CFML..." book I'm supposedly writing:

The news isn't very impressive, I'm afraid.

PHP: Service Providers with Silex

G'day:
I'm still being obstructed by train delays... I'm now sitting at the station awaiting a train to Leytonstone, at which I can apparently change trains to continue my journey - albeit at snail's pace - into work. I'm hoping I get there in time for the Sandwich Man doing his rounds at 11am.

Anyway, recently I've got myself up to speed with the notion of service providers, in Silex. Silex is the framework we use for the reimplementation of the HostelBookers.com website. Previously I wrote an article ("PHP: messing around with Silex, Pimple & Guzzle") about how we were using Pimple in Silex to handle our dependency injection. At that time we were hand-rolling our usage of it, thus:

Tuesday, 21 April 2015

PHP: unit testing private methods... PHP 5.5 version

G'day:
The Central Line isn't running at the moment and the buses are all shagged due to everyone wanting now to catch one, so I've given up trying to get to work and gone home until things settle down a bit. Not wanting to be completely useless to my employers, I've decided to solve an issue I created yesterday by recommending using some PHP 5.6-only code on out 5.5 environment. Duh.

Monday, 20 April 2015

Lucee 5 beta: Follow-up to a direct question about createObject()

G'day:
This is still going 'round the houses: "Lucee 5 beta: a direct question about createObject()". Here's my latest follow-up, just FYI.

>5

G'day:
I don't often directly mention my day job or my employer on this blog, but it seems relevant to what I'm up to today, so I'll break form.

Today I start my sixth year at HostelBookers.com. This is the longest period of time I've ever been in one position (I split my time at Straker NZ and Straker UK as different roles, as the jobs were quite different).