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.
I 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.
Just 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.
IMO 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.
Feel free to check Symfony2 at 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.
Explain 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.
I 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.
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.
Cmon 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.
It's not. Rack's a framework for composing applications of middleware/intermediary components by specifying conventions for delegating requests and responses.
From the blog on the rack website: "Rack aims to provide a minimal API for connecting web servers and web frameworks."
The PHP SAPI handles the HTTP request and dissolves it into super globals for the environment to consume. This is all you need to handle a HTTP request. It just doesn't get any more minimal than that.
I'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.
That's probably only true because you hear about it here, which is a very self-selective group, who tend to lean towards Ruby, Python and the "popular" trends. In the PHP community being like ruby, or rails is not necessarily a plus and can in fact may be a negative depending on what you're trying to accomplish.
Frankly I'm sick of articles such as these, as if the author is pleading with this selective community that it's OK to use PHP. Somewhat sickening. They should feel confident in the tools they use without having to justify it to anybody.
Active Record (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?
The 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.
I 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.
I 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).
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.