To Structure or Not to Structure

By Deane Barker 9 min read
Author Description

The decision of when to structure content or not can be subjective. This is an example of one such situation, and the pros and cons of the various methods.

AI Summary

This post examines the debate between structured and unstructured content in web development. The author discusses the benefits and drawbacks of each approach, emphasizing the importance of finding a balance that suits specific project needs while ensuring usability and maintainability.

I’ve talked a lot over the years about content modeling. Open and Closed Content Management is probably the most self-referenced post on this site. Recently I called content modeling one of the Four Disciplines of Content Management.

But, lingering behind all the questions about how to model something is a bigger question: do you model it at all? When is it obvious to structure some content, and when do you just throw it into the “WYSIWYG pile”?

We were meeting with a client the other day about applying some content management to their Web site. We came upon a page of “business partners.” It had a repeated HTML structure consisting of a logo for the partner, their name, their URL, and a few paragraphs about them. There were maybe a dozen or so partners listed.

It looked like this:

From a content modeling perspective, you have three ways to handle content like this:

  1. No structure: This is a perfectly viable option – provided you didn’t mind a TABLE, the HTML represented here is nothing any decent WYSIWYG editor couldn’t handle.

  2. Structured as a single content object: For most systems, this means an XML document, with a repeating “partner” element, and sub-elements therein for “logo,” “name,” “url,” and “description.”

  3. Structured as multiple content objects: You could create a “partner” content type, with fields for “logo,” “name,” “url,” and “description.” This page would be a rendering of multiple partner content objects, sequentially down the page.

Not surprisingly, there are advantages and disadvantages for each, and we threw them around with this client.

No Structure

Advantages

Disadvantages

Structured as a Single Content Object

Advantages

Disadvantages

Structured as Multiple Content Objects

Advantages

Disadvantages

So, there’s a run-down of the advantages and the disadvantages of the major approaches. But which one to choose?

As you’d imagine, there’s no clear-cut answer. Here are some of the factors to consider:

In writing this post, I tossed it over the pond to Josh Clark for his input. In his response, he captured one of the more succinct differences between how we (developers) look at content, and how the end users do. This too, needs to play a role in your decision (emphasis mine):

The big advantage to structuring content, of course, is that it lets you repackage it and present it in different forms and contexts. The downside is that it forces editors to approach their content like machines, thinking in terms of abstract fields that might be mixed and matched down the road. The benefits often outweigh this usability cost if you’re going to present the content elements in multiple contexts and/or offer various sorting options with a large number of elements. If not, then I typically go with unstructured.

That’s brilliant, and it’s so true. Understand that structuring content can suck the soul out of the authoring process for a lot of people. Like Josh said, often the advantages are clear enough to justify some soul-sucking, but always approach this with care.

I remember a client for whom we were building a “case studies” section of their Web site. I kept trying to get them to structure the case studies. I would say things like:

If you kept your case studies in an Excel spreadsheet, and each row was a case study, what would the column headings be?

Now, this is a good question and one that’s worked well for me in the past, but this client was just not getting it. Finally, Joe said, “Dude, I think they just want a page…” And he was right. The client wasn’t thinking in terms of structure – they were thinking in terms of a page with stuff on it. The figured they could just WYSIWYG it up, and in the end, they did it this way and they were fine.

Postscript: So, what are we going to do with our original example? At this point, I can’t say, but I’m leaning away from pure WYSIWYG because of the image processing. If we get this client on eZ publish, I imagine we’ll do it in separate records because eZ can’t repeat sub-elements within the same record. If we were to go with a CMS that allowed that, then my inclination would be to do as a structured single record.

Links to this – Advanced Topics in CMS: Course Syllabus
This is the content for Deane Barker's 'Advanced Topics in CMS' course taught at FH Joanneum in Graz, Austria.
Links to this – Introduction to CMS: Course Syllabus
This is the content for Deane Barker's 'Introduction to CMS' course taught at FH Joanneum in Graz, Austria.
Links to this – Composite Pages and Embeddable Content March 27, 2008
Handling structured, one-off pages in a CMS can be complicated. This is a discussion of two of the common patterns -- composite pages and embeddable content -- and the pros and cons of each.
Links to this – Content Reuse and The Problem of Narrative Flow January 1, 2013
Reusing content across multiple channels is the Holy Grail of content management. But it's not that simple. For certain types of content, it's very hard to do without alienating your audience.
Links from this – Open and Closed Content Management June 20, 2003
Different CMS allow you to define your content in different ways.
Links from this – The Four Disciplines of Content Management November 24, 2007
All of the disciplines put under the "content management" moniker can actually be split into four distinct groups.
Links from this – Image Abstractions and Implementations in Content Management January 30, 2006
Image handling in content management can be complicated, but the first step is abstracting the image that appears in your finished content from the file that it's based on.
Links from this – File and Image Handling in Content Management June 21, 2007
Often, a binary file needs to be bound to a specific content item, and needs to "live" in the context of that item.