10 May 2008

Akelos vs. Cake: Let me eat Cake.

I’m still drinking the Ruby Kool Aid, but when I have to PHP in my own well:

class User extends AppModel
{
  var $name = 'User';
  var $primaryKey = 'user_id';
  var $useDbConfig = 'alternate';
}

Cake: easy as pie. :)

class User extends ActiveRecord
{
  function init ($attributes = array())
  {
    parent::init($attributes);
    $this->setPrimaryKey('user_id');
  }

  function setConnection ($dsn = null, $connection_id = null)
  {
    $this->_db =& Ak::db('mysql://user:password@localhost/alternate', 'usersalt');
  }
}

Akelos: more like a PITA.