I'd never heard of Symfony before. Can someone point to some tech details about the framework? The site does a lot of explaining what a framework is, and some general philosophies - but not what this particular framework is.
Symfony is a rather popular PHP framework; it is commonly regarded in the PHP community as one of the higher-quality frameworks (amidst many half-baked frameworks that cause serious problems once your use case moves past the blog tutorial).
In terms of functionality, it's basically for PHP what Rails is for Ruby, but unlike many other PHP frameworks, it's been designed with the platform in mind rather than trying to force Rails' concepts into PHP, as a result if which it feels "just better". This has given it an edge over competitors, which is why Symfony is remarkably popular among the more professional PHP businesses.
I think it's basically the only mature and popular surviving framework that dates from the blast of PHP frameworks that came to be when Rails got popular and PHP coders wanted that too.
Symfony is closer to django than to rails (in terms of APIs, I believe the project itself is built in a more modular manner) though, many of symfony's features are almost straight ports of django features, sometimes renamed.
I have not seen a greenfield, or even brownfield, CakePHP or Zend project in years, outside of $BigCo environments. Calling CakePHP in particular a "market leader" seems rather wrong.
Zend is well-written and solid, but old; it hasn't been materially upgraded for PHP5.3--which is all you should be using these days, there's no good reason not to.
Symfony2 can trivially use Zend-based components. (It does, for some tasks.) I've heard it wise-assedly called "ZF3" because of its compatibility in the past.
Same here. No Idea where this came from. To be honest the effort put into this could've just contributed to an existing open source framework for improvement.
You sound like a PHP coder telling DHH to stop doing Rails 3 and get working on some existing open source framework instead.
I know that HN is somewhat ignorant of the PHP community due to the large set of idiots there and the so not cool factor, but you're taking this to the extreme. Symfony is probably one of the most decent and most widely used pieces of open source PHP out there.
I may be in the process of updating a very neglected cakephp site. When I created the site, I had heard of Symfony but went with cakephp. I've not followed either framework for well over a year, so could you please give your reasons for Symfony and against cakephp?
CakePHP is fundamentally old. It does not avail itself of the capabilities offered in PHP5.3+ and persists in a number of outdated patterns that I consider detrimental to writing good, reusable, maintainable code. It is also incredibly slow, such that it is sort of the "gimme" for people wanting to write benchmarks to show how fast and awesome their new framework is.
Symfony2, on the other hand, is very well-designed (separating entirely from Symfony 1.3 to develop Symfony2 was a great decision), incredibly flexbile, and amazingly performant. It is, no exaggeration, the best PHP system I've ever seen, open-source or otherwise; unless you're Mr. Potencier, reading its code will make you a better PHP programmer. You can actually strip it down so far as to be just a microkernel + dispatch, which is what Silex[1] is. You can also built all manner of whatever-you-want on top of it. There's no real downside to using at least part of the Symfony2 ecosystem for any PHP project.
To my experience, Cake simply does not grow beyond their own blog tutorial.
Maybe they fixed this, but last time I used Cake, for instance, if you were overriding hooks in the Model to e.g. change the data as returned to the view/controller, you had to do this different depending on how the data was collected. So in the same hook method of the BananaPeer, you either got a single Banana, or an array of Banana objects, or an array with a key "Bananas" which had an array of Banana objects. There was no way to figure this out except with a lot of testing. There was no uniform way to implement standard features and constraints inside the model.
Cake was full of this kind of shit. It was, simply, horribly badly designed and to my impression only popular because its web site was pretty. The source code was horribly undocumented and the internal SQL query building process was a disaster.
Personally, I think that Cake was popular because it was one of the first frameworks out there. It's been surpassed by all sorts of folks (Symfony2 now chief among them).
I think that, next time someone asks me why Cake sucks, I'm just going to say "BananaPeer" over and over again.
I love it how I get marked down for a clean post with an opinion and you get a pass by declaring people idiots for just expressing their opinion. The way I see it the idiots seem to be on your side. Just learn to express your side of things without getting irritated. I am open to correction but insults I'd piss on.
Another way to understand the level of the community commitment is to compare it with other projects. Symfony2 is currently the most popular PHP project on Github (most forked and most watched overall) and the 12th most forked project for the whole Github platform. That's just astonishing!
Standards compliance:
Symfony2 embraces standards: First, Symfony2 is willingly centered around the HTTP specification (just have a look at the built-in HTTP reverse proxy). Then, we are embracing the PHP standards: PHPUnit, namespaces, PSR-0 autoloader, ... That makes Symfony2 easily interoperable with many other great PHP libraries.
Caching:
By embracing the HTTP standard, and thanks to the ESI standard, you can make your application fly very easily. Make your application as dynamic as you need it to be, and still benefit from HTTP caching. And if you can afford the installation of a reverse proxy like Varnish, the performance of your application will just be incredible.
Whoa, this is very cool. (I have a legacy Midgard MVC app I'd like to get rid of.)
Between Symfony2 and Silex, I'm not sure what case there is to use anything else anymore. It seems like the low and high ends are very well covered in the Sensio Labs environment, and I'm not sure how much room there is in the middle.
Ping me on Freenode #midgard and I can give you more info how to proceed. Out of curiosity, though: are you sure this is Midgard MVC and not MidCOM, the older MVC framework for Midgard?
Doesn't matter, though. We're building compatibility bundles for both. Though Midgard MVC is already in somewhat running state.
Comments
I'd never heard of Symfony before. Can someone point to some tech details about the framework? The site does a lot of explaining what a framework is, and some general philosophies - but not what this particular framework is.
Symfony is a rather popular PHP framework; it is commonly regarded in the PHP community as one of the higher-quality frameworks (amidst many half-baked frameworks that cause serious problems once your use case moves past the blog tutorial).
In terms of functionality, it's basically for PHP what Rails is for Ruby, but unlike many other PHP frameworks, it's been designed with the platform in mind rather than trying to force Rails' concepts into PHP, as a result if which it feels "just better". This has given it an edge over competitors, which is why Symfony is remarkably popular among the more professional PHP businesses.
I think it's basically the only mature and popular surviving framework that dates from the blast of PHP frameworks that came to be when Rails got popular and PHP coders wanted that too.
Symfony is closer to django than to rails (in terms of APIs, I believe the project itself is built in a more modular manner) though, many of symfony's features are almost straight ports of django features, sometimes renamed.
are you saying Symphony is better than market leaders Zend and Cakephp and becoming more popular these days ,
isnt it so that its much easier to find a Zend plugins/libraries or Cakephp ready-made plugin/library than to find Symphony code snippets
I have not seen a greenfield, or even brownfield, CakePHP or Zend project in years, outside of $BigCo environments. Calling CakePHP in particular a "market leader" seems rather wrong.
Zend is well-written and solid, but old; it hasn't been materially upgraded for PHP5.3--which is all you should be using these days, there's no good reason not to.
Symfony2 can trivially use Zend-based components. (It does, for some tasks.) I've heard it wise-assedly called "ZF3" because of its compatibility in the past.
I'm not sure that CakePHP is any more a market leader than Symfony.
Same here. No Idea where this came from. To be honest the effort put into this could've just contributed to an existing open source framework for improvement.
You sound like a PHP coder telling DHH to stop doing Rails 3 and get working on some existing open source framework instead.
I know that HN is somewhat ignorant of the PHP community due to the large set of idiots there and the so not cool factor, but you're taking this to the extreme. Symfony is probably one of the most decent and most widely used pieces of open source PHP out there.
Sadly, Symfony/Symfony2 are not widely used enough. :/
(This may be a bit flippant, but seriously--there's not really a good reason to be using stuff like CakePHP, etc. in 2011.)
I may be in the process of updating a very neglected cakephp site. When I created the site, I had heard of Symfony but went with cakephp. I've not followed either framework for well over a year, so could you please give your reasons for Symfony and against cakephp?
CakePHP is fundamentally old. It does not avail itself of the capabilities offered in PHP5.3+ and persists in a number of outdated patterns that I consider detrimental to writing good, reusable, maintainable code. It is also incredibly slow, such that it is sort of the "gimme" for people wanting to write benchmarks to show how fast and awesome their new framework is.
Symfony2, on the other hand, is very well-designed (separating entirely from Symfony 1.3 to develop Symfony2 was a great decision), incredibly flexbile, and amazingly performant. It is, no exaggeration, the best PHP system I've ever seen, open-source or otherwise; unless you're Mr. Potencier, reading its code will make you a better PHP programmer. You can actually strip it down so far as to be just a microkernel + dispatch, which is what Silex[1] is. You can also built all manner of whatever-you-want on top of it. There's no real downside to using at least part of the Symfony2 ecosystem for any PHP project.
http://silex-project.org/
To my experience, Cake simply does not grow beyond their own blog tutorial.
Maybe they fixed this, but last time I used Cake, for instance, if you were overriding hooks in the Model to e.g. change the data as returned to the view/controller, you had to do this different depending on how the data was collected. So in the same hook method of the BananaPeer, you either got a single Banana, or an array of Banana objects, or an array with a key "Bananas" which had an array of Banana objects. There was no way to figure this out except with a lot of testing. There was no uniform way to implement standard features and constraints inside the model.
Cake was full of this kind of shit. It was, simply, horribly badly designed and to my impression only popular because its web site was pretty. The source code was horribly undocumented and the internal SQL query building process was a disaster.
Personally, I think that Cake was popular because it was one of the first frameworks out there. It's been surpassed by all sorts of folks (Symfony2 now chief among them).
I think that, next time someone asks me why Cake sucks, I'm just going to say "BananaPeer" over and over again.
Because bananas don't have peers.
I love it how I get marked down for a clean post with an opinion and you get a pass by declaring people idiots for just expressing their opinion. The way I see it the idiots seem to be on your side. Just learn to express your side of things without getting irritated. I am open to correction but insults I'd piss on.
The blog post gives some background.
Popularity:
Another way to understand the level of the community commitment is to compare it with other projects. Symfony2 is currently the most popular PHP project on Github (most forked and most watched overall) and the 12th most forked project for the whole Github platform. That's just astonishing!
Standards compliance:
Symfony2 embraces standards: First, Symfony2 is willingly centered around the HTTP specification (just have a look at the built-in HTTP reverse proxy). Then, we are embracing the PHP standards: PHPUnit, namespaces, PSR-0 autoloader, ... That makes Symfony2 easily interoperable with many other great PHP libraries.
Caching:
By embracing the HTTP standard, and thanks to the ESI standard, you can make your application fly very easily. Make your application as dynamic as you need it to be, and still benefit from HTTP caching. And if you can afford the installation of a reverse proxy like Varnish, the performance of your application will just be incredible.
Bear in mind that ESI with Varnish is a tricky one! But it is very, very exciting to see a framework embracing it nonetheless.
Careful; symfony has been around for a few years already.
Saying the effort should be put into some other framework is effectively turning the case upside down.
Exactly. It actually seems to go the way that various other PHP frameworks can be replaced with Symfony2.
There is already a compatibility bundle for running Zend Framework apps with Symfony2:
http://symfony2bundles.org/beberlei/WhitewashingZFMvcCompatB...
And I'm working on another bundle that allows running Midgard MVC apps:
https://github.com/bergie/MidgardMvcCompatBundle
Whoa, this is very cool. (I have a legacy Midgard MVC app I'd like to get rid of.)
Between Symfony2 and Silex, I'm not sure what case there is to use anything else anymore. It seems like the low and high ends are very well covered in the Sensio Labs environment, and I'm not sure how much room there is in the middle.
Ping me on Freenode #midgard and I can give you more info how to proceed. Out of curiosity, though: are you sure this is Midgard MVC and not MidCOM, the older MVC framework for Midgard?
Doesn't matter, though. We're building compatibility bundles for both. Though Midgard MVC is already in somewhat running state.
Wait, what? Symfony 1 and Zend framework are 2 of the most popular frameworks for PHP. If you've never heard of it, you haven't been paying attention.
I stand corrected then.