

Why Symfony (over framework X)? - dave1010uk
http://fabien.potencier.org/article/65/why-symfony

======
chrisacky
The title of this article post "Why Symfony (over framework X)" is highly
misleading when all of the arguments that are suggested for choosing Symfony
apply also to ZF.

It is also _missing a substantial disclaimer_ , in that the article is written
by the founder of the Symfony Project (if you weren't aware)... Anyway... I'm
not going ot argue on the merits of which framework is better, (I use both and
think they are both fantastic, but this post is grossly misleading if you are
trying to do a subjective comparison).

\- ZF employs a use at will philosophy. You don't have to use any components
or the full stack if you don't want to.

\- ZF is also used by many large companies. How is this different to Symfony?
(clue: It isn't).

\- ZF also has a huge community, it also has a huge demand for ZF developers.
As does Symfony. Both IRC channels have several hundred users connected
always.

\- ZF, also embraces the "don't reinvent the wheel" philosophy (where
possible). That's why ZF never tried to implement an ORM. What's the point
when Doctrine exists. The only reason it wasn't include in sources is because
of mutually exclusive licences.

\- "Symfony tries to bring innovation to PHP"... This is a little facetious,
but ZF also does the same. Symfony and ZF both have a minimum PHP version of
5.3... Both have started to make the lifes of developers as easier as possible
with composer/phar. ZF also uses Dependency Injection...

Background: I use both Zend Framework and Symfony on the same project. Why?
Because they both use the same use at will philosophy... So to say "Why use
Symfony" or "Why use Zend Framework" over another framework... is misleading
again, because ultimately, you are never restricted to a single framework
anyway, you can still pick out individual components... The only real choice
you have is which MVC/Application you want to use.

Just added this submission also: <http://news.ycombinator.com/item?id=4488582>

~~~
lsmith77
sure .. they also both use PHP .. what is your point? just because some
arguments also apply to ZF2 do not make them non applicable for choosing
Symfony2.

however he also mentioned a few others, like a huge list of applications
migrating to Symfony2. that being said ZF1 at least at more apps based on it
than Symfony 1.x. However a list of Drupal, ezPublish, phpBB etc is indeed
quite a big shift that Symfony2 managed to pull off.

also Symfony2 has had 2 major websites in production for 2 years now and a
stable release for over a year leading to 1600+ Bundles (of course I would
assume 80% are of questionable quality). I am not aware of any major website
today using ZF2 and the number of available Modules is much smaller.

the fact that Symnfony2 has a lot more contributors than ZF2 can also not be
disputed.

the fact that the lead developer of ZF2 says that when creating their new Form
API he didnt even look at the API already in Symfony2 also shows that they do
in fact have a reinvent the wheel mentality.

that being said .. ZF2 does have some philosophical differences that might
make it more viable for some users with specific preferences. f.e. ZF2 ships
with autowiring and a view layer out of the box. these features require 3rd
party Bundles for Symfony2.

so my point is .. if you really want to position ZF2 as an alternative to
Symfony2 then please focus on what makes ZF2 unique. that would in fact be
something productive. listing all the things ZF2 can also do is legitimate as
well of course, but can hardly be used as criticism to someone talking about
the advantages of Symfony2 unless you can illustrate that the bulk of all PHP
frameworks out there provide these capabilities and characteristics.

~~~
polynomial
> "I am not aware of any major website today using ZF2"

I was surprised to read this. Since no one has contradicted, I'll presume it's
veritable, but surprising nonetheless.

~~~
caseysoftware
ZF2 had it's first formal release this week, so the odds of any site running a
release candidate formally are pretty low.

After any major release of a framework, there will be a shake out period.. so
the long term stability of Symfony is a pretty compelling point to me.

~~~
lsmith77
well for Symfony2 there were two major sites running on Symfony2 pre alpha
versions (2 years ago) .. and several others more in alpha. Obviously these
teams had to spend a fair bit if time keeping up with all the BC breaks before
the stable release, but it helped a lot in ensuring that Symfony2's stable
release was ready for the real world.

~~~
ericclemmons
We were running pre-alpha back then, too :)

The performance over our previous ZF app (practically 1-to-1) was huge!

Upgrading was a pain each time, but as a result we all become intimately
familiar with the internals and even contributed a fair bit to the core.

------
madarco
Maybe he should have said:

\- Symfony2 has a way way better debug toolbar and profiler

\- a better integrated assets management (through Assetics and Capifony, both
external projects but a de-facto standard, also documented in the main docs)

\- a better documentation, focused on how to do, instead of how it works. (As
a Zend advocate in some big companies in Italy, the most frequent question
with ZF was "where to start?")

\- A better command line component

\- Even if loosely coupled (eg: Silex), Symfony2 identifies a standard set of
components. So when I look for a freelance Symfony2 developer, I know for sure
that he will master twig, assetics, doctrine, swiftmailer, the DI container
ecc.

\- Symfony2 is now a year old, with an incredible amount of bundles available.

------
ayi
Almost all of the arguments are applicable to ZF2 too.

\-- "Standalone components". Check. \-- "Using by big companies like BBC".
Check. \-- "Community". Just check StackOverflow for zend framework. Check.
\-- "Here to stay". It's the Zend company. Check. \-- "Innovations". Just
check the source code of ZF2 and be amazed. Check.

~~~
risratorn
That's why he said that he's not trying to discredit other frameworks, he's
pointing out the selling points for Symfony2. I like both ZF and Symfony2,
they are both very different frameworks and are fun and easy to work with.
It's just a matter of personal choice.

Fabien deserves some credit for being so open, it's open source, people should
use what they like. And if they don't know what to choose it's things like
this they should be basing their choice on. I'm waiting for matthew to write
the counterpart :)

