Why should brands use Drupal?
At Lab, we are obsessed with human behaviour and technology. Drupal is one of the platforms we specialise in and to gain a better insight of why brands should use Drupal, we thought we would chat with our Lead Drupal Developer, Deon Smith, who armed us with the main benefits and technical tips for every Drupal 8 project.
Drupal is one of the world’s leading CMS systems, trusted by everyone from government organisations, universities and brands like Tesla; to smaller companies that simply require a presence online that won’t cost them an arm and a leg. As an open-source system Drupal has thousands of contributors all over the globe, which ensures that the platform is constantly expanding, and is always kept up to date.
With thousands of modules available online for free, the Drupal ecosystem can be tailored to meet any brand’s needs. And if whatever they need isn’t already there, it can be built. Thanks to extensive documentation produced by the community, there is always an answer to any question that developers might have when creating custom solutions.
With support for eCommerce, internationalisation and a built-in REST API to name a few, Drupal has all the tools for the job, be it big online applications or small marketing sites.
What are the benefits of upgrading to Drupal 8?
If you are already using Drupal, you should look at upgrading to the latest version which was released this year. Here are a few reasons why…
Improved page caching
With a more intelligent caching system in Drupal 8, developers can now ensure that applications run as smoothly as possible without having to battle the built-in caching system, or relying on external systems.
Multilingual and internationalisation support has been built into the Drupal core. While Drupal 7 relied on third-party modules, this is now supported out of the box, ensuring a smoother process when taking applications to the global market.
Drupal 8 now has built-in REST API endpoints for all core functionality. This means your Drupal application can act as a pure content authoring system, to be consumed by several sources, such as mobile apps or decoupled front-end systems. Adding new endpoints is a lot easier because of the bigger focus on OOP programming principles.
These are only a few of the improvements made to Drupal 8. From the reworked content authoring experience, to improvements in security, and a move to a more robust and traditional OOP frameworking running under the hood, Drupal 8 has really moved forward from its predecessor by leaps and bounds.
Top technical tips for every Drupal 8 project
OOP and proper namespacing
Since Drupal 8 is built with Symphony as its backbone, and optimised for the modern stack with PHP7, some older techniques like forms and the good old hook_menu are being replaced with classes. This means developers need a basic understanding of OOP and the use of proper namespacing - so it’s time to brush up on those skills if necessary.
Drupal 8 themes run on Twig. Gone are the old php templates. Getting familiar with Twig and some of the Drupal specific tweaks will help front-end developers and themers get the most out of Drupal 8.
YAML (or .YML)
Configuration and information for modules, themes, etc is now all stored in YAML files. Getting to grips with the YAML format is what you’ll need when it comes to, among other things, replacing the old .info files for custom modules, settings up routing to your custom paths, and more.
Drupal can be installed by simply downloading the core archive file and slapping it on a server, but managing all the modules and libraries becomes a lot easier with Composer. A basic understanding of Composer will allow you to quickly and efficiently install any module or library for your application.
Drupal 8 has changed the way that we can import/export or store configuration. You can now opt for file based configuration storage vs traditional database based configuration, andyou can easily import or export your entire configuration between systems. Making the most of the configuration manager will allow you to improve your development workflow for new Drupal based sites. Features still exists and has seen some big changes, being built on top of the native configuration manager instead of as a replacement for it.
Contrib modules migrated to core (CKEditor, Views, etc)
Several Drupal 7 modules have been moved to the core for Drupal 8. This means less setup time, allowing you to get to your projects faster. Modules like Views and CKEditor have been built into Drupal with the latest release. Several changes have also been made to the traditional Drupal APIs, so it might be worth taking a look at the updated documentation before tackling that next big project.
Every Drupal developer worth their salt knows about and uses Drush. There have been some changes to version 8 and 9, with some commands being removed, replaced or renamed. Make sure you’re on top of your game by reviewing the documentation and available commands.
Drupal Console is a command line interface tool that provides powerful debugging and boilerplating tools, that are only a few keystrokes away. Generate the skeleton of new modules, entities or even forms with ease before even touching a line of code.
Bonus tip: Decoupled/Rest API
Since Drupal 8 comes with a REST api right out of the box, it’s easier than ever to go the decoupled route for your applications. Getting familiar with how to create custom API endpoints or just utilising the ones built-in will help you take your app to the next level.
- This is a quick rundown on why Drupal is a great tool to use.