Hacker News new | ask | show | jobs
by robryan 5451 days ago
I don't know about the more technical debt stuff, sure if you go off and use all the parts of the language any old way it will let you make a mess but there is no reason you can't apply some of the same practices that something like rails enforces on you.
1 comments

Agreed. Symfony2 is an excellent base for this reason--Fabien Potencier and friends are, as far as I'm concerned, the guys to look at for writing clear, maintainable, excellent PHP code.
It's not only Symfony2, PHP has a lot of high-quality projects going on: Zend Framework, Doctrine, Solar/Aura, Twig, Lithium, Jackalope, FLOW3 and probably much, much more.
While some of your other listed projects are okay (as it happens, Doctrine and Twig are both used as part of Symfony2), Zend is generally considered about as ancient as CakePHP today, and I don't really know anyone who recommends using it for new projects. Most of the "big-name" PHP projects out there are creeping horrors (I'm looking at you, Wordpress), and Zend kinda falls into that bucket.

Personally I'd be very wary of Lithium as the code looks pretty slipshod internally from a brief scan into it, but Solar and FLOW3 are solid projects.

ZF is from a totally different league than CakePHP or Wordpress. Yes, a bit ancient today but in many parts it's a solid, well-written, flexible and extensible code well-suited for more "enterprise" needs. Probably more "production-ready" than Symfony2 is at the moment. Plus: ZF2, which will require PHP5.3, is in the works so it should make the project more "relevant" again.

Didn't dwell too much into Lithium's code but saw they have some interesting ideas also based on 5.3 features, e.g. they use a sort of aspect-oriented programming based on closures and lambdas. Sounds cool, even if only for experimenting with different programming approaches.

ZF2 may fix a lot of the complaints I (and other folks) have with Zend, but right now it's really hard to recommend it.

It's actually pretty much in the same league as CakePHP: old and slow. Not much to recommend it right now. (Symfony2 actually can pull in Zend-based libraries on its own without a problem, which is why among the more sarcastic of us I've heard Symfony2 described as "Zend 2 but actually here".)

Well, Symfony2 itself only until very recently was using some of the ZendFramework libraries internally (and Fabien often praised ZF), which I would say comes as a proof that it is a solid code, even if it's obviously lacking in some parts comparing to younger alternatives. In many cases it's still the best thing in the market though (Zend_Search_Lucene, Zend_Pdf, Zend_Amf, Zend_Gdata come to mind).
A big shout out to Yii Framework - its really fast!

check benchmark: http://www.yiiframework.com/performance/

Don't forget about Kohana. It's an excellent, well designed, framework for those using PHP.
Strongly disagree. Kohana is, IMO, rather poorly designed (while rewritten, it's still fundamentally all too similar to CodeIgniter for my liking). There is not a strong focus on security[1], there is not a strong focus on modernity--it's inexcusable to not be on PHP 5.3 today, and while Kohana will run there it does not understand PHP 5.3 idioms and features--and the code quality, after auditing, is not all that impressive.

Symfony2, on the other hand, puts a fairly strong emphasis on security, is fully based around PHP 5.3 idioms, and is written with sparkling code.

[1] - http://dev.kohanaframework.org/issues/2766 comes immediately to mind; forget the resolution of the bug (such as it wasn't), the behavior of the developers is not good. I get the feeling from those who've used Kohana that this isn't a unique situation.

Don't know why this was awarded the downvotes. For some types of applications, Kohana is perfectly fine.
Agreed!