In-house Drupal development
We developed our Intranet system in-house, initially using Drupal 6 and upgrading it to Drupal 7 in 2016. Our Intranet helps us with work planning, tracking our project resources, timesheet administration, sales lead tracking, and producing reports we send to our clients. It also stores project documentation, offers, specifications and other internal documents.
Drupal 7 is nearing end of life – or is it?
When we upgraded our Intranet in 2016 to Drupal 7, we took the opportunity to modernize many parts of the site. However, the design was beginning to show its age, and we expected Drupal 7 to be “end-of-life” in November 2023. This “end-of-life” date had been postponed several times, so it was a surprise when – on June 7th – the organization behind Drupal suddenly announced yet another postponement, this time to January 5th, 2025!
Nevertheless, we are several years down the line since our last redevelopment of our Intranet, and a lot has changed in that time. Therefore, we remain committed to upgrading the site to Drupal 9 and even have Drupal 10 in our sights.
The journey to Drupal 9
As we wrote in earlier blogs, the move from Drupal 7 to Drupal 8 represents a substantial challenge. Drupal 8 broke new ground, ending support for many old hooks and APIs and introducing replacements that meant developers must refactor their code. Many module developers had to rewrite their code as well.
With Drupal 9, that transition is complete, and we believe that upgrades to subsequent versions will be much easier.
When we started our Intranet redevelopment, a stable Drupal 10 release was not yet available. However, we’ve always planned to include the upgrade from Drupal 9 to Drupal 10 during this project, assuming a stable release is available with the required complement of essential modules.
This upgrade is also an excellent time to give the interface design – based mainly on the original Drupal 6 website – a thorough overhaul.
Twig templates, Entity and Form API
Firstly, we wanted to convert our custom HTML output to use the Twig templates introduced in Drupal 8. Twig templates are a robust, modern system for generating output for pages. With projects like Literom, Uittrekselbank, SISO and WCC Support Centre, we have built up much experience with Twig, so we now want to use this for the new Intranet.
Secondly, we wanted to use Drupal’s Entity and Form API. With the Entity API, we describe the data we want to store. We then use the Form API to describe forms with which to edit data, but also for search functions and filters. With a little ingenuity, we can combine the two APIs, making data storage largely dynamic. A form can itself determine which fields to store in the corresponding Entity. You can even use an Entity to generate forms automatically, but this is often too restrictive for our use cases.
For the site’s styling, we wanted to use a framework that lets us easily compose layouts. We considered several options. At first, Bootstrap seemed a suitable candidate, but we quickly ran into limitations; It was great for quickly building layouts, but it imposed many restrictions on the styling of elements – and sometimes made it difficult to adjust them to our liking. Then Tailwind CSS caught our eye.
Using Tailwind CSS
In a nutshell, you could describe Tailwind CSS as a modern version of Bootstrap. Firstly, it offers many style rules that you compose yourself in the HTML of the web page instead of one big CSS file. The advantage of this technique is that the styling of one page doesn’t affect other pages (which quickly becomes a problem in larger projects). Secondly, you combine the HTML with the styling, which makes it more transparent. You can see directly from the HTML how it will look.
However, you don’t want to repeatedly redefine the same styling for every header, paragraph and table. For this reason, we have defined a minimum set of styles for common elements you frequently use, provided they are relatively straightforward and have few exceptions. If an element needs precise styling or only slightly deviates from the basic styling, we can achieve this using Tailwind CSS style rules within the HTML.
Guns for hire
While this is an internal development, we work for many clients using Drupal and many of the techniques described in this blog. We’re available to discuss your next project and can help you transition from Drupal 7 to Drupal 9 and beyond. If you’ve got such a project, why not get in touch?