Posts Tagged ‘Doctrine’

Database transactions

Thursday, September 17th, 2009

An interesting post on the Doctrine blog. Plus the word of the day. Yes, it’s a real word.

I want to sensibilize you for the fact that there are a lot of factors in PHP application performance and that you can very easily lose the performance that you hoped to gain by not using framework X or Z or building your own (”Not Invented Here”-syndrome) by several orders of magnitude through rather trivial errors or misconceptions.

This is also the run-on sentence of the day. But nevermind, I believe his point is that although you might think a complicated database abstraction layer like Doctrine would make things slower than simple selects, updates, deletes you’d be wrong. Using a framework developed by guys who, like the author, have thought through and benchmarked all this stuff is a big advantage. You only have to weigh that against the pain of the initial learning curve. Or maybe it’s like cycling – you’ll get faster but it will always hurt.

Doctrine ORM

Saturday, September 5th, 2009

Doctrine is an Object Relational Mapper for PHP. I’m new to this so correct me if I’m wrong – an ORM allows you to interact with databases on a purely objective level. I finished Day 5 of the 24 day symfony tutorial today and had my first exposure to this. Symfony is object-oriented through and through. Tying it to an ORM keeps everything in the realm of objects. That’s attractive but it also means, you know, a high level of abstraction. So it can be a little mind bending. But, I’m game. I’m tired of writing stuff that is just driven by constant data retrieval and iteration through records. It may be nice to have things more encapsulated and just sort of… always on.