Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Vertabelo Blog:
Side by side: Doctrine2 and Propel 2
Apr 13, 2015 @ 14:55:10

On the Vertabelo blog Patrycja Dybka has put together a side-by-side comparison of Doctrine 2 vs Propel 2, two of the more popular PHP-based ORM tools, largely popular in the Symfony communities.

When you start working with data in an application, you may need to use an object-relational mapper (ORM), a layer between the database and application. For PHP the two most frequently used ORM's are Doctrine and Propel. That's why I decided to compare the main features of Doctrine in version 2.4.7 and Propel in version 2.0.

She doesn't try to pick a "winner" but instead talks about the features of each and the main difference between the two (ActiveRecord vs DataMapper patterns). The remainder of the post is the side-by-side listing of the feature of each including:

  • Install method(s)
  • Model structure definition types
  • Mappings
  • Supported databases

There's also some examples in the list of code to define tables, perform basic CRUD (create, read, update & delete) operations, basic queries and custom data types each includes. It's a good comprehensive list if you're trying to make a decision between the two or even just looking to find out what each has to offer.

tagged: doctrine2 propel2 sidebyside compare features examples

Link: http://www.vertabelo.com/blog/technical-articles/side-by-side-doctrine2-and-propel-2-comparison


Trending Topics: