Fractal v0.8.0, now with Serializers

Posted 2014-05-29
Category PHP
A new version of Fractal is out, which is a package aimed at making life easier to API developers handling output. At a basic level it acts as a way to typecast an array of data, like array_map() but defined in classes, but at most it can do much more. It can help include other resources inside the response based on user input, so /books?include=author,comments for example will give you exactly what you expect without hardcoding it to always display. The new version provides some serializers, to allow you to change the way that data is represented as output.

Read More »

RESTful Deletions, Restorations and Revisions

Posted 2014-05-25
Category REST
A friend asked me for some advice on how to approach building article revisions and restoring deleted content from API in a RESTful way. With most things, it didn't fit on Twitter, so I promised him a blog. 

Read More »

RESTful URLs: Actions Need Not Apply

Posted 2014-05-11
Category REST
I was doing a little consulting for a company while I was out in South Africa and we played the game. You fire SOAP functionality at me, and I write down RESTful endpoints. Once or twice I found myself considering suggesting a dodgy unRESTful endpoints, but each time I wrangled my brain a little harder to work out what combinations of slashes and squiggles would appease the RESTful Overlords, and avoid them throwing lightning bolts down from upon high.

Read More »

Heroku and PHP Sitting in a Tree. K.I.S.S.I.N.G

Posted 2014-05-09
Category PHP
Heroku was - as far as I remember - the first (mainstream) PaaS on the market. It was Ruby-only but it was that symbol of modern web development at the time, with the whole "slinging code", "getting shit done", make a Git repo and start shipping bro, hack project/agile-til-it-works mindset.  Since then I've been wishing they would add official PHP support. And... guess what they just did.

Read More »

The Tale of Tom, Dick and Harry

Posted 2014-05-07
This article describes three fictional characters as they all learn how various tools and methodologies work in the world of technology, internets and programming.

Read More »

Made in Production

Posted 2014-03-13
Category PHP
Late last summer I was riding my bike around the mountains of New Jersey. I'm not sure if it was exhaustion, the heat or the fact that I had run out of podcasts to listen to but I had an idea: I should get into the t-shirt sale business.

Read More »

PHP-FIG: Autoloaders, Amendments and The "15th Standard"

Posted 2014-02-13
Category PHP
Recently I've been putting in lots of time for bits around the PHP-FIG, and I wanted to highlight what they were, what they are and what I personally think needs to happen in the near future to make things better.

Read More »

The "Framework" is Dead, Long live the Framework

Posted 2014-01-13
Category PHP
There have been a few posts over the last few months saying that the age of the framework is dead, and that Composer is the true savior, and other similar messages. This is half-true, but lots of people have been using the word "framework" differently over the years and I wanted to really work out a good definition of what a "framework" was in relation to PHP development, and in relation to these discussions. 

Read More »

Autoloading Laravel application code with PSR-4

Posted 2014-01-09
Category PHP
When you use Laravel it's very likely you autoload extra code than just the controllers/models that are autoloaded by default. Some use classmap, others use PSR-0. Well, now you can use PSR-4 too.

Read More »

Composer now supports PSR-4

Posted 2014-01-03
Category PHP
I haven't really posted about PSR-4 here, but if you follow me on Twitter or hang out on Reddit you've probably seen some news about it. PSR-4 was voted in as an "accepted" PSR by the FIG in December. It took a little while to get done and went through a series of painful rewrites but when we have in the end is a document that reflects what this truly is: an improvement on PSR-0. Time to upgrade your packages, but don't release them just yet.

Read More »