6 ms·
I have yet to come across a compelling web framework written in php. If re-use between projects was really of concern for their community, they would've pushed
by AffableSpatula 16y ago
I have yet to come across a compelling web framework written in php.
If re-use between projects was really of concern for their community, they would've pushed for a standard http interface like rack - which they haven't, aside from a couple of brief (largely ignored) experiments.
php is a necessary evil in some instances simply because some useful apps have been built with it.. but if I'm writing a web application from the ground up there's no way I would opt for php.
- Seldaek 16y agoFeel free to check Symfony2 at http://docs.symfony-reloaded.org/master/ http://docs.symfony-reloaded.org/master/ - it does not have much to do with symfony1 by the way, in case you'd decide to dismiss it due to past experience.
- harisenbon 16y agoI rather like CakePHP (it's like ruby on rails, in PHP!(tm)). While it maybe doesn't live up to it's RoR hype, it is a really solid framework, and has cut down on my development time by more than I can possibly express.. I find it alot easier to use than Symphony, and you can generally get a CRUD up and running in about 10-20 minutes right out of the box.
- morganpyne 16y agoJust a quick note - Symphony (the CMS) is different to Symfony (the Framework) - I presume you meant the latter? These two seem to get confused all the time.
- harisenbon 16y agoSorry, I did mean Symfony (the Framework), not the CMS.
- kaylarose 16y agoIMO Symfony (especially Symfony2) is much more Rails-ish than CakePHP. Cake PHP is Railsish in that it an MVC with psuedo-scaffolding, but Symfony2 is much closer to the real thing.
- bergie 16y agoIt looks like there is some hope for code sharing and consolidation through the Apache Zeta Components project: http://bergie.iki.fi/blog/php-finally_getting_an_ecosystem/ http://bergie.iki.fi/blog/php-finally_getting_an_ecosystem/
- OstiaAntica 16y agoCheck out Yii http://www.yiiframework.com/ http://www.yiiframework.com/
- damncabbage 16y agoI'm a big fan of Yii, and I use it a lot in my own projects. (The fact that it has an nigh-direct clone of Rail's ActiveRecord helps.) It does, however, have the same problem that a lot of other PHP frameworks have in that, unless you're really careful, your components are "trapped" because of the Yii idioms and base classes. I think Mr Spatula's point stands. Code reusability in PHP is nothing like what it is in the Ruby world.
- Supermighty 16y agoI find it interesting that the positive things I hear about PHP frameworks are in reference to features influenced by RoR.
- xd 16y agoActive Record (http://en.wikipedia.org/wiki/Active_record_pattern http://en.wikipedia.org/wiki/Active_record_pattern) is an architectural pattern and not something born in RoR. The parent just happened to mention an implementation (for which there are many in PHP) copied from RoR. I'm curious, what other RoR influenced PHP framework features have you heard of?
- damncabbage 16y agoThe pattern is good. It's the extras on top of what the pattern proscribes, though, that makes Rails' implementation great, eg. composition via behaviors, easy validation and relations, and scoping for bundling sets of common query criteria. PHP implementations run the gamut from basic low-hanging-fruit-grabbing attempts (like CodeIgniter's frankly, well, weird implementation) to fully-featured ones like Yii. I do agree that they goes as far as doing most of RoR's implementation and then just... stop. > ... what other RoR influenced PHP framework features have you heard of? RoR-like routing shows up frequently as well, and in Yii's case, Views templates have the same access to both directly-assigned template variables, and variables belonging to the controller instance itself.
- xd 16y agoExplain why you think it is a "necessary evil", really, I'd love to know what insights you have that I somehow missed over the last 10years of developing successful large scale projects with PHP. You may also want to email the likes of Facebook, Yahoo, YouTube, Digg etc etc and let them know of the evil that lurks within.
- rick888 16y agoI feel like many developers are using RoR and Python simply because it's 'cool'. The old, reliable languages are boring. I also don't like the fact that many frameworks out there abstract layers away and make it so you don't really know what's going on underneath. This makes it easy to say you are a developer (because you can make something) when you are just mashing frameworks together. I've also been using PHP for the last 10 years and have never had problems scaling or writing good code.
- xd 16y agoI couldn't agree more. I choose PHP, all that time ago, because back then I was a C developer. I fell in love with the fact you could create your own C extensions and that the PHP syntax was similar to C syntax, so it was easy to pick up and make it do what I wanted it to do. I've only every toyed with frameworks, never used one as such, because I built my own library up over the years that is suited to my needs.
- AffableSpatula 16y agoCmon man, I didn't say it is impossible to build scalable web apps with it. The php landscape's lack of an equivalent to rack is an insane situation for a 'web' language, and a good example of why it's a bad choice of platform if you have the option. Yes, you can write scalable web apps with php.. you can also walk everywhere on your hands; but it's unnecessarily painful and awkward, so most sensible people avoid doing it on a regular basis.
- xd 16y agoYou've heard of the PHP SAPI, right?
- rick888 16y agoI just started using the CodeIgniter framework. It has a small footprint and doesn't try to include the kitchen sink (which is one of the reasons I stayed away from frameworks for so long).
- FreebytesSector 16y agoYou should consider taking a look at the Yii framework. It is an alternative to CakePHP, it is new, and it is fun.
- Joeri 16y agoI would have agreed a few years back, but these days the amount of PHP code I write relative to the project size is small enough that there's no ROI to switch platforms, even for new projects. Most of the code I write is static javascript, and PHP exists only to load and save the business data. That's also why all of those frameworks aren't very relevant to me. I have no use for server-side MVC because the server isn't involved in the application UI. I have no use for ORM, because building up an object structure in memory only to deflate it again into a web service response is often overkill. I do use Zend Framework, but I use it to simplify my transactional DB logic and to assist in bootstrapping the web services.