I really feel like drupal is a great example of the average php programmers way of thinking... Why has no one built a robust cms ontop of cakephp that's gotten popular? Cakephp is the closest you can get to developing on rails for PHP (which is a good thing) It's always on my list of things to do but I get sidetracked with shit that makes me $...
Simple answer: Drupal predates Cake, and it's popularity and community are what make it so powerful. A quick google search turns up a plethora of CMS solutions built on top of Cake, but none of them have the install base, the module collection or the community of Drupal.
It's not as elegent as Ruby or CAKE or Grails, but what you gain in existing functionality makes up for some of the frustration and head scratching.
Despite being a "content management framework", the core doesn't actually save you from writing code. You still have to write CRUD code, still have to manage validation, still have to define your own themables. That is, unless you use CCK/Views, which is pretty much developer-hostile lasagna and slow to boot. And it'll look like ass, unless you have an ubertalented designer who also knows PHP (i.e. a "themer", a role which doesn't exist elsewhere). And the one part that you would actually want to contextualize, i.e. the content UI, is shoehorned into the node/edit form with zero choice.
Despite the promises of the hook system, Drupal lacks the ability to swap out components. If you wish to leverage part of the page generation process for another purpose, you have to reimplement everything that comes after. Alter hooks are terrible tools for building reliable behavior, since they require you to actively fight against other parts of the system instead of just turning them off. If you don't share Drupal's assumptions about user accounts, you're fucked, unless you feel like trapping and erasing UI messages is a productive use of your time. And don't even try to maintain the resulting code.
Despite being billed as having a "solid core", Drupal's irreplaceable innards are actually pretty fragile. Form API is near impossible to debug and fails silently at the drop of a hat. The node system doesn't even let you reliably do programmatic saves. The user system is a terrible misdesign that mixes front-end presentation details ($category) with low level data manipulation. The global $user object is actually a useless fake, waiting to trip you up.
Entire portions of Drupal were created in a theoretical vacuum and released without any serious working implementations. For example, install profiles: they are executed in an incomplete pseudo-Drupal environment where it's actually impossible to do certain simple things due to static caches and dysfunctional APIs. Another example: Form API process functions with complex datatypes and dynamic AJAX manipulation. Theoretically possible, practically a nightmare.
The problem can be summarized quite effectively: out of the box, it is impossible to make a slick, modern website with Drupal, i.e. something that looks and feels like 2011 rather than 2001. It's only useful if you're already planning to write a lot of custom PHP/HTML/CSS. Otherwise you have to be happy with terribly designed contrib components that are insecure, don't scale and have bad usability. This is not surprising since Drupal has been in incremental-improvements-mode since 2002 (i.e. Drupal 4.0) and the few architectural improvements made since then were designed with only one purpose in mind: to support what Drupal already does, rather than being solid components of a CMF.
Doing Drupal will stunt you as a developer, overburden you as a designer and frustrate you as a user.
For those wondering, UnConeD is Steven Wittens, the 10th person to ever register on Drupal.org and a former core committer (of which there are very very few). He had a huge impact on Drupal core development until somewhere around 3 years ago, when he left.
Steven, we appreciate your early work to Drupal which helped shape the community and software. But this just comes off as bitter remarks from someone who is no longer involved rather than an honest critical review. Step up and help us fix things we can fix. File issues. Come to DrupalCon Chicago and hash it out with us.
Hey, it's Steven! Thanks for that. Here are a few responses:
unless you use CCK/Views
That is pretty much a given. In fact, CCK is even part of core in D7. Commenting on Drupal sans-CCK/Views is sort of like commenting on a car without its tires (bad analogy, I know).
which is pretty much developer-hostile lasagna and slow to boot
The first part is vague and the second part screams for benchmarks.
And it'll look like ass, unless you have an ubertalented designer who also knows PHP
Is this really so different than every other system? WP requires themers know PHP to do anything useful in a theme. ExpressionEngine uses its templating system which is basically just a different looking version of PHP. I'd be interested to see what you think is so different about Drupal here.
And the one part that you would actually want to contextualize, i.e. the content UI, is shoehorned into the node/edit form with zero choice.
Not really sure what you mean here, but if you're just saying that it's difficult to customize the node's output, then you might checkout the contemplate or display suite modules.
Despite the promises of the hook system, Drupal lacks the ability to swap out components. If you wish to leverage part of the page generation process for another purpose, you have to reimplement everything that comes after.
This is a legit point.
Alter hooks are terrible tools for building reliable behavior, since they require you to actively fight against other parts of the system instead of just turning them off.
What's the difference? You can turn things off with alter hooks. What's an example of a system that has a preferable behavior here in regards to overriding core behavior?
Form API is near impossible to debug and fails silently at the drop of a hat.
This is just an opinion. I've never had much trouble with FAPI.
The node system doesn't even let you reliably do programmatic saves.
Same as above; I've never had trouble with node_load() and node_save().
The user system is a terrible misdesign that mixes front-end presentation details ($category) with low level data manipulation.
This sounds like a nitpick to me. Does this really affect your programming or make any difference in your day to day work? Or does it just bother you on principle?
The global $user object is actually a useless fake, waiting to trip you up.
I'd be interested in more details here too. For example, it's fairly common to grab the uid from global $user, and I've never really hard any complaints about global $user before now.
install profiles: they are executed in an incomplete pseudo-Drupal environment where it's actually impossible to do certain simple things due to static caches and dysfunctional APIs.
Certain things like what? I only have a small amount of experience with install profiles, so this is a curiosity question.
Form API process functions with complex datatypes and dynamic AJAX manipulation. Theoretically possible, practically a nightmare.
I'll agree here. That said, D7 has made some huge strides in improving the AJAX DX.
out of the box, it is impossible to make a slick, modern website with Drupal, i.e. something that looks and feels like 2011 rather than 2001. It's only useful if you're already planning to write a lot of custom PHP/HTML/CSS.
By "out of the box" do you mean without any contrib modules? If so, then I'd agree, but that's sort of beside the point. You're supposed to take advantage of contrib modules, that's sort of the beauty of Drupal. And as for requiring a lot of PHP/HTML/CSS, I'd say that HTML/CSS is pretty commonplace in any CMS, and the PHP really just depends on the use case (you can do many many crazy things with Drupal/contrib modules without any custom code at all).
Thanks for that well thought out and well written post. It's well to see such a well reasoned critique of anything, including Drupal.
That is pretty much a given. In fact, CCK is even part of core in D7. Commenting on Drupal sans-CCK/Views is sort of like commenting on a car without its tires (bad analogy, I know).
CCK is only good if the UI provided by CCK suffices. If it doesn't, then the added hassle of having to deal with procedurally generated objects, types and tables quickly becomes a nightmare. I've found it much, much easier to just write a simple ORM mapper and do the rest myself, and not for lack of trying either.
It's not just me who goes without it: the Ægir hostmaster system that stores all its data in node types also chooses not to use CCK. Go look at the people who made that and tell me they don't know Drupal.
Incidentally, you're talking to UID 10 on Drupal.org. Long story.
The first part is vague and the second part screams for benchmarks.
You must be unaware of the layers of indirection that are taking place here. Also, views is terrible on the inside. It's a nightmare of handlers, plug-ins and uncaught errors waiting to happen. There's also the fact that using Views requires you to structure your code very differently and in a remarkably un-drupal-like way. For example, you cannot ship views templates inside an associated module's directory (unlike regular templates), they have to go in a theme. Unless you implement hook_theme_registry_alter() to undo it, yay.
My latest Views project was trying to hook up an external data source to Views 3. It's absolutely terrible and that's with example code to model it off (apachesolr).
Is this really so different than every other system? WP requires themers know PHP to do anything useful in a theme. ExpressionEngine uses its templating system which is basically just a different looking version of PHP. I'd be interested to see what you think is so different about Drupal here.
How do I get rid of the colon after form field labels? The answer is not to tweak a template of HTML-with-sprinkles but to dive into hardcore PHP code. Shall we mention theme('table')? Or perhaps the $node->content array of doom?
Not really sure what you mean here, but if you're just saying that it's difficult to customize the node's output, then you might checkout the contemplate or display suite modules.
Actually I meant the node editing form. It's the most basic part of a CMS, and Drupal sucks at it. Vertical tabs or not, the idea that everyone should edit all sorts of content through the exact same UI is madness. It also ignores the fact that you don't create an end-user oriented UI by hiding parts of the developer-oriented UI and calling it a day.
What's the difference? You can turn things off with alter hooks. What's an example of a system that has a preferable behavior here in regards to overriding core behavior?
The proper answer is to use inheritance to override behaviour rather than to undo it, e.g. using MVC to separate concerns and OO to allow for selective code modification.
Go and try to make it so that people can log-in with their e-mail address instead of their username. I'll wait while you figure out how to get rid of the error messages that no longer make sense.
Or perhaps you would like to replace the godawful password recovery page with one that actually looks like something a real web service might use? Unfortunately, the code that verifies the security hash is intricately tied with the part that displays the UI so your only option is to menu_alter out the entire page and reimplement it.
This is just an opinion. I've never had much trouble with FAPI.
Have you ever defined a custom element type? Used #after_build or #process functions? Used #ahah/#ajax? And done so without ever encountering a random type error deep inside form.inc? The menu system suffers from the same affliction: if you accidentally forget the array() around the 'access arguments' for example, you'll end up with some cryptic error deep inside menu.inc. The only way to debug these errors is to insert trapping code at the reported location, which incidentally is a whole cache refresh and page request later than the offending bug.
Fact is, Form API is undocumented and untested for the things it was supposedly designed to do. Do you know the rules around form caching and $form_state['storage']? When $form['#cache'] is needed? Or that your form element IDs will get broken if you trigger a form rebuild inside a page request? Yay. Still broken as far as I know.
Same as above; I've never had trouble with node_load() and node_save().
This sounds like a nitpick to me. Does this really affect your programming or make any difference in your day to day work? Or does it just bother you on principle?
Have you looked at the signature for user_save()? You cannot simultaneously modify two properties that are situated on different user profile tabs. By design. If you do any work with hook_user(), this will bite you in the ass. User objects are also unique in Drupal in that they will store custom properties for free. Incidentally, this has lead to many contrib modules polluting the users table because they don't expect it. Like the legal.module, which pushed the entire terms of service into every single row in the table.
I'd be interested in more details here too. For example, it's fairly common to grab the uid from global $user, and I've never really hard any complaints about global $user before now.
Passing the global $user object into user_save() will result in data loss if you have any modules that extend the user object. Simple as that.
Certain things like what? I only have a small amount of experience with install profiles, so this is a curiosity question.
Just one example. There are many, because of how much of a clusterfuck install.inc is. It tricks Drupal into thinking it's already installed to bootstrap it, and then pretends nothing's wrong when it installs all your modules and themes (which then fails when they do anything complicated on install).
You're supposed to take advantage of contrib modules, that's sort of the beauty of Drupal.
Except for the part where they are insecure and have terrible usability. Like for example the Single Sign-On module, an authentication module that let you steal UID 1 access from an admin with a single click. Or the Services module, where an elaborate fix for a reported security issue was itself insecure and spoofable. If you look at the security reports for Contrib, you find that they are the same vulnerabilities over and over again, in different modules, over several years. People are not writing better modules.
I have yet to encounter a situation where I can actually drop in a contrib module and have it satisfy my professional requirements. It just doesn't happen. I have to review their security, fix the interaction flow, get a designer to make it actually nice... and that's assuming there isn't some DB-server-destroying query in there.
If I have to audit every single contrib module I want to use, and the reward is a module that's kinda crappy anyway, I'll pass. It's just not worth it.
As I responded to the comment below, I'll just save a few point for here. I don't know how much you've been following Drupal 7, but this really reads like a laundry list of complaints of issues that have been addressed since you were working on Drupal.
I'm not even going to take the time to go over where I think you're wrong and which issues have been fixed. I'm sure you think that anyone that still uses Drupal has their head in a microwave, but complaining about the problems that were there in the releases you worked on instead of discussing the fact that people stuck around to fix many of them, is just poor taste.
Doing Drupal will stunt you as a developer, overburden you as a designer and frustrate you as a user.
This should read: "Doing any single (framework|cms|platform) will stunt you as a developer
Just about everything you've said here is what led me to quit a job writing reasonably complex stuff in Drupal. I could never articulate it this well, though.
I will admit that there is a certain sweet spot where Drupal can be helpful and productive, but if your codebase morphs into something outside of Drupal's comfort zone, then all I can say is good luck.
I don't know why you are getting downvoted, my sentiments exactly. IF you want power/functionality, then you probably need to customize, so why not just build it via Cake or some other MVC framework. IF you want simple and basic, choose wordpress which does a lot of the CMS tasks Drupal does, but makes things like ADDING AN IMAGE to a page simple.
Edit *"does a lot of the CMS tasks" rather than "90%"
Until the "choose wordpress which does 90% of what Drupal does" I was in agreeance.
But unfortunately you're going to have to take this downvote for being completely misguided. I'd have been in agreeance if you had of said "choose wordpress which provides the CMS functionality". But saying Wordpress can do 90% of what Drupal can is completely incorrect. Yes Wordpress as a basic CMS (changing content from an end user perspective and adding a widget here and there) is great, but for much better extensibility you need Drupal, it's already providing the framework and CMS you're talking about trying to custom code/workout multiple systems to provide a solution for you
In the end its at the developers discretion for what they choose to develop within, however after the initial headache of learning how everything works within drupal - it does provide the solution both of you have been discussing in a much easier packaged and quick system. It's not always the answer, but it's rarely not a good answer.
edit: Probably should link to prove my point on the 90% being well off the mark - check drupals core API here
IMO, the point of a CMS is for the End-user to focus on content, and in my experience, unless they are forced to do so (or they are technical), they won't learn the complex usability that Drupal has going on. Thus it FAILS at it's initial task.
Also, I don't get why you'd learn the quirks for a specific system, than to just learn a framework which you can apply in general anywhere. Wordpress for basic sites --> Cake/MVC frameworks for everything else.
It isn't like it is impossible to write a CMS with Cakephp. But it seems like the whole point of Cake is that it is for rapidly building applications that are much more flexible than most CMSes. Once you go the CMS route, you might as well get a big boxed kit.
I suppose that's true. I've been apart of many projects that tryied to make a cms ontop of cakephp but they all fall apart when the elected group leader starts wanting to implement to high level stuff...
Expression Engine is built on CodeIgniter. It's not free (but a pretty fair price) and I haven't tried it but I really need to check it out one of these days. There is a community but I don't think it's nearly as big as Drupal's.
When you work on websites that have budgets in the tens of thousands to hundreds of thousands, a couple hundred dollars or more for a quality product is never out of the question.
0
u/midri Jan 05 '11
I really feel like drupal is a great example of the average php programmers way of thinking... Why has no one built a robust cms ontop of cakephp that's gotten popular? Cakephp is the closest you can get to developing on rails for PHP (which is a good thing) It's always on my list of things to do but I get sidetracked with shit that makes me $...