~~~
ayi
Symfony2 was great and it's still great. It's "the state of the art" for "how
a good PHP framework should be".

But announcing a minor version upgrade on the same day with a "Omg, i was
waiting for this framework for 3 years!!" framework is not cool. It's some
kind of "news hijacking".

By the way, sorry for my bad english.

~~~
elliotanderson
Unfortunate timing indeed.

To be fair, the final RC's for Symfony2 and ZF2 were announced last week on
the 28th and 29th respectively, both with a note stating the final release
would be this week. Today was the last chance to release without half the
world packing up for the weekend or breaking their promise.

------
tzaman
Why did you link to TED, but not YouPorn? :)

~~~
ubojan
I think because of SEO

------
tudorw
The documentation and tutorials I read for version 1 was superb, I've not
dived into 2 enough to know, is it as good ?

~~~
danielbarla
In my opinion, version 2's documentation is superb. I can't compare it
directly against version 1's (never used / read version 1), but it's well
written, well structured, has clear examples (including some which are non-
trivial), and dives into various concepts (e.g. the section on HTTP caching).
Overall, excellent documentation.

Here's a link to the documentation if anyone's interested:
<http://symfony.com/doc/current/book/index.html>

~~~
SnaKeZ
I'd like to see a Kindle version (Symfony 2.0 Book)

------
ericclemmons
If I were to choose a single reason as a developer, it would be the Form
component. Forms are historically a nightmare of boilerplate, validation,
normalization and data mapping, but it is nearly trivial to go from $_POST to
a populated object graph.

------
Kiro
Nice but not enough to make me switch from CakePHP or make me sad I didn't
pick Symfony to begin with.

~~~
debacle
CakePHP and Symfony are two completely different beasts. If you don't see the
merits of Symfony yet, chances are you're not working on projects of a scale
that benefit from using Symfony.

~~~
Kiro
Mind to elaborate?

------
dewiz
BBC PHP framework is Zend Framework, it's sad to see such a lie as one of the
main selling points. If Symfony is used at all in BBC is perhaps only to
experiment the alternatives.

~~~
Seldaek
They have at least confirmed they use Silex, which is based on Symfony
components.

~~~
dewiz
I don't know who you would mean with "they", but BBC doesn't use Symfony nor
Silex. Feel free to contact BBC Future Media engineers, many of them are on
linkedin.

That history about Silex is ONE developer testing it on a pet project, which
is a completely different thing than saying "BBC uses Symfony"

~~~
malsme
According to a recent talk by a lead developer, the website does now implement
Symfony2 components on top of the Zend Framework.

[https://speakerdeck.com/u/jcleveley/p/how-we-built-the-
new-r...](https://speakerdeck.com/u/jcleveley/p/how-we-built-the-new-
responsive-bbc-news-site)

