Writing PHP Code to Standard

So with the release of AWS SDK Version 2, I’ve been inspired a little to write better PHP Code, at least in stuff I have on my GitHub. The new SDK is written to match the PHP Framework Interop Group PSR-0, PSR-1 and PSR-2, as well as Composer/Packagist Support.

I been working a on project to make starting a new project easier, (create a repo, setup the deployments, Apache VHost etc). Primarily working off of the ATech Media Suite of products.

Starting from a base of peterjaap’s Codebase PHP Wrapper, where I was just adding missing API endpoints to the class, at which point the new AWS SDK was released and inspiration of a sort struck.

I started a new project from scratch, to implement all the API’s that Atech runs, it’s very much in progress, I’ve currently got full support for DeployHQ and PointHQ end points, (as well as having gotten a few obvious missing end points added to the API).

I’m clunking my way thru the CodeBase API, it’s taking some time as its got a truck load more end points, that DeployHQ and PointHQ put together. It has Projects, which have repos, which have tickets, just to scratch the surface.

At the moment it’s largely functional, it’s just missing some extras, the Time Tracking, File Uploads, and so on.
It’s very much a learning experience in an attempt to follow the coding standards as well as laying the code out properly.

At the moment the CodeBase class itself is pretty large, and I’m pondering about splitting it out to sub classes. Classes to represent Projects and Repos and Tickets and so on, but its the first thing I’ve tried to build in such a way, so much consideration is needed, to hopefully get it right. I keep looking at other Project like the AWS SDK and GoCardless’ PHP Class.

The only thing thats really missing, is Unit Testing, which I still need to sit down and learn properly, but I’m still trying to find a suitable entry point to teach myself, and of late been expanding my knowledge using Code Academy, more on that in another post!

So thats a short update on PHP Development in general, you can checkout the ATech API Class so far on GitHub. Feedback always welcome!

(I’m trying to write more on my blog, as well as more PHP in general, hence a in progress post instead of a “It’s completely finished give it a whirl” post)