2015-11-19

This week sees the Drupal community celebrating the launch of Drupal 8, the latest and greatest version of the open source CMS favoured by many of our clients. As our own tribute to the technology which powers 1 in 40 websites worldwide we’ve written our first guide to Drupal aimed at anyone who’s considering switching to the platform.



Contents

Introduction

Origins

Drupal-powered websites

Competitors

Architecture

Entities

Nodes

Modules

Templates and themes

Key features

Forms

APIs

Roles and permissions

Internationalisation

Media and image styles

URL aliases

Meta data and OG data

Search API

Caching

Upgrades

Drupal 8

Support and documentation

Security

Acquia

Conclusion

Appendix – top Drupal resources

Introduction

Drupal is a free, open-source web content management framework written in PHP. It is used to produce and manage dynamic websites. Frequently used as a content management system for enterprise sites, Drupal can also be used to power forums, blogs, e-commerce sites or wikis.

Origins

Drupal started life as a message board at the University of Antwerp created by Dries Buytaert. Originally called Drop (a typo of ‘dorp’, which means ‘village’ in Dutch), the project was renamed as Drupal (‘druppel’ is Dutch for ‘drop’) and went open source in 2001.

Drupal was used to power the website of US Democratic Presidential Candidate Howard Dean in 2003. The open-source platform allowed 50 unofficial supporter sites to communicate together and provide a unified space in which to coordinate. Dean’s supporters were so impressed with the platform that after the campaign a number of them set out to build a web platform for political activism. CivicSpace Labs, the first organisation with full-time employees developing and distributing Drupal, was the result.

At present Drupal is entirely developed by a community of over 30,000 contributors.The software has been downloaded millions of times and powers at least 2.1% of all websites worldwide.

Notable websites powered by Drupal

The Whitehouse



MTV



The Economist

Oxfam

International Business Times

BBC Good Food

Cancer Research UK

Competitors

WordPress – another open source PHP-based platform which started life as a blogging software but which has since developed CMS-like functionality. Powers over 60 million websites worldwide.

Joomla – open source and PHP-based, Joomla is built on a model-view-controller web application framework. Estimated to be the world’s second most popular content management system in October 2014 but may since have been overtaken by Drupal.

Adobe Experience Manager – a proprietary, Java-based CMS aimed at enterprise customers. Part of the Adobe Marketing Cloud which includes web analytics (based on the acquired Omniture platform), personalisation and social media tools.

Sitecore Experience Platform – another proprietary content management system aimed at the enterprise level, with personalisation and analytics tools, but this time based on ASP .Net.

Architecture

A Drupal installation consists of a number of components which act together to produce content-manageable websites:

A database, in which items of content and their relationships to each other are stored

The Drupal core: a common library of Drupal functions, written in PHP, which communicate with the database

Modules, which expand on the operations performed by the Drupal core to provide additional functionality

Themes that contain Templates files, which arrange and style content on the page

Entities

A key concept in Drupal is that of entities. Entities are used to create distinct functional value in a common way. Essentially, an entity is just a row in one of the tables of the database. Some examples of different types of entities in Drupal are nodes, taxonomies and users.

This structure makes Drupal easy for site administrators to learn: even though different types of entities might have very different functional values they all behave in roughly the same way. In other words, there’s very little knowledge redundancy.

Nodes

Drupal distinguishes content items (such as Pages, Articles, Blog Posts) from other system manageable items (such as Users and Taxonomies). Content Types can be created and managed via the control panel with out any knowledge of coding or markup. The term Node is used to refer to an item of content irrespective of the content type.

Nodes include pages and posts which are used to populate not only the main content area of a page but also lists of recent posts, navigation menus, footer links etc. Taxonomies record the relationships between nodes (e.g. blog post categories) and also often populate lists of links or menus. Users have a prominent role on community sites and forums but are generally only used in the backend on enterprise sites.

Modules

To extend the functionality of your website you can install modules that have been created by Drupal’s extensive community of contributors. Much of the functionality that the Drupal core now provides was originally provided by third-party modules which have since been absorbed into the product. All the third-party modules available at Drupal.org have passed rigorous tests to ensure that they’re stable and free from malicious code.

Some of the most commonly installed modules are:

Views – provides lots of different options for how content is filtered and displayed on pages;

Panels – allows the creation of different page layouts via a drag and drop editor;

Webform – creates forms and surveys;

Google Analytics – provides flexible options for adding the GA tracking snippet and tags to pages;

WYSIWYG – provides the ability to integrate a wide range of WYSIWYG editors for creating and editing content.

As part of its community approach Drupal provides a wide set of API hooks so that developers can extend both the core and third-party functionality. This opens up the possibility of almost unlimited additional features and makes Drupal an incredibly versatile platform.

Templates and Themes

A powerful concept in Drupal is the Theming layer. Drupal separates generation of the site’s markup from the site logic, allowing front end development and customisation without the need to alter or interfere with the underlying logic. A Drupal theme uses hooks to override all the markup generated by both the core and third-party modules. This separation of logic and theme is especially valuable when the front-end and back-end of a site are to be developed separately, allowing designers to focus on visuals and UX without having to worry about how the content is generated.

