Fabulous PHP frameworks: Symfony

Symfony offers extensive features such as excellent debugging and logging, but the learning curve is steeper than most

1 2 3 Page 3
Page 3 of 3

It's not a cakewalk, though. To actually create classes and methods for accessing your database tables, you must take one of two routes. If you're comfortable with SQL, you can build the database and tables, then use a command like the following to create the YAML code for the schema:

php symfony propel:build-schema

Or you can write the YAML code directly, and use the Symfony command-line tool to create the SQL for accessing the database. Something along these lines creates the needed SQL to build the database:

php symfony propel:build-sql

To actually create the tables, follow it with:

php symfony propel:insert-sql

Either way gets you there. Then, you use to construct all the classes that map the records in your database tables to objects:

php symfony propel:build-model

Symfony's website provides plenty of documentation. You'll find the Getting Started tutorial and four online books. One book is an introductory guide, another is a collection of 24 daily tutorials that take you through the process of building a substantial website, another book is a reference guide, and the last covers more advanced topics. There is also a browsable API document online, as well as "screencast" demonstrations.

In the short time I was able to work with Symfony, it became obvious that to really make it sing, you must become well versed in its various technologies: the Symfony framework's API, YAML, and JavaScript. (SQL doesn't hurt, either.) Happily, there's lots of help along that road. The documentation is very good, and Symfony's debugging and logging capabilities are second to none. But expect to spend more time to become proficient in Symfony than with the other frameworks.

Read the reviews of other PHP frameworks:

Also on InfoWorld:

This article, "Fabulous PHP frameworks: Symfony," was originally published at InfoWorld.com. Follow the latest news in software development and PHP at InfoWorld.com. For the latest business technology news, follow InfoWorld.com on Twitter.

Copyright © 2011 IDG Communications, Inc.

1 2 3 Page 3
Page 3 of 3
How to choose a low-code development platform