Zend Framework or Doctrine
Posted on November 21st, 2009, by Cristian in Zend FrameworkJuozas Kaziukėnas has posted a new series of posts about combining Zend Framework and Doctrine ORM and the differences between the frameworks.
It was quite common to use Zend_Db_Table as base models class, but it was simply not practical. When you start dealing with relations and hierarchical data types it starts to get really tricky, because simply Zend_Db_Table doesn’t provide an extensive enough functionality. So half a year ago Zend Framework developers started to look for better solutions.
An alternative (and a very powerful one at that) was found in Doctrine – an object relational mapper tool that sits on a database layer. Doctrine 2 will even be the first ORM with seamless integration between the Zend Framework (and Symfony). He briefly touches on what some sample code might look like and the command to build out your model classes from predefined YAML files.
After evaluating possible solutions I decided to stay with Doctrine for a long time. I don’t know any other solution coming, I definitely don’t want (mainly because I don’t have time) to invest on creating my own library and Doctrine is simply awesome when you get used to it. After all this time I can say that it was a right call – Doctrine is on a way to being officially supported in Zend Framework
He then goes on to talk about the benefits of Doctrine and why it can save time. Well worth a read and following the rest of the series.
- Zend Framework and Doctrine [First Part]
- Zend Framework and Doctrine [Second Part]