views:

536

answers:

3

Hi guys,

do anyone suggest using an external ORM like Doctrine/Propel over the defualt Zend_Db_Table in Zend Framework ?

I think your answers with reasons would be valuable across the ZF community.

-DevD

+1  A: 

It depends on how you have designed your application.

With the exception of ActiveRecord, ZF provides implementations for three of the four Data Source Architectural patterns in PoEAA. If your model objects map very closely to your database structure, then the ZF components might be sufficient for your app.

If your objects are mapped to/aggregated from multiple tables, a custom DataMapper on top of the ZF DB classes or a full fledged ORM, like Doctine or Propel might be better suited. Only you can decide this.

Gordon
A: 

I would recommend:

  1. Doctrine 2.0 - cross platform, ease of use, good performance, good documentation, support for namespaces, powerfull, maybe it will be a part of ZF 2.0
  2. Doctrine 1.2 - cross, platform, ease of use, easy to implement, useful extensions (e.g NestedSet, Taggable, Commentable), good documentation, works with ZF autoloader, CLI tool, YAML, data fixtures
takeshin
Doctrine 2.0 is still in alpha stage
Gordon
+2  A: 

A full fledged ORM might also provide some extra functionality that is useful for you. Some might like DQL as used in Doctrine, others maybe would like to avoid writing queries by hand to retrieve objects, and might prefer fluent interfaces like the ModelCriteria Query API in the upcoming Propel 1.5.

So basically, it all depends on your own needs, there's no single "best solution" that fits all projects.

wimvds
I agree. Personally, I want the concrete getter )
lo_fye