Contentful vs. Non-Contentful Code

Diagram contrasting non-contentful code elements and contentful code in a web application interface

Contentful Code

“Contentful” code understands the business, while “non-contentful” code doesn’t know anything about the business itself (although it does know where to look).

Today’s contentful code works but has some issues:

  • Training is expensive and time-consuming: Even for those with domain knowledge, new developers need several months to learn the business well enough to be productive.
  • Turnaround time, risk, and costs for new development and changes are high: Because business rules and data quality checks are spread out across several code bases and lack a cohesive, consistent structure, impact analysis takes time, testing is laborious, and code changes often introduce second-order bugs.

Shouldn’t code know about the business? Isn’t that its purpose? How could it not?

Business systems need to know about code but data systems do not: The purpose of data code is to perform data operations with low risk and cost while maintaining good governance, quality, architecture, integrity, trust, traceability, security, and reportability.

Many IT and data professionals (leaders, managers, stewards, engineers, etc.) make a hidden – and incorrect – assumption: that code which moves and transforms data must embed the details of how a business operates. They assume it must include the names, attributes, and behaviors of the business’s source systems, people, processes, databases, tables, and columns, as well as the specific business rules, data quality rules, and transformation rules to apply.

Can you imagine how such code might not contain this information?

As John Lennon famously sang in his song “Imagine,” “It isn’t hard to do.”

One way is to examine contentful code and identify its business content. For example, code that extracts and loads data from Salesforce might refer to an Opportunity object. That’s contentful: The code refers to a specific entity called Opportunity in the Salesforce source system.

Non-contentful Code

Now imagine instead fetching Salesforce table names from a data catalog, looping through them, and then looping through each table’s attributes. You’ve made your code significantly less contentful: It no longer needs to know or refer to table or column names. It still refers to the Salesforce source system but you could further rewrite the code to loop through a list of source systems and thereby remove the source system name from the code as well.

This blog post introduces these new terms: “contentful” and “non-contentful.” When socialized, they form a valuable shorthand for those working in Metadata-First environments.

Leave a comment