Section 2 · Developer Fundamentals · 27% of exam
2.1 Multitenant Architecture, MVC, and Platform Limits
Exam objective
Explain how multitenancy and MVC shape Salesforce application design, and apply governor-limit awareness to a development scenario.
A shared service with tenant isolation
Salesforce runs customer organizations on a shared, multitenant platform. Customers share underlying service infrastructure, while the platform separates each org's records, metadata, users, and configuration. This lets Salesforce operate and upgrade a common service, but it also means that custom code shares finite resources with the rest of the platform. Governor limits enforce fair use and protect service stability. They are architectural constraints, not arbitrary obstacles that developers can remove.
A useful mental model is to identify the transaction first. A transaction is a unit of work that commits together or rolls back when an unhandled failure occurs. A trigger invocation, synchronous Apex request, or a segment of asynchronous work can have its own transaction boundary. Some limits are per transaction; others are shared across a longer time window. A scenario that says “one record” may conceal a bulk update initiated by an import or integration, so design for collections unless the entry point truly guarantees one item.
Common resources tracked by governors include SOQL queries, rows returned, DML statements, DML rows, CPU time, heap, callouts, and asynchronous work. Exact limits depend on execution type and can change, so use the current official limits reference rather than memorizing a number without context. The important design habit is to count operations by transaction, then reduce repeated work and avoid loading data the process does not need.
Apply MVC and separation of responsibilities
Model-View-Controller divides an application into data and business concepts, presentation, and coordination. Salesforce objects, fields, relationships, and validation rules form much of the model. Lightning Web Components, Aura, Visualforce, and Flow screens can present a view. Apex classes, Flow orchestration, and component controllers coordinate work. This is a conceptual separation; Salesforce solutions can combine layers, and not every requirement needs a custom controller. Good boundaries keep code testable. A small trigger delegates to a handler. The handler coordinates a domain operation. A data-access method retrieves a bounded set of records. The component presents state and asks a service to perform a supported operation. When a requirement changes, clear boundaries reduce the chance that a UI update also breaks unrelated data logic.
Design for scale
Suppose a service must update the parent of each changed case with the latest escalation date. A query inside the loop could work for a single case and fail when a data load invokes the trigger for many. A scalable design gathers all parent IDs, queries the parents once, calculates changes in memory, and updates a collection. When the data set is large, consider selective filters, relationship queries, and asynchronous patterns only when their different transaction timing meets the business requirement.
In an exam scenario, translate “bulk” into a concrete check: can this design process 200 trigger records without one database operation per record? Then inspect CPU, heap, returned rows, and recursion as well as SOQL and DML counts.
Extra concept: limits are a design signal
If a design approaches a governor limit, first ask whether it is doing redundant work, querying unnecessary records, repeatedly serializing large data, or starting too many jobs. Moving logic to asynchronous Apex can provide a separate transaction and different limits, but it changes when users see the result and how failures are reported. Asynchronous execution is a solution to a timing or workload problem, not a general “more limits” switch.
Salesforce documentation evolves by release and API version. The current exam guide identifies its baseline release; current platform behavior can differ for code saved at later API versions. If a scenario gives an API version, treat version-specific behavior as part of the facts.
Key takeaways
- Multitenancy explains why Apex transactions must use shared resources efficiently.
- MVC and separation of concerns make business logic, user experience, and data operations easier to change and test.
- Bulk-safe collection processing is central to respecting governor limits; asynchronous work changes transaction timing and behavior.
- Official references:
- Salesforce Certified Platform Developer Exam Guide: https://help.salesforce.com/s/articleView?id=005298965&language=en_US&type=1
- Apex transactions and governor limits: https://developer.salesforce.com/docs/platform/apex-dev/references/apex-dev/apex-limits-intro.html
- Execution governors and limits: https://developer.salesforce.com/docs/platform/apex-dev/references/apex-dev/apex-gov-limits.html
- Running Apex within limits: https://developer.salesforce.com/docs/platform/apex-dev/references/apex-dev/apex-limits-tips.html
