PHP Routing Library

For the past few years, I have been working more and more with Node.js and proportionally less frequently with PHP. As might be expected, though the underpinnings of web behavior is platform agnostic, the architecture for the web application layer changes to suite the technology stack in which you are building. In fact, one of the marks of a savvy engineer is the ability to leverage the best parts of a technology in the way they build their software. However, I found myself spending far too much time trying to relearn techniques in PHP for projects as I came back to them, so I decided to see if I could build a lightweight routing system in PHP that would mirror some of the patterns I use in my Node.js work every day.

Anyone who has worked with Express, Hapi, Django, Rails or even Grails can understand the ease of route declaration with something like this:

Continue reading →

Reasons not to upgrade to PHP5

Some of you may not immediately catch the sarcasm intended to be portrayed by the title of this post, but anyone who knows my coding preferences or has heard me complain (in a good way, of course) about the server structure with which we are currently stuck with at work, you will have no issue with understanding the tongue in cheek nature of this post. I have actually been amazed at how many times in the last week I have run into servers that have yet to offer PHP5 in their configuration settings, even as an option.

I have had the privilege to make the aquaintence of a few new friends and work with them on a project, which I will cover in depth in another post, and through some web work I’ve done for the project, I’ve been made aware of three separate hosting companies (which shall remain nameless) that still do not have PHP5 installed on their servers. What’s more, after some checking, some of them apparently do not even offer it as an option. This has made me appreciate my current hosting company that much more, for they not only offer a choice between stable versions of PHP on my account, but they go to the extreme of allowing me to declare a PHP version for each individual domain or sub-domain that I wish to set up. As a developer, this sort of flexibility is invaluable. Continue reading →