ELib and Twitter
I've been working on a PHP library that can sit alongside Empathy (lightweight MVC) on a purely non-dependant way. The idea being that some of my semi-duplicate code across projects can be re-factored into a central toolkit.Instead of dealing with the boring re-factoring straight away I wanted to work on a simple PHP library for making calls to the Twitter Api (excluding the search API so far). What I think I've ended up with is potentially a nice utility for accessing any REST-ful API with a clean way of defining the API 'specification', perhaps with little-to-no performance hit.I didn't want to look at any existing offerings of PHP library to make it more enjoyable while I pondered an elegant solution of my own. In a fairly paradoxical fashion (as is often the case) the main features revealed themselves in reverse order. I started by building a static array, which could contain the specification of the public API. By doing so I forced myself to consider (sometimes subconciously) the different logic that might be involved in ensuring each variety of call could be easily accessed with a standard interface. Eventually it occured to me that a typical call from a web app might look like this:
$t->doCall('url/to/call/'.$id,
array( 'param1' => $value1, 'param2 => $value2),
MVC
Welcome to the first live site to use the latest version of my own MVC (for use with Smarty) that is now successfully running on top of PHP 5.3. Recent work on it has been a fun ride, driven mostly out of a desire to have controller classes whose names do not clash with those of auto-generated classes from PHP Doctrine. i.e. they would potentially still clash if it wasn't for namespaces :0]
Perl 5 point 10 in layman terms
As a developer, one of the great things I love about Gentoo (Linux distribution with BSD 'ports-like' package management) is the feeling it gives you that eveything you do to your system has an undo button. (For the record, I have at least come to my senses about this need in a production situation.) A great example of this is layman, which I think is fair to say is a slightly more intuitive version of managing an apt sources file. Today I realised there is a portage overlay (for use with layman) that I have been missing out on and perhaps it's because it's a fairly recent addition but it comes just in time for me to try and get more serious about hacking in Perl.