Salesforce Platform

Salesforce began as a CRM and became a platform: thousands of organizations run sales, service, partner portals, and custom business applications on it, with data models, automation, code, and user interfaces built inside their Salesforce org. Developers work with declarative tools (objects, fields, Flows, page layouts) and code (Apex, SOQL, Lightning Web Components), on a multitenant platform that enforces strict resource limits and releases new versions three times a year.

Engineers coming from conventional application development find Salesforce both familiar and surprising: Apex looks like Java, but every transaction runs within governor limits; security is mostly configuration, but code can bypass it if written carelessly; and deployments move metadata between orgs rather than containers between servers.

TL;DR

Quick Example

A bulk-safe trigger handler that creates onboarding tasks when opportunities are won, respecting the running user's permissions:

A test proving it works for 200 records at once, the size of a typical bulk update:

Core Concepts

Data Model

Design the data model deliberately; changing relationships after records and automation depend on them is expensive.

Governor Limits

Because tenants share infrastructure, every transaction has limits — for example on the number of SOQL queries, DML statements, records retrieved, CPU time, and heap size. Code that queries or writes inside loops works in testing with one record and fails in production when a data load updates 200 at once. Write bulk-safe code: collect IDs, query once, build lists, and perform one DML per object type. Use asynchronous Apex — Queueable, Batch, and Scheduled jobs — for large volumes.

Security and Sharing

Salesforce recommends granting permissions through permission sets rather than profiles. Apex runs in system context by default: declare classes with sharing, use WITH USER_MODE in SOQL and as user DML (or Security.stripInaccessible) so code respects object and field permissions. See Authorization Models.

Code and UI

Keep one trigger per object delegating to handler classes, and avoid overlapping Flows and triggers on the same events.

Integrations

Authenticate integrations with OAuth through connected or external client apps — the JWT bearer flow suits server-to-server integrations — using dedicated integration users with minimal permissions. Respect daily API limits, use bulk and composite APIs for volume, and make integrations idempotent with external ID fields. See Enterprise Integration and Webhooks.

Release Governance

Best Practices

Bulkify Everything

Assume every trigger and Flow will process hundreds of records at once, and test with that volume.

Enforce Permissions in Code

Use with sharing, user-mode queries and DML, and test with users who lack permissions, so code never exposes data the UI would hide.

Prefer Declarative Where It Fits

Use Flow for straightforward automation and Apex for complex logic, integrations, and performance-critical paths — but keep automation on each object coordinated.

Treat the Org as Code

Keep metadata in version control, deploy through pipelines, and avoid untracked changes in production.

Common Mistakes

Queries Inside Loops

Code That Ignores Sharing

Integration Users With System Administrator

FAQ

What is the Salesforce Platform?

Salesforce's cloud application platform for building and customizing business applications with declarative tools, Apex code, Lightning Web Components, and APIs, on top of its CRM data model and multitenant infrastructure.

What are governor limits?

Per-transaction limits on resources such as queries, DML statements, CPU time, and memory, enforced because many customers share the same infrastructure. Code must be written to handle records in bulk within those limits.

What is the difference between profiles and permission sets?

Profiles assign a baseline of permissions to each user; permission sets add permissions on top and can be combined into groups. Salesforce recommends managing permissions primarily through permission sets.

Should I use Flow or Apex?

Flow for straightforward, declarative automation that admins can maintain; Apex for complex logic, heavy processing, integrations, and cases where precise control or performance matters.

How do I deploy Salesforce changes safely?

Keep metadata in source control, develop in scratch orgs or sandboxes, deploy through CI with the Salesforce CLI, run Apex tests with meaningful assertions, and validate against preview sandboxes before seasonal releases.

Related Topics

References