Why Use Propel?

It makes database coding fun again.

  • Propel gives your database a well-defined API. Instead of creating complex SQL statements for finding and manipulating data, developers make calls to a simple API.
  • Propel uses the PHP5 OO standards -- like Exceptions, SPL autoload, and Iterators -- to fit easily into your application or framework.

It fits naturally into the MVC pattern.

  • Propel provides the "Model" of the MVC architecture.
  • Through assumed class extension, Propel provides an easy way to encapsulate datamodel logic (data validation, etc.).

It makes for more secure applications.

We understand that security is an increasing concern in web applications. We also understand that no tool will solve security for developers, but we also believe that tools can help.

  • Propel uses prepared statements to ensure that all values that are sent to the database are appropriately escaped or binary encoded.1
  • Propel casts data coming from the database as the appropriate types (string, integer, boolean, float, etc.) so that you can choose to enforce strict type checks in your PHP application.

1 Note that while prepared statements do ensure that column values get quoted, these cannot be used for all parts of the SQL statements. For example, the ORDER BY clause cannot be quoted and it is up to your application to ensure that columns in ORDER BY do not contain malicious code.

It makes for more portable applications.

  • Migrating an application that uses Propel from one RDBMS to another is a simple configuration value change.
  • Propel also provides tools to assist in migrating data from the source to target RDBMS.

It is designed to be customized and extended.

  • The generated classes that are built are designed to be extended. Propel creates empty stub classes where you can put your custom logic or override parent methods. These classes won't be overwritten if you decide to make some changes to your model and regenerate.
  • Extending the capabilities of Propel itself is also within easy reach, as Propel uses simple  Phing tasks and OO builder classes to generate the classes for your object model.