Since 2012, PreviousNext has been developing and maintaining the aGov distribution for Drupal 7. aGov provides a means for Australian Government organisations to meet their accessibility and security obligations with free and open-source software hosted on the platform of their choice.
In the last few weeks we have been working on the Drupal 8 version, and are happy to announce today the first Alpha release!
In this post we share some of our experiences developing a Drupal 8 distribution.
Drupal 8 was fast approaching a release candidate and with the release of Beta 15 we knew it was time to begin working on aGov for Drupal 8. We had aGov up and running against Beta 15 and we’ve been chasing head since. Today's first Alpha 1 release is compatible with the latest Drupal 8 RC2.
Is Drupal 8 Ready?
Update from March 2017: Yes!
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.
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.
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 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
Update from March 2017: Many of these issues are now resolved.
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.
- 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!
aGov is the open Drupal platform for building Australian Government standards-compliant websites. First released in 2013 as a free open source distribution on Drupal.org and now in use on more than 500 websites, the platform provides all of the features required to meet application security, accessibility and branding requirements by the Australian Government as a default install.
aGov is a Drupal distribution developed specifically to meet Australian Government website guidelines with aGov 3 adhering to the new Digital Service Standard.
aGov is ideal for any federal, state or local government agency wanting to move their websites quickly and easily to Drupal whilst retaining full control of their codebase and choice of hosting provider.
Hello mr. Ben... Can we add some data field from commenter such as email or their website/blog/url (social)? thank you.
First off, love your work - this is a great Drupal distribution. Any idea when the new version is going to be in Beta for Drupal 8? I would like to use the new version for some upcoming websites. Thanks in advance.