📖 Read · 20 XP
Metadata vs data: your app is configuration
Metadata vs data
Most stacks draw a clear line between your code (in git) and your database schema (migrations). Salesforce merges the two into one idea: metadata.
- Data is records: an Account called Acme, a Contact called Nomsa, an Opportunity worth R50,000.
- Metadata is everything that describes and drives your app: custom objects, fields, page layouts, validation rules, Flows, permission sets, Apex classes, Lightning components…
Create a field in Setup and you've changed metadata. Write an Apex class and you've changed metadata too. Either way, it can be:
- Retrieved from an org as source files
- Version-controlled in git
- Deployed to another org
force-app/main/default/
├── classes/QuestService.cls
├── objects/Quest__c/fields/Status__c.field-meta.xml
└── flows/Quest_Default_Status.flow-meta.xml
The Metadata API and the Tooling API
- The Metadata API moves metadata between orgs (deploy and retrieve). The
sfCLI uses it under the hood. - The Tooling API lets tools query and edit metadata, e.g. "which Apex classes exist?" Apex Quest uses it to grade your builds.
🦝 When Quill checks "does your trigger exist?", he's querying metadata. Your records are none of his business.