Archive for January, 2009

Decoupling models from the database: Data Access Object pattern in PHP

Monday, January 5th, 2009

Nowadays it's a quite common approach to have models that essentially just represent database tables, and may support saving the model instance right to the database. While the ActiveRecord pattern and things like Doctrine are useful, you may sometimes want to decouple the actual storage mechanism from the rest of ...

Seven Things

Saturday, January 3rd, 2009

Oh no, another of these silly blog tagging games. I was tagged by Pádraic Brady, and the point is to share 7 random or weird facts about me.

Sandboxing Rhino in Java

Friday, January 2nd, 2009

I've been working on a Java app which needed Rhino for scripting. The app would need to run untrusted JavaScript code from 3rd parties, so I had to find a way to block access to all Java methods, except the ones I wanted. This would not be a problem if ...