Templates are used to determine the layout of a webpage and consist of ‘regions’ in which content is displayed through ‘blocks’. Some modules (such as ‘Panels’ above) allow you to customise the placement of blocks and regions within templates – you could say templates provide a superstructure to the page within which you can improvise.

Themes, like modules, are installed as separate components and can be changed easily via the Drupal admin interface without affecting the site’s content. This allows the possibility of developing several sites simultaneously from a single Drupal installation. Themes can be developed from scratch or downloaded from a huge variety of contributed themes at Drupal.org. Those themes can then be customised by creating sub-themes so that changes are maintained even when the parent theme is updated.

Key features

Forms

True to its origins as a community message board, Drupal excels at gathering and displaying user input. As a result, its form handling capabilities are second to none among content management platforms. Lots of other CMSs require extensive customisation and development in order to provide the form functionality that Drupal provides with just a couple of module installations.

APIs

Drupal also has an extensive set of APIs (Application Programming Interfaces) that allows developers to easily expand and create their own custom modules quickly and easily. For example, the Entity API allows developers to create, call, edit or determine access for any entity, providing unlimited options for extending the functionality of Drupal’s core content handling features. The Token API allows unknown values to be represented by placeholder strings (e.g. (node:comment-count)) so that they can be generated dynamically without requiring any coding. An example would be generating a page’s URL structure based on the title and the content type.

Roles and permissions

Drupal offers comprehensive control over what content users can access what operations they can perform on that content. Users of the same type can be grouped together under roles (e.g. Editor, Admin) to determine which parts of a website they can access, whether or not they can create particular types of content or perform functions provided either by the core or by third-party modules.

The roles and permissions features don’t just stop casual users from editing your homepage. They can also be used to set up efficient content publishing workflows with user experiences tailored to the needs and abilities of the different roles.

Internationalisation

Modules which provide localisation (determining where your users are located and which language to display) and content translation provide a wealth of options for serving up content to users in the appropriate language. Content can either be translated at the level of the node (producing a different node for each translation) or at the field level (with a single node containing all translations), or a mixture of the two. While third-party modules can make the process of setting up international sites much easier, all the functionality required for multilingual installations is provided in the Drupal core.

Media/image styles

Two modules in the Drupal core, File Entity and Media, provide a great deal of flexibility when it comes to displaying images, videos and other media with a variety of applied styles. Contributed modules can be used to define View Modes which style media files differently depending on the context in which they are used.

URL aliases

By default Drupal generates URLs for pages based on the unique id of the node which provides the page’s content. The ‘URL Alias’ feature allows the substitution of a more readable, more user-friendly URL which is also more discoverable by search engines.

Meta data / OG data

The third-party module Metatag allows for various types of meta data to be added to content which is useful for obtaining search engine rankings or providing preview content in social shares. OpenGraph data in particular is used by Facebook to generate previews of shared pages.

Search API

Another contributed module, the Search API allows the creation of searches on any entity in the database. This can be done using a standard database search or by using a third-party search engine, e.g. Apache Solr.

Caching

When Drupal builds a webpage it makes a number of calls on the website database. Each time there’s a database call some time elapses and the page tales a little longer to load. To speed the process up Drupal stores complete pages in a cache so that the next time they’re requested they can be delivered ready-made – sort of like a Blue Peter presenter saying “here’s one I made earlier”. This drastically reduces the load on the server, allowing it to handle more connections.

There are modules which allow extensive customisation of the page cache and, through other modules, Drupal can also easily make use of popular caching technologies like Varnish. Altogether there are many different options when it comes to implementing a caching strategy for sites which have to regularly deliver content to large numbers of users or which experience sharp peaks in traffic volume at certain times.

Upgrades

The current stable version of Drupal is version 7. Since Drupal 1, 2 and 3 were released in 2001 there has been a major new release of the software every 3 years or so on average though the gaps have been very irregular: Drupal 6 was released just 13 months after Drupal 5 but there was a five year gap between Drupal 5 and Drupal 4.

Minor updates (e.g. from 7.1 to 7.2) can be applied relatively easily, though you still backup your entire site and test the update on a test environment before going ahead. Major updates (e.g. Drupal 6 to Drupal 7) require a much more in-depth procedure since the Drupal core is likely to have changed significantly, which means the modules that are dependent on that core will also have to be updated or replaced. The more complex the installation, the more complex the upgrade procedure.

New major versions of Drupal are often developed in parallel with the current stable release so that contributors and developers can gradually move over to the new version and disruption is minimised for the organisations using Drupal to power websites.

Drupal 7 brought major usability improvements, incorporated functionality from several popular contributed modules in the Drupal core and improved security and speed. The next major release is the long-awaited Drupal 8. While an official release is expected in the next few months, developers have been building Drupal 8 websites in the wild for some time already and most of the popular modules have been updated to support it.

