Content Modeling in Drupal 8: Challenges and Best Practices

Content modeling in Drupal 8 is a self-evident example of how an ideally streamlined web development process can result in a “boomerang effect”! Ease of use, unlimited accessibility and empowering the non-technical user can easily turn into Drupal 8's vulnerabilities instead. How come? Simple! The easier it is for Drupal developers to model their content using the web-based interface (instead of a standard database table) that Drupal 8 “spoils” them with, the easier it gets for them to create some excessively complex data models.

See? Simplicity and ease of use's “boomerang effect”! In no time Drupal 8's key features aimed at simplifying (even more than Drupal's previous versions) and of streamlining the whole content structuring process turns into an “ordeal” when it comes to efficiently maneuver such an excessively intricate content model.

Therefore, in order to avoid that such a scenario should turn into your very own reality, as a Drupal developer in Toronto, I've put together for you a list of best practices for content modeling in Drupal 8:

1. But First: What Is a Content Model?

If I am to to boil it down to a short definition: it's a process during which a Drupal team puts together an inventory all the different types of content that their web project involves.

Now, if you allow me to enrich this definition just a bit: content modeling is a key step prior to the Drupal 8 site's building itself. It's then that all the content types get mapped out and efficiently structured, along with each one's own set of distinctive elements and the way these ones interact with each other, as well!

The whole purpose of launching such a process and (most of all) of getting it right, is that of aligning all the involved teams' efforts, of enhancing communication among them. The final goal: identifying and making all the requirements clear to all those working on the project!

  • the web designers: will ensure that the design they'll create will accommodate the different types of content mapped out in the content model

     
  • the Drupal developers: will get a clear inventory of all the content requirements and will know just how to adapt the CMS they'll configure in order to suit the content editor/writer' needs (hopefully they'll make the CMS easy to use and highly accessible for their colleagues in charge with content editing and publishing)

     
  • the content writers: will learn all about the amount of content (and its particularities) that they'll have to deliver for each web page, as well as about how to use the CMS for uploading their content

2. Why Should You Set Up a Content Model After All?

The ultimate purpose for modeling your content if that of putting together the perfect structure where functionality meets content requirements. As obvious as that!

It's this structure that will turn into your editor interface. 

3. Turn This Process Into Your Top Priority

You can't expect a Drupal 8 website to turn into an “amazing piece of engineering”, with all its parts functioning in great harmony, complementing one other and supporting the whole system, without a well thought-through content structure as a foundation!

Get it? Content modeling in Drupal 8 should be one of the very first steps you take before your roll up your sleeves and start building your website.

In vain will its pages have an amazing design and display some highly engaging pieces of content if as a whole they look chaotic. If they risk to “sabotage” each other due to lack of strategy, due to lack of efficient data structure.   

4. Content Types: The Fewer the Easier to Handle

Remember what I've “warned” you about at the beginning of his post? That a Drupal 8 content modeling process risks to result in a “boomerang effect”?

Well, in this respect I should add here: the fewer content types you load your content model with, the “safer” you'll be! You won't risk to end up with an overly complex content model!

It's a common-sense precaution, if you come to think of it: the more content types you'll have, the harder it will get for you not only to develop the website, but to keep everything in place on your Drupal 8 site, as well. The more challenging it will be to change/edit your content types, since you'll then have many more different web pages to access and edit, one by one.

In other words: keep your list of content types short, if you want more freedom for moving content around your site and if you want to reduce chances of making mistakes when editing your “load” of web pages (each one with its own content type). Just think of all the settings, labels and formatters you'll then need to edit and multiply them by 10 or by 20 (depending on how many content types you'll include in your content model).

5. Keep Your List Short when Content Modeling in Drupal 8

Whenever you're wondering how many content types is “too many”, set up your limit to 5!

It won't be easy, that's certain, given the rich collection of built in entities (nodes, taxonomy, comments, users etc.) that Drupal “tempts” you with.

Still, be reasonable and accept the fact: most Drupal 8 websites don't require more than 5 content types! Remember also that you can always add extra fields (and layouts) to your content types! 

In other words: keep your list short and do your best to “joggle with” fields whenever you feel tempted to break your limit of maximum 5 content types.

6. Go for Multiple Form Displays for Each Content Type

Your list of best practices for content modeling in Drupal 8 should no doubt include this “trick”, as well! 

Why should you overload your admin interface when you have such great tools at your disposal (Form Mode Control and Form Mode Manager) for setting up different form displays for the each content type defined in your web project?

And here is where my list of challenges to respond to and of best practices to adopt when you're content modeling in Drupal 8 ends! I'm curious now to find out about other challenges that you might have had to deal with and about other Drupal 8-specific data modeling “tips” that you feel like sharing!