Zensations

Development

Drupal 8 Experience

Jo Spelbrink

After taking our first steps in 2015, 2016 was the first full year where we exclusively implemented all new projects with Drupal 8. In this blog post, I will try to share our experiences with the current version of Drupal. First and foremost, I want to point out that Drupal should generally be understood as a Content Management Framework (CMF) that enables bespoke Content Management Systems (CMS) for web projects. Every project is subject to different client requirements, which lead to individual concepts that are then implemented accordingly.

The switch from Drupal 7 to 8

Compared to previous versions, Drupal 8 brought significantly greater changes than ever before, which proved to be quite a challenge and involved a corresponding learning curve. Familiar concepts had to be abandoned, and new ones had to be understood. Due to a lack of documentation initially, much research and experimentation were required to achieve the desired results. Twig as a powerful new templating engine with vastly leaner templates instead of Phptemplate, Symfony PHP and object-oriented (OOP) programming instead of procedural. In addition, the familiar modules for Drupal 8 were not yet available or only in a limited capacity. Thus, we were often forced to experiment.

Breaking habits as an opportunity

This circumstance led us to examine the currently available modules. The familiar implementation of layouts in Drupal 7 with Pagemanager, Panels, and Panels Everywhere was only comparatively limited in Drupal 8. This forced us to look for and try out alternatives. One of these new standard modules in our Drupal 8 projects is now the Paragraphs module. It allows web editors to flexibly define the order of content components, combine them, and change them later via drag and drop. The flexibility of this module and the insights gained from last year's practice now even allow us to forgo Page Manager and Panels entirely for some projects. These modules, along with entirely new ones, will remain on our radar and become exciting again in upcoming versions.

Backend Experience

The user experience for web editors in Drupal 8 has become significantly simpler, more consistent, and clearer. Our agency places great importance on ensuring that the user experience works not only on the frontend but also in the Drupal backend. As mentioned above, we now work extensively with the Paragraphs module, which is an enormous asset in its flexibility and even enables new concepts that previously functioned only rather statically, allowing web editors more creative freedom in creating web content. It is also worth mentioning that the Drupal 8 backend now meets the ATAG 2.0 criteria for accessibility.

View Modes

Because Drupal 8 is now a complete entity system (every piece of content is a unit that can be linked with other units in various combinations), greater flexibility is now provided in how content is displayed. This is where View Modes in Drupal 8 come into play, which we use very intensively. While Drupal 7 only had standard displays, and these could only be extended programmatically or with the Entity View Modes module, they are now an integral part of Drupal 8 Core. This allows you to define an entity type (such as an article) with all necessary fields and use View Modes to precisely determine which content is visible at different points in a User Interface (UI), for example, an article as a teaser, full view, box, etc. Something similar is now also possible with backend forms using Form Modes. Our experiences have shown that with fewer content types, we can design the visual presentation much more extensively and arbitrarily than before. This enormous flexibility, alongside list views, is one of Drupal's great strengths.

Media Management

Another new standard module in our Drupal 8 projects is the Media Entity module, along with the Media Provider modules for images, embed videos, documents, and several others. This allows media to be meaningfully defined and referenced, thus finally establishing a new standard for media management that can be individually designed and makes media reusable in this way. It should also be mentioned that there is a core initiative where media management will soon truly come into Drupal core (https://www.drupal.org/about/strategic-initiatives).

Another positive change is the default settings for images. Previously, all necessary image attributes such as alt text or title had to be laboriously and individually set via a separate module, but now they are standard in Drupal 8. This means necessary attributes are available without much effort and can therefore be indexed by search engines (Google is the world's largest “blind” user, after all). This increases accessibility and simultaneously brings better search engine results.

Configuration Management and Composer

A major change was Configuration Management and managing modules via Composer, a package manager for PHP in the Command Line (CLI). Since we already worked with Continuous Integration (CI) via Git repositories, the main changes were in the Command Line workflows. The export of complex configurations via the Feature module in Drupal 7, along with Make-Files for reinstalling projects, was replaced by Composer and the new YAML configuration files, accelerating deployment processes. We have had the best experiences with Continuous Deployment Cloud Hosting. Consequently, maintenance tasks can be handled more quickly.

New Release Cycle

A new feature in Drupal 8 is the Continuous Innovation Model in the release cycle. This aims to introduce new features in minor releases. A current good example is the BigPipe module, which already worked very well in an experimental status in Drupal 8.2 and will reach stable status with the next version 8.3. This module enables better performance through faster loading of web pages. This model of minor upgrades will also be applied to the next Drupal 9 Major Release, aiming to flatten the learning curve for major releases in the future. Old code is retained in minor upgrades while new code is introduced. In the next major release, the code will be almost identical to the last minor release of the previous version, but the old code will then be removed. The elaborate upgrades between major releases should then be a thing of the past. Future upgrades will therefore be much simpler, as entire sites no longer need to be rebuilt as was the case with Drupal 6/7 to Drupal 8.

Conclusion

We are now very convinced by Drupal 8 and its upcoming developments. The shorter release cycles for new features give us the opportunity to meet complex requirements and develop good, functional web projects that work both on the frontend and in the backend.

Share

More on this topic