Propel vs. Doctrine

O propósito dessa página é prover uma visão concisa e fatual dos maiores ORM's disponíveis para o symfony. Ambos possuem prós e contras, então devemos evitar "flame war"

Propel Propel Doctrine
Status - Versão Stable (1.2.1) Beta (1.3) Beta
Interface de acesso à banco de dados (Underlying DBA) Creole (codificado em PHP) PDO PDO
Prós -Parte do núcleo do symfony
-Estável
-Existing Symfony documentation
-Muitos dos plugins do symfony utilizam propel
-Code completion available in IDEs (non-magic methods)
-Fast (replaced 1.2.x bottleneck (Creole) with PDO
-Code completion available in IDEs (non-magic methods)
-Fast (far fewer queries, and PDO retrieves resultsets faster)
-Suporta herança
-Manipula relacionamentos muitos-para-muitos facilmente
-Supports arbitrary complex joins with a single statement
-Object population for arbitrary queries (no need for custom hydration functions)
Contras -Relies on pre-generated classes for joins
-Uses more queries to retrieve the same data
-Requires custom classes to retrieve datasets not predicted by class generation
-Verbose coding style (Criteria vs DQL)
-Não suporta herança
-Não suporta relacionamento muitos-para-muitos
-No cross-schema relationships
-Pouca documentação
-The version shipped with symfony is based on Creole (which isn't actively developed)
-Plugin?
-Beta
-Plugin?
-Versão 1.0 ainda não lançada
-Uses magic methods in PHP, meaning no code completion for database properties

Conclusão

  • Doctrine has come leaps and bounds, and remains often easier to work with for 'complex' schema.
  • Propel's newest release (1.3) is in beta, but uses the same underlying technologies that Doctrine does (PDO), levelling the performance playing field. Rough benchmarks imply that for simple operations, Propel is faster. Although, for complex operations, Propel is notorious for using more queries that Doctrine, so Doctrine comes out on top. It comes down to what you're doing with it as to which is "right" for your project.

Propel 1.2 remains bundled with Symfony 1.0, and has a lot of useful plugins developed for it. If you're game, try Propel 1.3 or Doctrine and see how you go.