Architects · Architecture Note
Separating Data and Metadata in Reusable Salesforce Components
A design principle for building Salesforce components that can evolve without becoming a pile of if statements.
Most reusable UI problems become easier when the component stops treating all input as the same thing. Record values and field descriptions are different concerns.
Data answers “what value?”
Data is the current state: record IDs, field values, draft changes, server responses and validation messages.
Metadata answers “how should this behave?”
Metadata tells the component whether a field is a date, a picklist, a lookup, editable, required or hidden in a specific context.
The practical result
The component becomes a renderer over a known contract. When the contract is stable, the implementation can evolve without rewriting the screen every time the business asks for one more field.