« Painless Spec and Schedule Development | Why Tracking Bugs In Personal Projects Matters » |
Last week, Aaron Brazell posted a blog entry about the state of the WordPress and PHP communities. At the same time, Keith Casey was in Redmond, Washington, where he was experiencing the Microsoft Web Developer’s Conference. As so often seems to happen with “Aha!” moments, both men came to pretty much the same realization at the same time: the WordPress and PHP communities need each other, but don’t do nearly enough to work with each other.
Keith made his point clear when I explained to him that I agreed with what Aaron was saying in his blog post, but that WordPress supporting PHP 4 was WordPress’ “fatal flaw.” In his…articulate way…he reminded me that WordPress existed and flourished, in spite of our attempts to attack their support for PHP 4. Their use of PHP 4 was certainly not a fatal flaw, as much as our arrogance as a community seems to be.
The one thing I hate about Keith is that he has a tendency to be right. And he was right this time.
The reality is that you can’t separate the success of PHP from the success of other open source tools like WordPress and Drupal. As they have flourished, so has PHP; the success of each is interconnected with the success of the others. Yet it seems that the PHP community is fond of attacking and demonizing these communities, which only serves to drive them away from the PHP language.
WordPress and Drupal could exist independently of PHP, if PHP didn’t exist as a language. The need was there; they would have been written in Python or Ruby on Rails, or Fortran; the language is irrelevant; the need was paramount. The fact that they were written in PHP is an accident of history, not a divine destiny. They were written in a time before PHP was widely accepted. And they were written with the tools available at that time.
In short, we, as the PHP community, need to lay off. And we need to put up or shut up. Hate the fact that WordPress still supports that “dead language” of PHP 4? Write a patch. Hate that Drupal’s UI would make a geek cry out in agony? Write a patch. These are open source projects; we each can look at the source and make them better. But we should never, ever attack these projects for not conforming to our standards. Especially if we’re not improving them.
And we need to be better about interfacing with the communities that surround these projects. Each has a robust community that doesn’t identify with PHP. They don’t understand PHP, and the reasons it works the way it does. Many of them blame PHP for the troubles of the product. We need to be proactive about reaching out to these groups, and interacting with them. We need to be receptive to their needs. And we need to work with them to improve PHP overall.
Brandon Savage is the author of Mastering Object Oriented PHP and Practical Design Patterns in PHP
Posted on 12/11/2009 at 1:00 am
Sandy (@SandyS1) wrote at 12/11/2009 1:56 am:
It’s even possible to build an OO application in PHP 4. Error handling was a big pain, and lacking advanced database interfaces was a bigger pain, but it’s been done.
Sadly, many developers are likely in the same boat I often find myself: a commitment to a client who can’t/won’t pay to upgrade their application to PHP 5. You don’t want to completely alienate them by disabling their site, but they won’t pay for even a superficial attempt to remove the PHP 4-specific code that will trigger errors in PHP 5–or upgrade to a newer version of an open-source application.
We were set to finally force off the last of our PHP 4 clients when the recession hit and our internal project to migrate the last sites to PHP 5 got put on hold.
Sudheer (@bngsudheer) wrote at 12/11/2009 2:09 am:
One of the factors for the success of Drupal, WordPress and other projects was availability of affordable web hosting services. It was possible only with PHP?
Maarten wrote at 12/11/2009 2:31 am:
We only just migrated to PHP 5 (5.3) and I have to say it’s nice to have better OO and alot of new features, but otoh, having coded PHP since 3 I was quite ok with 4 too.
A bigger lacking imho in PHP is the Unicode support
Daniel O'Connor (@clockwerx) wrote at 12/11/2009 3:06 am:
If you have a broader point to make about community integration; here’s a tip: don’t tell people to shut up, and “write a patch”.
Provide them with meaningful actions for specific problems. Give them a list of places most in need of refactoring.
With the inflammatory comments you’ve made, you’ve probably just irritated a boatload of the PHP community subscribed to planet PHP (you have at least angered me). What have you offered them by doing so?
The idea that projects who use out of date platforms and methodologies to implement their software on is a Good Thing.
Great idea, that’ll get the respect of the PHP community, and won’t irritate them at all.Further, why do your posts show up on planet php? They frequently are subtly wrong or naieve, and that irritates me somewhat at an individual level. I can handle it if you are still learning the finer points of programming, but if that’s the case, I would suggest you are in a poor position to dish out advice, specifically in these matters.
Rick wrote at 12/11/2009 4:23 am:
The WordPress community is a community of users of a particular piece of software, not a developer community. They don’t care about software development in general or PHP in particular, and that is fine. Okay, so they hack together a few plugins or a few templates, and that has PHP4 in it because WordPress uses it, but that’s it.
And I’m not being negative here, I also am one of those users, and I love WordPress and the plugins and stuff, but as an end-user. Not as a PHP developer. WordPress could be written in RoR and I would still use it the same way.
The only party who we’re talking about when we talk about the relationship between PHP and WordPress is Automattic. And Automattic has basically turned it’s back on the rest of the PHP community. There’s very little we can do about that.
As a WordPress user, and as a developer who sometimes deploys WordPress for clients because it often is the appropriate solution, this worries me because it seems like WordPress is a dead end. We’ve seen succesful projects like this come and go (PHPNuke anyone?), and WordPress seems to lack a long term strategy as an open source project. I suspect Automattic is more interested in the SaaS route, and really doesn’t give a crap about what the outside world thinks about their code. If I’m really paranoid I would say they are deliberately steering WordPress away from the PHP mainstream. They are certainly not interested in having the PHP community contributing to their product.
Ralf wrote at 12/11/2009 5:45 am:
PHP 4 support in script projects is not a fatal flaw but a requirement by the users. Though many webspace packages have been upgraded to PHP 5, many have not. Or many could not. And many won’t not. They’ll use another script. And if you don’t want to invite a storm of protest (WordPress) or lose customers (PHP script company), then you support PHP 4. It’s as simple as that.
Keith Casey (@CaseySoftware) wrote at 12/11/2009 9:20 am:
@Daniel – I think the point is: It’s easy to criticize and pick at, but without making some fixes and engaging, that doesn’t go anywhere. In fact, Matthew Weier O’Phinney goes as far as saying that’s the fast way of getting ignored on his project… the Zend Framework. I suspect most other projects work the same.
Further, WordPress (or whoever) isn’t going to upgrade and update their stuff unless they see value in it. To convince them of the value, we should show them. If we can refactor a plugin or function and show better performance, security, functionality, memory usage, etc, it will get accepted and we can bring everyone along and end everyone’s headaches. :)
And in terms of the personal attacks on Brandon… uncalled for.
Jakefolio (@jakefolio) wrote at 12/11/2009 9:33 am:
@Keith – I can see refactoring some plugins, but any significant performance improvements would require rewriting of a lot of the core.
Moving from a PHP 4, functions fest, mindset to PHP 5 (OOP) would be a whole new world for many of the plugin developers, and possibly core developers. Obviously I would be for moving it towards the PHP 5, possibly 5.3, OOP, but I’ve been developing in PHP 5 for 3-4 years so it isn’t a scary world for me.
Keith Casey (@CaseySoftware) wrote at 12/11/2009 9:47 am:
@Jakefolio – There are some cool bits that the general community can learn/take from WordPress too. Their HTTP class is pretty sweet… it looks for streams, curl, fgets_*, and falls back through all of them until one is available. I see *lots* of general library developers trying to do the same thing all the time.
Aaron Brazell (@technosailor) wrote at 12/11/2009 10:06 am:
Just to put a blatantly false statements to rest here from the comments:
Automattic is not WordPress. Automattic is WordPress.com. The software itself is community owned and out of the 4 core devs, only 2 work for Automattic (Ryan Boren, Andrew Ozh). Mark Jaquith and Peter Westwood do not. Collectively, they make decisions, some of which may or may not involved turning their back on the PHP community for whatever reasons.
Good article, Brandon.
Hervé wrote at 12/11/2009 1:58 pm:
If supporting Php4 is normal then why not Php 3 …
Andrea Turso (@trashofmasters) wrote at 12/11/2009 2:43 pm:
When I first saw the post title in my Google Reader I was craving to read it, but after reading it in a breathe, it left me with a bitter taste. Therefore I wanted to follow the title and introduce my opinions about what and why the PHP Community should really learn something from other communities.
This seems the right place and the right moment to discuss about it. Do you agree?
By all means I always looked at the PHP Community as a heterogeneous amount of people trying to overcome each other. In fact I still have this vision. Futhermore it has always been quite isolated from foreign communities (Java, .Net, Ruby) and even worse used to ignore its own community members.
Although I see quite a lot of cohesion as well recently.The very first thing that the PHP Community should learn from other communities is to give more voice to the damned community members and listen to what they have to say. A good example comes from the Java Community: the Java Community Process, that apart from really formalizing specifications defines a sample of parties whom business is the Java platform that votes the specifications. All this avoid by all means any arbitrary decision from being made.
This takes back to my mind the not so past Namespace separator argument that happened months before the release of PHP 5.3.
There was a RFC on the php wiki that stated “This RFC is the result of a IRC discussion with Greg, Dmitry, Steph, Derick, Elizabeth, Johannes, Andrei, Scott, Hannes and myself [Lukas Smith]” for me this is a lack of respect and confidence of the dev-team toward the PHP Community members. It means that members’ voice doesn’t count in the evolution of the language and this simply doesn’t work.
But this comment is not oriented on the namespace separator di per sé, but as what it represent. It is a indicator of how much PHP cares of us developers, us the community.
[I was quite hurry and I’m not an english speaker, so forgive me grammatical and syntactical mystakes. Please write back in plain english :P]
Brandon Savage (@brandonsavage) wrote at 12/11/2009 2:44 pm:
Supporting the last version of PHP isn’t unreasonable. It’s akin to Microsoft supporting Windows XP and Windows 7 simultaneously. Given that 12% of WordPress users are still on PHP 4, WordPress doesn’t want to kill of 12% of their users.
Greg Beaver wrote at 12/11/2009 2:53 pm:
uh, WordPress runs just fine on PHP 5.2+. The real reason people should upgrade is that it runs significantly faster on PHP 5.3 *without code modification* because PHP 5.3 is significantly faster than PHP 4.X
The php community has responded to many needs of the other communities like the wordpress community. I personally think this entire blog post and all of the comments are behind the curve because it won’t be long before everyone realizes that 5.3 will save significant processor cycles with existing code and that = $$$ saved.
Daniel O'Connor (@clockwerx) wrote at 12/12/2009 9:03 am:
@caseysoftware
“– I think the point is: It’s easy to criticize and pick at, but without making some fixes and engaging, that doesn’t go anywhere.”
The general thrust of my argument is the same: Brandon is criticizing and picking at, without making a material contribution (at least within the context of this post, if he has elsewhere, I’ll gladly shush) towards a solution.
I’m in particular frustrated that his level of expertise is perhaps lacking in some aspects (not a bad thing by itself), but is used to author advice which is seemingly authoritative and is given a large broadcast platform – ie aggregated via planet PHP. I view large parts of this post as inflammatory.
More on topic:
Within PEAR, we make great efforts to avoid backwards compatibility breaks (mainly PHP 4 compatibility), and artificially prolong the potential life of dead technologies/methodologies.Countless times, I (and many others) have had to tell a contributor “Thanks, but no thanks – you’ll upset any PHP4 users of package X. Sorry.”.
Every time I’ve had to say that, I feel stupid for maintaining a status quo against a very rational argument and proven: survival of the fittest. There are other paths and alternatives, but it boils down to us having to put red tape and process in front of a perfectly willing and reasonable contributor. That, predictably, makes them a not so willing contributor.To read a post like this (“don’t criticize bad policy”) feels somewhat insulting to everyone who has tried to improve the entire PHP ecosystem and been rebuffed. In general, these people are writing patches. These patches are often leveraging the abilities of newer technology and methods available in PHP 5+. Unfortunately, we at PEAR (and presumably wordpress) keep having to say “no; PHP4 doesn’t have X.”.
I find this situation to be frustrating, as do many others within PEAR. We’re looking for every possible way we can bend the rules without breaking out promises/BC (Wasn’t stable? It can go PHP 5), provide alternatives (Call it Package_Something2!), and otherwise move the entire state of play forward (PEAR2/pyrus).
If there’s such a movement in the wordpress community, this post would have been a great place to highlight it.
Brandon Savage (@brandonsavage) wrote at 12/12/2009 10:03 am:
If you think that my point was that we shouldn’t criticize bad policy, then you’ve sadly misread it. The point was not to criticize without offering a substantive contribution that *fixes* the problem. WordPress core developers hear each and every single day about how their product is “crappy” because it’s not PHP 5-only. And they’re caught between having 12% of their users (more than 5 million people) still on PHP 4, for various reasons, and wanting to use the features available in PHP 5. Telling them “you suck because you’re not PHP 5 only” doesn’t help them solve that problem.
If you must know what I’ve done for PHP and WordPress, here’s a list: I contribute to the PHP documentation on a regular basis. I do lurk on the various PHP mailing lists and attend conferences. I write, as you’ve discovered. I have spoken at OSCON, ZendCon, the DC PHP Developer’s Group, Frederick Web Tech, Baltimore PHP, and Wordcamp Mid-Atlantic.
In terms of moving WordPress forward, I’m developing a plugin for WordPress that highlights whether or not the PHP version and MySQL version are current and asks the user to upgrade if they are not. I will, at some point, submit the plugin as a patch to WordPress core, with the hopes that telling people (who don’t know otherwise) that their PHP installations are less-than-current will spur upgrades and drop that percentage from 12% to near 0%.
All of this doesn’t take into account the discussions, negotiations, talking and working with WordPress community members; things that you don’t see, but do make a difference.
Aaron Brazell (@technosailor) wrote at 12/12/2009 10:06 am:
Daniel-
As the author of the original post about WordPress and PHP and approaching the problem for the WordPress side, I will agree with you wholeheartedly. No, I’m not a core developer. Yes, I write *some* patches. But I’ve also been around the WordPress dev world for YEARS now.
I am not one who is in favor of WordPress maintaining PHP4 compatibility, but at the same time, I know why it’s done. If you read my post, I passed on the 12% of all WordPress users are on PHP4 hosts stat. That number isn’t an exact number. It might be anywhere between 10 and 14%. Still, with the number of WordPress installs in the wild, that represents a chunk of population roughly on par with a major city. We can’t just ignore this number of people.
The WordPress core developers have been very open to gradually introducing PHP5 only code. We’ve seen that with the oEmbed code that is in WordPress 2.9, the SSH method of upgrade and even the HTTP class that Keith mentioned looks for available transports, some of which are PHP5 only. In all of these cases, we have not crippled WordPress if the user is on PHP4 but we’ve given incentives to use new non-blocking features if the host is running PHP5.
I think it’s important that these conversations happen in a constructive way, though. Nobody in the Drupal or WordPress world is going to simply do something because PHP developers get elitist and try to cram it down our throats. Just as much, nobody in the PHP community is going to learn to live and work with WordPress and Drupal developers if we as endpoint communities turn our backs on PHP and just say, “We’re gonna do what we want to and you can #suckit.” Ain’t happening.
Anyways. Onward and upward.
« Painless Spec and Schedule Development | Why Tracking Bugs In Personal Projects Matters » |