How Not to Build a Page with Drupal
A few weeks ago I was asked to build an Intranet-Site for a small company. Nothing too fancy – just the usual groupware stuff like News, Calendars a Blackboard etc. I was given some Photoshop Files which were easily translated to XHTML. The layout was already approved by the client so this step was pretty much a no-brainer.
I always wanted to try out the Drupal CMS and figured this Intranet-Site would be a perfect fit for it. Drupal was developed with community sites in mind; every aspect of it was designed support the extensive built in User and Rights management. Just what I needed.
My XHTML file was quickly adjusted to function as a Drupal template. Not everything was working right from the beginning, but I figured I’d first work out the hard stuff and care about these “small rendering bugs” later. So I carried on to build my content – which is where my odyssey started.
In the Module Maze
Drupal heavily relies on modules. Figuring out what you want to do is one thing, finding the right modules to do it with is quite another. Between the nearly 3000 available modules I stumbled over something which seems to be almost a standard (correct me if I’m wrong) for all Drupal sites: CCK, the Content Construction Kit. With it, you can click together new content types without touching any code. Sounds promising. About 30 minutes and a dozen installed modules later, I found myself with a working calendar which accepts dates from my newly created event content type. Not too bad.
The visuals of the calendar of course didn’t exactly fit the rest of the site. No problem I thought and searched for the calendar template… which I didn’t find. All of its HTML code is echoed directly from within a PHP file (oddly disguised with a .theme extension) just like in the good old 1990s. There was however a CSS file with some 50odd classes to have fun with, which is good but not always enough.
Delicious Breadcrumbs?
My real problems however started, when I tried to get the breadcrumbs menu working. There are numerous ways to organize your pages within Drupal – the most important one being the taxonomy system – which I head to read 4 articles about, stuffed with words like vocabularies and terms, to finally figure out what exactly it is. One got it straight: The taxonomy system works like categories, only that pages can be assigned to multiple categories instead of just one. Thank you.
This taxonomy thing sounds flexible, but also renders breadcrumbs basically unusable. What is the correct breadcrumb path of an article residing in the A/B/C and the D/E/F category? Of course, there are again dozens of modules “fixing” this problem with which you can, for instance, enter the complete breadcrumb path for each node you create. Wait, why am I using a CMS again?
I had similar problems when building the menu structure – the menu items didn’t highlight when you’re in the corresponding category, only the submenu items did. Also, defining which menu to display at which location was tedious. Maybe I was just missing something…
And the answer was so near
After two more hours of searching and reading, I finally gave up and built the page with my own CMS. I quickly wrote the missing pieces (like a calendar) myself and finished the page in just a few hours. This of course is an unfair comparison, because I know my CMS in and out, which is exactly my point! Drupal isn’t bad – it can do many things quite well. Drupal isn’t easy – there’s lots and lots of stuff to learn and understand to build a page with Drupal as you intended to. Drupal also is complex – if you want to do something it isn’t built for, you have to know quite a lot about its inner workings.
Don’t underestimate the cost of learning a new system. I’m not saying you should go through this world blindfolded. However, especially on time critical projects, it is in most cases better to go with something you know well and program the pieces you need yourself, instead of having to learn a new library, framework or CMS. Don’t “reinvent the wheel”, just build one to perfectly fit your vehicle.
20 Comments:
Interesting post with a very strong last sentence.
I enjoyed reading!
Nice article. We have just gone through the same thing. After 4 years of working with our own hand rolled CMS, we had to do some work for a client in Drupal. It is not terrible, but man is there a lot of extra stuff sprinkled everywhere.
Loved this write up as I just had a very similarly frustrating experience with Drupal.
The trick is to start off learning Drupal in and out. This way it will basically become "your" CMS (since it's everyones to share and contribute to), and for all future projects you'll do things much more efficient than if you rolled your own CMS.
I do agree however that Drupal is overkill for the smaller projects like you described! It comes in handy when your customer requests different user access levels with premium memberships that should be payed for by creditcard on site etc.
Yeah, i totally agree with you... I'm developping a website for an univrsity project with Typo3... I totally lose my time to try to understand how works this CMS (oh my god, i love so much CushyCMS :p) even if my teachers tell me Typo3 is a really good CMS
When i first started blogging i tried so many CMS's and found my head is spinning like disc and found too many which i really liked but so many consequences with different things. at the very end of my search i liked 3 of them Wordpress, Joomla and Pagenode because of functionality and integration with many other applications. frankly speaking i did't liked drupal it was enough complicated for an intermediate user who just want to start a website for fun purpose. am not here to critisizing but to share my experience =)
Drupal is awesome and is by far the best CMS system out there. Yes its hard to learn but once you do you can create anything you can think of. I have worked on huge projects using Drupal and the flexibility it can give me to fit anything to the clients needs is there you just need to understand how.
This is definitely most everyone's first experience with a cms like Drupal, there are just so many things going on that you get overwhelmed. I'm in the process of converting my site to Drupal and it's a royal pain, but all of the modules and addons are making it easier to add the functionality I want without rolling my own.
I totally get your frustration but your last lines sum it up nicely. Learn first, then make. To put together a quicky with a system you never used yet is extensive is a sure disappointment.
To the point, I agree with your breadcrumb problem. I don't know how to solve it either. The menu placement? I don't see the problem. The menu structure? Each active (sub)menu item has a class 'active', its parent has a class 'active-trail' so it's just a matter of css-theming.
I'm currently working with Drupal daily, am extremely efficient at creating modules and I understand the core.
I still think it sucks. I think it's overkill. I think a large majority of the problem resides in the fact that Drupal is abstracted in such a way that it can do anything, and everything -- but that doesn't come without a cost.
Spending 4 hours Googling something like "How do I put breadcrumbs in a separate template?" Oh, preprocess functions. Okay, "How do I use preprocess functions to make..." and on and on it goes then you realize there's a module for it, or something ridiculous. It just feels like a stack of cards to me not to mention the ridiculous database dependency it has. I had to install memcache, APC and tweak the crap out of Apache + MySQL for a day or so just to get it to steadily serve 50-100 active users.
I've made my own CMS using CodeIgniter as an integral starting place and recreated the same exact project in 3 weeks as opposed to 3 months.
I don't hate drupal, I see it's usefulness in plain view -- it's just overly complicated for what it accomplishes.
you always compare your lack of drupal knwoledge (because you only used it for a couple of days) with the long term experience you have in another system. WTF?
Drupal has a steep learning curve, which is the price you pay for power and flexibility. It doesn't help itself by using a myriad of its own terminology, with a number of naming clashes and inconsistencies, but once you get around that and build up a pool of favoured modules (community and custom) you find you can do a lot very quickly.
Be sure to carefully review any modules you use, because as contributions from the community many don't do what they say on the box (be extra careful with those related to security and privacy!). Much functionality can be achieved using the core with CCK and Views, so I'd achieve as much as you can with those before installing modules, as the maintenance overhead obviously grows the more modules you rely on.
For the breadcrumbs, I find that a menu based approach is better, whereby the breadcrumbs reflect the menu hierarchy. Use the Menu Breadcrumb module for this: drupal.org/project/menu_breadcrumb
Better late than never, but here's a noobs opinion on drupal.
I'm a sysadmin, been working with CMS for six years or so now. I can work with a large number of BBS, blogs and CMS systems and none have ever fully done what I want (we always tried to stretch things into doing stuff it wasn't made for).
I ended up using FluxBB as a CMS. That's the sort of retarded shit I've done lol
But anyway, I'm employed full time as god knows what, and I've been asked to recreate a friend of our companies webpage in drupal.
The inital requirement was "we want a simple system for them to publish their webpages on"
I've been working with it for a couple of days now, going in and reading source and hacking around with everything I can. And I have to say, it is by far one of the worst systems I've had to play with.
I have never had such a headache from trying to get a front page working.
Adding/editting content and menus and all that jazz isn't as easy as, say, wordpress. Hell I'm sure you're all cringing by reading that sentenece, but you know how true it is; wordpress you add page with a WYSIWYG editor and can edit menus from the gui straight out of the box.
This is a great selling point to a client, imo.
I'm sure you guys are really productive with Drupal, and that's admirable. But similarly to OP, my instant reaction to using Drupal was "fuck this I'll custom code it".
If I were to custom code what the boss man wants it would take me a day, and he'd have his website replicated with a full WYSIWYG editor and a fancy admin login page.
Some of you guys are saying the comparison is unfair, and if OP spent more time with Drupal, he'd find it more efficient... but do you know the CMS he prefers?
You prefer Drupal because you know it, we prefer our CMS because we know it. But when it comes to clients and work, a 3 hour job is 10x better than a 3 month job.
Also, OP, have you had any further experience with Drupal?
The problem is...
This system advances at a great velocity. No time for developers to wrap around it all. Nobody truly knows everything Drupal offers. It is because is the most complete CMS around. You can actually achieve anything you want.
Back to our problem. There are hundred developers, each building modules, their own functionalities based on their needs.
The only salvation is Views. If you handle Views, you handle Drupal. The rest depends only on our imagination.
I totally understand where you're coming from. I've been working with Drupal for the last 2 months and it just takes an excessive amount of time to accomplish anything. Extremely simple tasks require a lot of Googling to discover how to get that particular part of the API to do what you want. As someone else said, you find yourself searching for which Drupal hook to do x, what method to make Drupal do y, etc. The system is so complex and the documentation so poor that you spend most of your time finding out how Drupal requires you to do something and then the actual implementation may be 5 lines of code (or even 1 line), it just took you 5 hours to discover. Drupal has lots of very specific and confusing language as well. It took me ages to get my head around Entities, Taxonomies, Vocabularies, etc.
This is exacerbated by every major version having a different API. I hear a lot about CCK but in Drupal 7 a lot of its functionality is merged with core using different names now. Most Drupal documentation and tutorials are for previous versions that no longer apply and the documentation for the latest version is sometimes completely lacking and devoid of example usage. You have to wade through other module's code to see how they accomplish the same thing or look through thousands of lines of core code to trace what happens when you call a function so you know how to use it.
Drupal's power (particularly 7) is that it's so abstracted that it can do anything. But Drupal 7 is exceedingly slow.
So many clients seem to want Drupal, but it feels like as developers we are the ones having to work 4x as hard to do the same thing - something that we could program ourselves in 5 mins if we weren't using Drupal.
In these 2 months I have learnt loads and things that took me a long time initially I can now do quite fast
I'm a professional developer, working for a large agency. I work with all of them: magento, wordpress, custom via cake, Drupal, typo, Squid.
Common feedback on new users, and 'experienced' devs who claim to be using Drupal daily, is often one of frustration leading to criticism after a few days or even weeks.
Almost everyone (myself included), has this experience
preprocess.me/wtfs-drupal-learning-curve-found-on-the-interwebs
But I find that almost always, this feedback can be traced back to poor documentation. And yes, Drupal's documentation is scattered, often arrogant, poorly versioned and sometimes flat out contradictory. I highly recommend picking up a comprehensive book and treating Drupal like a university course: i.e. learn about it thoroughly.
I can recommend this one: drupal.org/node/1849868
Although there are many good books (yes, try to get one which was published as recently as possible).
After several years of learning and practicing and generally tearing my hair out, i can now put together a high quality, secure (yes, actually secure) , scalable. community oriented site even driven by UGC in a couple of days. Which makes me valuable in the market.
Are there competitors?
Sure! Wordpress can be awesome, it can also be limited: I hate programatically creating 'custom' taxonomies as if it's an exotic feature.
Is Sitecore more enterprise ready? Perhaps: have you ever tried to style a closed source table rendering engine? The ugliest process in the universe :(
Developers tend to be reasonably smart people: if there was one system that was flat out 'the best' for every situation, we would all be using that.
There is just one word for it. Drupal sucks! There are enless number of sites on the web that give you the impression that you can get a basic Drupal site up and running in a few minutes.
As a new user and an intermediate programmer, I find the documentation confusing, the core module incomplete with basic functionality like a drop-down menu system missing and the look and feel medieval.
Use Drupal if you have already lost all your hair and anyway are a heavy drinker! Good luck.
After using WP, Joomla I choose Drupal... Why?
becasue I can do 90% of basic stuff only with core CCK and Views. To impement basic features (like CCK) with other CMS you have to pay for modules or use to some free immateur programmed.
The learning curve .... I agree it is steep, but once you grasp the concept you'll feel more powerfull.
If you need to have all basic stuff to be setuped for you just use profiles, or create yours. After this you can setup a website just like WP or Joomla. Dont give up.
I can hear some guys saying "With Drupal, you can do anything and everything"....Hahahaha...What a joke, that is bullshit.
In my company, all devs are Druapl developers. I'm myself a fullstack web application developer (Rails and Backbone).
They recently wanted to build a high project managment system as a "real time" application (such as gmail). Using Drupal for those kind of application is a real nightmare, take ages and is not even maintainable on the long run.
Anyway, they decided to give up Drupal over a "real application development", Rails and Angular (in this case).
I've used Drupal on and off, but I started off doing ?AMP development where I organized my own database tables and wrote my own PHP. That kind of sucked too, so now I prefer using a framework - currently playing with Yii.
The problems I find with Drupal are 1) for any individual project, it's quicker to build using a framework and its plugins than learning Drupal, finding the "right" modules, and learning the obscure terminology necessary to do what I need, 2) the documentation assumes you already know Drupal, 3) a significant percentage of the community is hostile to criticism or questions.
I think what I've realized is that Drupal is the opposite of what I want. I need a framework that has some plug-ins that constitute parts of a CMS rather than a CMS I need to tear down in order to get framework functionality.