Drupal 8

While Drupal has always been very developer-friendly the latest versions have done much to improve the experience for users and administrators. Drupal 8 continues this trend with a mobile-first approach which comes with responsive themes as-standard. The functionality of several modules which have long been favourites of editors and admins – such as CKEditor and Views – have been brought into the Drupal core along with a greater range of fields which can be added to content. Multilingual publishing is also easier to set up in Drupal 8.

But it’s under the hood where we see the most significant changes. Drupal 8 is fully object-oriented and adopts the Symfony PHP framework, bringing it in line with the latest industry standards. While this introduces many new concepts for Drupal specialists it also reduces the barriers to entry for developers who are new to the CMS, expanding the Drupal talent pool.

Compared to procedural programs, object-oriented programs are easier to maintain, extend and refactor. So although a lot of work is spent to write the program, less work is needed to maintain it over time. – Dries Buytaert

Built-in web services allow the creation of mobile apps using Drupal 8 as the content management system. HTML5 and a new theming engine make designing great experiences across devices a simpler proposition for front-end developers.

Support and documentation

The extensive community of Drupal contributors ensures that the documentation available at drupal.org is comprehensive and up to date. This applies to both the core Drupal features and contributed modules. In addition to the thorough documentation there is also an active forum which acts as a huge repository of knowledge.

When it comes to learning Drupal there are online groups and courses as well as meetups, conferences and other events which take place almost continuously all over the world.

Commercial support isn’t available from Drupal directly but there are a huge number of technology agencies (Manifesto included) which can help organisations implement and maintain Drupal installations.

At the time of writing, Drupal 6 has been moved to ‘unsupported’ status, which means that the support and frequency of patches released for this version will now start tapering off as the community focuses on supporting Drupal 7 and Drupal 8.

Security

As with any technical system that achieves a critical mass of popularity, Drupal has become a target for those seeking vulnerabilities. Again the large, distributed community of Drupal contributors comes into its own and gives the platform an edge over proprietary systems: a huge number of eyes on the codebase can help identify security issues quicker than a handful of expert users.

Drupal releases security updates frequently as needed and there are plans to introduce automated security updates in the future. However, because contributed modules aren’t included in the Drupal code respositories site owners still need to make sure they’re aware of updates to third-party code.

The new theming engine in Drupal 8, Twig, removes the need for PHP code in templates, reducing risk, and has an auto-escaping feature which further reduces vulnerabilities.

Acquia

Acquia is the go-to platform for Drupal hosting for enterprises. Founded by Dries Buytaert, the creator of the Drupal platform, in 2007 it has been the recipient of venture capital finance to the tune of over $100m and an undisclosed investment by Amazon in 2014. Its products include:

Acquia Cloud – a platform-as-a-service which aims to accelerate the build-test-deploy cycle for Drupal applications

Acquia Cloud Site Factory – for building and deploying many sites with minimal development time

Acquia Lift – a personalisation engine for delivering targeted content based on user segmentation

Acquia Cloud Edge – enhanced security features to prevent DDoS and a CDN to deliver content faster

Acquia Content Hub – a content governance platform which enables content discovery and syndication

Conclusion

Drupal is an incredibly powerful and versatile content management system. Its ‘out of the box’ features for managing and creating content types, controlling user roles and permissions and for handling user generated content (e.g. form submissions) make Drupal an ideal choice for a wide range of organisations with disparate audiences and sets of user needs. In short, it’s a solid platform for creating great digital experiences.

That’s not to say there aren’t drawbacks. At one end of the scale Drupal can be inaccessible. Small organisations who want to get a basic site up and running with minimal development time and technical skills will find Drupal has a steep learning curve. A less powerful but more user-friendly platform like WordPress might be a better choice.

At the other end, Drupal’s community-developed nature can work against it. While its open source nature removes the need for paying the kind of hefty licensing fees attached to proprietary software, Drupal’s idiosyncrasies mean that developers who specialise in the platform are often required for anything more than a basic implementation. This can lead to staffing problems and escalating development fees for larger organisations when these skills are in short supply. But Drupal 8 goes a long way towards solving these problems with the adoption of object-oriented programming and the Symfony framework.

In fact, the future for Drupal looks increasingly bright as the community which develops and maintains it continues to flourish. As those leading the product’s development continue to break down barriers to entry we’re sure to see the open source platform make increasing headway in the sectors that have traditionally opted for proprietary, licensed CMS platforms.

Appendix – top Drupal resources

Download Drupal – from the official site

Official Drupal documentation – written by the Drupal community

Drupal forums – community Q&A threads

Acquia – managed Drupal hosting provider

Drupal Groups – real-world and online Drupal community events

Drupal case studies – at Drupal.com

This guide to Drupal was authored by Paul Kelly, Richard Hanson, Gabriele Maira and Jamie Griffiths.

The post Manifesto’s guide to Drupal appeared first on Manifesto.

Show more