Using my energy the right way
I’m starting to grow tired of pleading to do things the right way. The last encounter was with another develop in the team I’m working about a new abstract layer added to an already overloaded framework. The system in case, built in Symfony, uses Propel’s Criteria to retrieve data from the storage engine (Mysql database). Normally you would have something like this:
c = new Criteria();
$c->add(AuthorPeer::FIRST_NAME, “Karl”);
$c->add(AuthorPeer::LAST_NAME, “Marx”, Criteria::NOT_EQUAL);
$authors = AuthorPeer::doSelect($c);
// $authors contains array of Author objects
The added complexity comes in the form of yml file that contains the logic for the Criteria (unfortunately, I won’t be able to give you an example).
Now, my question is: WHY? Why another layer of complexity? I think I know why: it is a side effect of having model logic in the controllers. But that is another battle…
So I say… I’m tired!




