aGov on Drupal 8

Drupal 8’s new feature list, improved APIs and long term future make it the right choice for many Drupal projects looking to start in the next 3-6 months.

aGov's maintainers PreviousNext are actively working towards a stable release of aGov 8 in the coming months with Alpha 2 available right now evaluation.

So what does aGov 8 look like and where is it heading?

Configuration Management

CMI has promised us a lot and I’m sure many were wondering how it was going to hold up. The answer is, very, very well! Configuration exports, imports and the whole profile workflow has been rock solid, pretty much everything we hoped it would be. Although a fork of core's DefaultConfigTest did help us pick up one issue.

Managing configuration in Drupal 7 was always with Features, and in Drupal 8, CMI will handle the exporting but the Features UI provides a nice way to bundle functionality together, detect dependencies for you and more. However, with the aGov 8 alpha we wanted to keep things as simple as possible so we used Config Devel to manage our config exports, a little more setup but the overall stability has been great.

Styleguide Driven Development

The 7.x-3.x branch of aGov was built using Styleguide Driven Development and the Drupal 8 rebuild really showed us how valuable that approach to frontend development is. We barely touched the frontend, overriding a few templates, a combination of Fences and Title and we had an 8.x replica without writing more than a few lines of CSS.

By keeping classes in configuration, we were able to avoid forking templates unnecessarily which helped keep our theme DRY. We also added a lot of preprocess functions to add classes to markup which wasn’t covered by the display management tools we had available to us.

Default Content Made Easy

Default content was one of the biggest pain points in Drupal 7, specifically with profile driven development. Drupal 8 introduced UUID into core along with a stable way to serialise and export content, and now thanks to PreviousNext's Lee Rowlands we have a reliable way to export and import default content.

Site Building with Fieldable Blocks

Blocks in Drupal 7 were primitive and it was never long until you found the need for another solution like Bean or Panels. So far, we've not needed either of those for aGov 8. Blocks in core are now fieldable entities, utilising the power of the Entity API on custom blocks gives much greater flexibility to site building with only core API's.

Page Manager

The aGov homepage is constructed using a combination of Layout Plugin, Page Manager and CTools. Layout Plugin in Drupal 8 is the de facto module for describing a layout using YAML. Now that layouts are abstracted into their own module, we’ll hopefully be able to share layouts between Panels and Display Suite, with the hope of Layout Plugin going into core in 8.1.x.

Page Manager is currently in a “working” state and we successfully used it to build a more flexible homepage however it is currently under active development. Using it in production would still be quite risky at this point in time at they make large architectural changes.

Accessibility

One of the key features of aGov is it allows Australian government organisations to have fully accessible sites from a simple default installation profile. However, in Drupal 7, that requires a lot of effort, contrib modules and custom code.

We’re glad to say the accessibility improvements in Drupal 8 have meant there is much, much less work to be done. Drupal 8 does a great job at meeting accessibility requirements for key features such as: semantic HTML5, ARIA Live Announcements API, Tab Manager, required alt attributes on images, aria roles, more accessible forms, colour contrast ratio. There is quite a long list!

This means we can mostly focus on ensuring the aGov default theme is accessible and leave the rest to Drupal core. Once we move to a full release of aGov 8, our partners at Media Access Australia will conduct an independent accessibility audit of aGov 8.

Security

Security has always been an important part of aGov, with the Drupal 7 version including a number of modules to harden security. 

In Drupal 8 there are a number of security enhancements, including big ones such as Twig templates and auto-escape (no more PHP code in templates!), and removal of the PHP module.

Improvements to the handling of secure cookies and additional HTTP headers to help prevent cross-site scripting are some of the small improvements which make it much less work to harden the security on government sites.

All this means less work needed to make aGov for Drupal 8 a more secure distribution out of the box.

What’s to come

While the Alpha release marks a milestone, we're just getting started. There are a few more improvements we need to make for security, accessibility and regulatory compliance.

This includes:

  • Metatags, and the AGLS extensions
  • Password policies and security tightening that enforce the Defence Signals Directorate ISM standards
  • Further accessibility audits and enhancements
  • Tours - PreviousNext helped develop the tour module by contributing to Drupal 8, we'll soon have some tours to show you around aGov.
  • Migrate - Now in core, migrating from Drupal 6 and Drupal 7 has never been easier. Upgrade aGov from Drupal 7 should be possible in the near future.

Like to get involved? Join us in the issue queue!

Back to top