Latest Blog Posts

Core development is frickin’ hard

Submitted by timmillwood on Tue, 06/09/2016 - 14:25

For the last 18 months I have been working full-time on Drupal workflow solutions, first with the Deploy suite of contrib modules, and now with the core Workflow Initiative.

It turns out core is a lot harder than contrib. Everything we have mapped out in the plan for the Workflow Initiative is already done, and working, in the contrib modules. So getting it all in core should be easy, right. Just port over the code from the modules into core APIs or core modules and it’s done. Well… no.

Everything in core needs to be generic, it needs to work for everyone. In contrib you can choose not to use module X if it’s not compatible with module Y, or if it doesn’t work with your use case, in core there is less of that luxury.

Also in core everything has to be done “properly”. We can’t just get a solution that works well enough and run with it, we need to be sure it is the best (or least worse) solution.

Some examples of the issues we are facing so far is with the Upgrade path between revisionable / non-revisionable entities issue. In contrib we use the migrate module to migrate all content out, make entity types revisionable then migrate everything back. For core this is not stable enough so we need a custom set of update hooks. Then Add StatusItem field type to store archived state in contrib we just add a new base field to all entity types to store the archived state. In core there are performance concerns with a new field and new conditions.

Thankfully there are so many people working and thinking about things that will help some of these areas, and as we continue to develop core we should be able to make things easier.

Content Moderation and Workspace module

Submitted by timmillwood on Thu, 25/08/2016 - 09:23

Drupal 8.2.0 will see a bunch of new experimental modules. Once of these is Content Moderation. This is a port of the Drupal 8 release of Workbench Moderation, with a number of updates to make it suitable for core.

Work is currently underway to get Content Moderation working for Workspaces. Workspaces, defined by the Workspace module and it’s dependency Multiversion, are a way of creating different versions of your site’s content and getting the elusive “full site preview” functionality. With Content Moderation you are able to moderate a whole Workspace. Then once published all content will be deployed to the live workspace.

The screencast below shows adding some content on the Stage Workspace and confirming the content doesn’t exist on the Live Workspace. Then publishing the Stage Workspace results in the content being on both Workspaces.

Selling the Drupal community to those here for the code

Submitted by timmillwood on Mon, 11/07/2016 - 13:03

Throughout the software development world there are many “evangelist” roles who sell the code to the community, but maybe we need the other side? Maybe we need to sell the community to the those who are just there for the code.

Drupal is famed for its community, with the slogan “Come for the code, stay for the community”, but as Drupal starts to evolve into a more enterprise platform it’s expected to see more organisations coming for the code, and staying just for the code. Why should we care?

Drupal Cores lists 3635 contributors to Drupal 8 core. Without these people you wouldn’t have Drupal. If you’re not supporting these people your business model is flawed. Many organisations sell Drupal to clients and / or use Drupal themselves. What would happen if Drupal wasn’t a sustainable platform anymore?

The Drupal Association doesn’t have anything to do with the code itself, but they do run the platform that packages the code, hosts the code, tests the code, markets the code, as well as many other roles within the community. This year and last year the Drupal Association had to lay off a number of staff members due to funding issues. Organisations really need to get behind the Drupal Association otherwise there will be no Drupal. There are a number of ways you can support the Drupal Association, and it’s great to see more and more non-dev-shops listed on https://www.drupal.org/organizations.

At Appnovation we have had a lot of growth over the last 2 years and with this growth community contributions have not kept up. Therefore we’re currently working on a community contributions program to try to inspire the company as a whole to work closer with all the open source communities. We’re also embedding this within the sales and pre-sales process too, so we can ensure our clients know about and understand the open source communities behind the software we’re using with them.

It’d be great to hear your thoughts, ideas, and views. In return there will be more blog posts with progress updates.

Workflow Initiative: What am I doing?

Submitted by timmillwood on Mon, 27/06/2016 - 16:45

The Workflow Initiative was announced just over a month ago and since then I have been working on the first phases full-time. Here’s what I’ve touched:

In Drupal 8.1.x the RevisionLogInterface was introduced, but not used. In 8.2.x the Node entity will use it. Also BlockContent entity will use it.

When we make everything revisionable we’ll need all entities to get their base fields from the base class. So from 8.2.x all content entities inherit their base fields.

To help people make sensible decisions Node revisions will now be enabled by default.

We got into a pretty annoying issue when trying to add revision fields to entities which already had data because the revision field couldn’t be set to NOT NULL. Andrei wrote an awesome patch to allow an initial from field to be set. We therefore set the revision id as the entity id.

When we make everything revisionable we’ll need an upgrade path, to test this the Shortcut entity is being upgraded to revisionable by a new service. This has still not been committed, so reviews are welcome.

We’re trying to get Workbench Moderation into core as Content Moderation. Still lots to do to make this happen, but the patch is there with passing tests.

Initial work has also started to get an archive field into all entities. This will allow us to have CRAP (create, read, archive, purge) workflow, create a trash system, and replicate entity deletion through environments.