Software for the web
Hello and welcome to AVNet Labs, my portfolio and blog. I build accessible and standards-compliant websites and web applications that account for speed, accessibility and usability while adhering to web standards.
Hello and welcome to AVNet Labs, my portfolio and blog. I build accessible and standards-compliant websites and web applications that account for speed, accessibility and usability while adhering to web standards.
The recently added Zend_Navigation component uses dynamic finders to find pages e.g. findOneByLabel('Home') to return the first matching page with label Home (and that's straight from the manual).
It would be nice if Zend_Db_Table could do this too but it can't. This seems a little inconsistent to me. Why do it for some components and not others?
Anyway, adding it wasn't that difficult. The first step is to have an (abstract?) class extend Zend_DB_Table and let all your Db-backed models extend that. I'll call mine App_Db_Table.
[php] <?php abstract class App_Db_Table extends Zend_Db_Table_Abstract { /** * Db Instance */ protected $_db; /** * Call method used to implement the dynamic finders * * @param string * @param array * @return function || void */ public ...
I spent a couple of hours last weekend going over a Rails app I wrote almost two years ago. It was the very first Rails application I had written (apart from the follow-the-screencast throwaway ones) and I couldn't help cringing when I saw the code I got paid good money to write.
That app is still my most ambitious project ever and I'm still shocked I decided to do it in Ruby (a language I barely knew) and Rails (after playing with it for a few weeks) when I had a couple of years experience in PHP and some production apps already running on CodeIgniter. I guess it was the hype.
However, almost two years later and the app is still ...
I just spent last weekend setting up a new slice at SliceHost (my bestest host ever) for a couple of Rails apps only to read this post announcing the release of Phusion Passenger for Nginx.
Considering I only needed the slice for Rails (No php and the DB is on another slice), I could have gone with Nginx except that I've been spoilt by Passenger's upload-and-go deployment and being able to squeeze more apps into a small VPS (the inactive ones shut down and release memory). Now hopefully, it's the best of both worlds.
I'll still have to learn Nginx quirks considering I've always used Apache but the promise of faster page serving and a lower memory footprint is ...



I recently had to set up a Zend Framework project at a friend's house and realized how reliant I am on Zend Studio to set up a fresh project. Meet Jara Base - the ZF starter app and my solution to this minor issue. It's essentially a slightly modified version of the Zend Studio project structure with the following variations/additions: