In a couple of earlier posts I mentioned how I thought Drupal could be used as an enterprise-level CMS, at least if you were willing to change modify your definition of ‘enterprise-level’ slightly.
When thinking about deploying any CMS across a large organisation or large company, one of the things you’re going to find is that you need two key things:
- separate departments will want separate sites that they can control the content of, and maybe even the look-and-feel of
- content from all those departments will need to be aggregated in some way, and reused by other departments
It’s these requirements that enterprise-level CMS cater for really well. It’s these that Drupal can only partially answer. This is why Drupal isn’t really completely enterprise ready, yet.
However it can go a long way towards that using its little-known but powerful multi-site capability. There are plenty of blogs detailing how you can do this in any number of ways, so I won’t go into details here.
Take a look at some of my delicious bookmarks for things I found really helpful in setting up a multi-site system.
Basically, the idea is that each site in your multi-site setup has its own folder in Drupal’s sites/ folder. Something like www.mydomain.com.site1 would do. Now you have one Drupal installation, but the potential for lots of separate drupal sites.
While that does cater for a really simple single codebase setup, it doesn’t let you share things like users and logins. That’s going to be crucial for any true multisite setup, because you’ll want the same user to be able to go to different parts of your overall website without having to log in to each separately.
Luckily, Drupal has a really elegant solution to this. You can easily share tables across sites using Drupal’s database prefix system. So for example you could say that site1 will have its own tables prefixed with site1_ except it will use the user table of site2 (identified by site2_) for its user data.
This is all set in each site’s settings.php file, and requires just a few lines of code to do. Simple.
And with that, you open up a whole new world of multiple sites with single signons: the first step to an enterprise-level solution.
OK, so you don’t have truly shared content across sites yet. You may never have that, but then you may never need that. RSS feeds, simple RESTful APIs… there are all sorts of other ways of sharing content. You could even get adventurous and write your own module that treats some kinds of content types differently, putting them in shared tables rather than a site’s own set of tables.