Our Company has been in the process of evaluating the Symfony Framework for PHP. We have written several projects using the framework some small and some larger. In this post I intend to layout some of pluses and drawbacks of this particular PHP Framwork. (its worth noting that we tested using version 1.4 with Doctrine.)
- Symfony routing is amazing. The ability to change urls at will without adjusting links is wonderful. The flexibility allows for much more meaningful and useful urls. It makes for shorter and easier to remember urls.
- Symfony makes adding new programmers to a team easier. By enforcing a system of common organization, it allows a new programmer to quickly find code and understand the flow of a program.
- Symfony cache speeds up page loads. The caching system built into the Symfony Framework is quite flexible allowing you to define which pages (or even parts of pages) are cached and which ones should be generated every time.
- Doctrine makes database interaction easy: Doctrine allows you to ignore the database and just deal with objects. It takes care of mapping objects to records for you. This removes coding time and error potential.
- Symfony provides a great system of code reuse. Through the use of partials, templates, filters,and helpers, the Symfony Framework provides a structured way to re-factor not only php code but also html snippets.
- Doctrine is slow. For a database with ajust a few records, Doctrine is wonderful, but if you are dealing with a 100+ records, Doctrine feels like riding a Tortoise on a state highway. Some of this is made up for by the cache system, but there is no good reason for the degree to which Doctrine slows down code execution.
- Symfony Forms are a pain. Although they can often just be dropped in, trying to customize and extend forms can be a real headache.
- Symfony has way too many folders. Organization is great, but really?
Overall, I would cautiously recommend the Symfony Framework for PHP. If you are doing a small project, its probably not worth the effort, and if scalability and speed are big issues, you will want to avoid Doctrine. However, if you are doing a medium scale project where caching is acceptable, Symfony may just be the PHP framework you need.