Why Drupal is like LEGO
Aug. 5th, 2010 09:43 amI'm not the first to make this comparison, but I see building websites based on the Drupal content management system as a lot like building models with LEGO bricks.
For anyone unfamiliar with Drupal, it's an open source content management system written in PHP. It has been growing massively in popularity over the last few years, and is fast becomming the fifth member of the LAMP alliance (the original four being Linux, Apache, MySQL and PHP), which I've already heard referred to as LAMPD.
Why is Drupal like LEGO? Well, out of the box, Drupal doesn't do a whole lot. It lets you create web pages and post blog entries, and allows people to post comments, and has a user management system, and a few other bits, but nothing very exciting. However, everything in Drupal is modular. It comes as a collection of about thirty modules, but only a dozen or so of the ones most central to website building are enabled by default. You add or remove modules to build the website functionality you want, a bit like clicking LEGO bricks together to make a model.
But LEGO only really comes into its own when you combine two or more sets to make a larger module, and Drupal is similar. There are now thousands of add on modules that enable new functionality. The beauty of the modular design is that modules can modify almost any aspect of the site behaviour.
Modules can do simple things like adding search terms to a page's meta tags, or they can do complex things like providing a shopping cart system, but building a Drupal site becomes more about selecting the right modules and configuring them the best way for the site, and less about writing code. Of course you can always write code if you need to, but more about that later.
I'm not saying Drupal is the only modular CMS in town - I'm sure there are many others. Joomla is probably the next most popular. However, the ones I've experimented with have always felt a little like playing with clone building bricks - a few shiny pieces that grab your attention, but the resultant model just doesn't feel as nice as a proper LEGO one.
Of course there are down sides to Drupal. The biggest is the fact that it often takes more effort to achieve the same result in a generalised system like Drupal as it does with something dedicated for a single purpose. For example, if all you want is a blog site, you could set one up in a few minutes with something like WordPress. Or for a forum site you can get a full featured forum out of the box with PHPBB. Drupal can do all this, but it does take a little more configuration to get the same result. In particular, the forum that comes with Drupal is quite basic. There are a number of add ons to add featured that PHPBB has built in.
Following the LEGO analagy, I see WordPress and PHPBB as rather like PlayMobil. Let's say you want a police car model, so you go to the toy store and buy the police car set, and the police car model pops out of the box ready to play with. It's a lovely police car, but that's all it will ever be. With LEGO, you could buy aa police car set, but chances are you could build a very nice police car from the pieces you already have.
It's the same with Drupal, you instead of installing WordPress or PHPBB, you build the same functionality from Drupal modules. It does take a little more work in the beginning, but this often reaps rewards when you need some functionality that the PlayMobil style sites don't offer.
Even with thousands of modules on offer, it's likely that you'll eventually need to do something that isn't included in an off the shelf module. There are a number of options, and like anything, opinions differ. However you may notice that tweeking a few lines of the source code in a Drupal module or even the Drupal core will solve your problem. This is a dangerous path, and like the people who attack LEGO bricks with a sharp knife when a brick doesn't fit, you risk being shunned by the community.
The problem is that security patches and new versions of both Drupal core and modules come along on a regular basis. If you modify the source, then you'll have to remember to make the same changes when a new version comes along, and that can become a real pain.
And because Drupal is designed to be modular, that sort of sloppy quick fix approach is usually unnecessary. There are a number of places you can override default behaviour in neater ways that won't interfere with the upgrate path, and won't get you branded a filthy part modder.
Of course, having built a number of large sites with Drupal, I've found a couple of specific things I'd like to do, and I'm not sure where the LEGO anagaly fits. There are a few people who mould their own custom parts, such as Big Ben Bricks and Brick Arms, but there's a high entry barrier to custom brick creation. With Drupal, anyone with a bit of coding knowledge can create their own modules.
The only problem I'm finding is that sometimes I spend so long building Drupal sites that I don't get time to build with LEGO.
Posted via LjBeetle
For anyone unfamiliar with Drupal, it's an open source content management system written in PHP. It has been growing massively in popularity over the last few years, and is fast becomming the fifth member of the LAMP alliance (the original four being Linux, Apache, MySQL and PHP), which I've already heard referred to as LAMPD.
Why is Drupal like LEGO? Well, out of the box, Drupal doesn't do a whole lot. It lets you create web pages and post blog entries, and allows people to post comments, and has a user management system, and a few other bits, but nothing very exciting. However, everything in Drupal is modular. It comes as a collection of about thirty modules, but only a dozen or so of the ones most central to website building are enabled by default. You add or remove modules to build the website functionality you want, a bit like clicking LEGO bricks together to make a model.
But LEGO only really comes into its own when you combine two or more sets to make a larger module, and Drupal is similar. There are now thousands of add on modules that enable new functionality. The beauty of the modular design is that modules can modify almost any aspect of the site behaviour.
Modules can do simple things like adding search terms to a page's meta tags, or they can do complex things like providing a shopping cart system, but building a Drupal site becomes more about selecting the right modules and configuring them the best way for the site, and less about writing code. Of course you can always write code if you need to, but more about that later.
I'm not saying Drupal is the only modular CMS in town - I'm sure there are many others. Joomla is probably the next most popular. However, the ones I've experimented with have always felt a little like playing with clone building bricks - a few shiny pieces that grab your attention, but the resultant model just doesn't feel as nice as a proper LEGO one.
Of course there are down sides to Drupal. The biggest is the fact that it often takes more effort to achieve the same result in a generalised system like Drupal as it does with something dedicated for a single purpose. For example, if all you want is a blog site, you could set one up in a few minutes with something like WordPress. Or for a forum site you can get a full featured forum out of the box with PHPBB. Drupal can do all this, but it does take a little more configuration to get the same result. In particular, the forum that comes with Drupal is quite basic. There are a number of add ons to add featured that PHPBB has built in.
Following the LEGO analagy, I see WordPress and PHPBB as rather like PlayMobil. Let's say you want a police car model, so you go to the toy store and buy the police car set, and the police car model pops out of the box ready to play with. It's a lovely police car, but that's all it will ever be. With LEGO, you could buy aa police car set, but chances are you could build a very nice police car from the pieces you already have.
It's the same with Drupal, you instead of installing WordPress or PHPBB, you build the same functionality from Drupal modules. It does take a little more work in the beginning, but this often reaps rewards when you need some functionality that the PlayMobil style sites don't offer.
Even with thousands of modules on offer, it's likely that you'll eventually need to do something that isn't included in an off the shelf module. There are a number of options, and like anything, opinions differ. However you may notice that tweeking a few lines of the source code in a Drupal module or even the Drupal core will solve your problem. This is a dangerous path, and like the people who attack LEGO bricks with a sharp knife when a brick doesn't fit, you risk being shunned by the community.
The problem is that security patches and new versions of both Drupal core and modules come along on a regular basis. If you modify the source, then you'll have to remember to make the same changes when a new version comes along, and that can become a real pain.
And because Drupal is designed to be modular, that sort of sloppy quick fix approach is usually unnecessary. There are a number of places you can override default behaviour in neater ways that won't interfere with the upgrate path, and won't get you branded a filthy part modder.
Of course, having built a number of large sites with Drupal, I've found a couple of specific things I'd like to do, and I'm not sure where the LEGO anagaly fits. There are a few people who mould their own custom parts, such as Big Ben Bricks and Brick Arms, but there's a high entry barrier to custom brick creation. With Drupal, anyone with a bit of coding knowledge can create their own modules.
The only problem I'm finding is that sometimes I spend so long building Drupal sites that I don't get time to build with LEGO.
Posted via LjBeetle