How We Code: ORMs and Anemic Domain Models

In this article, I'm going to cover an example of implementing some business logic in our usual Active Record patterns, and then I'll show how the same logic can be applied using the Data Mapper pattern. In both cases, we'll see how we can move our business logic into our business entities, thus avoiding anemic business domain. We'll also cover pros and cons of the two styles of ORMs and how they affect the way we write our code.

Speed up your PHP application with Zend OpCache

OpCache is like APC - it caches your compiled PHP so you don't need to rebuild it on every request. PHP 5.5 comes with OpCache out of the box. I happen to have PHP 5.4 and wanted it now, so I decided to install it. Here's how.


There's some confusion about what the PHP-FIG is. I'm here to add to that confusion.