Screens, Research and Hypertext

Powered by 🌱Roam Garden

The Problem with CMSs

Most CMSs document references, not relationships.

Links are meant to document relationships. Here's an example that demonstrates a very simple relationship:

Mill Quotation

I regard utility as the ultimate appeal on all ethical questions; but it must be utility in the largest sense, grounded on the permanent interests of man as a progressive being.

John Stuart Mill, On Liberty

The hyperlink on John Stuart Mill leads to a reference for the quotation. A human—at least one who has used the internet before—will likely assume that to be true, even without clicking on the link. A human who does click the link will know it for certain.

The relationship between the quotation and the link can be formalized as something like:

Quotation publishedIn Source

But now consider how a machine—like, say, a CMS—is going to handle this sort of thing.

The standard field type for relating two pieces of content (in this case, an article containing a quotation and the source of that quotation) is an entity reference field. But notice that it's an entity reference field, not an entity relationship field. That's a deliberate naming choice. It means that entity references give us something like this:

Quotation –> Source

Even if we make the link bidirectional, we still get something like:

Quotation <–> Source

That's better. But it's still not quite the same as what we're really after. As Gabriel Sullice wrote all the way back in 2016:

I think as Drupal developers and architects, we’re fundamentally misusing [entity reference fields] in far too many cases. Over and over, we use entity references to denote a relationship between two entities instead of a simple reference or inclusion. Mere entity references severely limit our ability to create rich, rational content type architectures and force us to jump through additional hoops and write more custom code than ought to be required. I believe that Drupal having only entity references to forge relationships between content types is a major shortcoming.

Sullice goes on to suggest ways of creating actual relationships in Drupal. They are tedious and require a lot of extra governance, but are doable. They're also meant as a stopgap. Sullice suggests that adding a relationship entity type to Drupal core "would enable us to do all kinds of neat things and make so much custom code completely unnecessary."

It's a good idea. At least until we can get Drupal running on top of a triple store.

For more context

What to read next

What would a better set of hyptertext practices look like?

Other items of interest

Subpar handling of relationships isn't the only place where our CMSs are failing us.