Drupal has become the most sophisticated piece of PHP software that non-PHP programmers are aware of. Therefore, increasingly, when decision makers are comparing technologies, Drupal is the one they use as their PHP reference. Consider this line from Sam Ruby (who is a brilliant technologist, but who does not know much about the world of PHP):

But the more interesting trend is that the language choice itself is no longer as primary as it once was, the real choices are increasingly drupal, django, and rails, with the language being a consequence of that choice.

He is comparing a framework (Django) to a CMS (Drupal). Obviously PHP looks bad when that kind of comparison is made. Ideally, the comparison would always be between a framework like Django and a framework like Symfony. But I get the impression that PHP frameworks are almost unknown outside of the world of PHP. Wait, I’ll amend that, even in the world of PHP, almost no one has ever heard of Symfony. Yesterday I was at WordCamp, New York, 2009, and no one that I spoke to had ever heard of Symfony.

Birdhouse offers another example of Django versus Drupal:

Every web shop has its favorite tools and languages. Settling on just a few keeps toolchains, deployment, and development workflows sane. At both the UC Berkeley Graduate School of Journalism and the Knight Digital Media Center, we’ve settled on a mix of:

WordPress for basic sites and “modest” online publications

Django for sites with more complex needs or non-standard data models

For example, it makes sense to build student magazines, handbooks, FAQs, and blogs with WordPress. But it’s simply not possible to build an equipment checkout system, or a course evaluation system, or a student/faculty/staff directory with WordPress — not while trying to preserve your sanity anyway. That’s because WordPress assumes so much about the structure of your data — it thinks every piece of content has a title, a summary, an author, etc. Start to veer away from that basic data structure and you find yourself quickly needing a platform that doesn’t make assumptions about how things should be done. For those kinds of problems, we use Django.

…To be clear on terms:

WordPress is a simple content management system.

Drupal is an advanced content management system.

Django is a framework.

At no point is a PHP framework compared to Django. Instead, Drupal is used and loses almost every comparison:

Object Orientation:

Python (the language on which Django is built) is extremely object-oriented, and thus so is Django. This means that data objects, querysets, variables, templates and arguments can be passed around in the codebase easily….

Drupal is not object-oriented.

Templating System

Django is famed for its super-clean, inheritance-based templating system, which makes it almost trivially easy to nest templates within templates, use different templates for different parts of the site, and to completely eliminate any redundancy in template code….

In contrast, a common complaint about Drupal is that templates can be difficult to customize. In fact, there are entire books about working with templates in Drupal.

Performance:

…Bruno Desthuilliers: I recently had to work on a not-so-complex (functionaly-wise) Durpal project, and the response times on my local station – all caches disabled of course – turned the development process into a sluggish nightmare. Never had this kind of problems with Django, even for far more complex apps.

Then there are some responses from other developers:

Preston Holmes: What happens is that non-developer/technical decision makers will evaluate Drupal and think that all their needs will be met out of the box. When they find out they aren’t, they need to hire developers, and then those developers have to massage existing modules to customize and tweak. Then at some point they have this monster of hodgepodge code. But its that entry point that is the key to Drupal’s popularity. … I don’t think people appreciate how much Drupal development is spawned by this existence of a usable entry point for Drupal by non- developers. (and that it has 1-click installs on hosts, and in general uses the far more common infrastructure of PHP-MySQL).

I get why Drupal is the point of comparison that most non-PHP people use to reference PHP. Jacob Coby pointed me to  this comparison on Google Trends. Clearly, Drupal is way, way ahead of the PHP frameworks. The situation here is very different than the world of web development using, say, Ruby, where the usage of CMSes is dwarfed by the framework everyone uses to do Ruby web development.

I’m not sure what the answer to this is. Symfony can not even lose these comparisons, let alone win them, until more people have heard of it, and the comparison of technologies becomes more of framework versus framework, which would be more fair than the current framework versus CMS comparisons. (When the Django versus Symfony comparison is made, Symfony is at least able to hold its own, with at least a few areas where it is superior to Django) More so, as I meant to imply with the title of this post, I believe there is a self-reinforcing dynamic at work. The more frequently that the Python versus PHP (or Ruby versus PHP) comparison consists of comparing a framework to a CMS, the more reinforcement is given to the idea that PHP can be used to build CMSs, but not necessarily the kind of complicated software for which one would naturally prefer a framework. In this regard, I think the prominence of Drupal is actually doing harm to the growth of the PHP frameworks.

How to break this cycle? Possibly some sort of killer app, built around Symfony, would afford an easy point of reference for the public, but I’d have thought Yahoo Bookmarks and Daily Motion would have offered us that, and yet, so far, Symfony still lacks mindshare, even among technically savvy people.

I’d be curious to hear, in the comments below, people’s ideas for promoting Symfony.