Execution context logic versus application logic concerns

In this section, we will review the needs/concerns of the execution context and how each can lead to a common requirement of the application business logic. This helps define the guidelines around writing the application business logic, thus making it logical and more reusable throughout the platform and application:

  • Error handling: When it comes to communicating errors, traditionally, a developer has two options: let the error be caught by the execution context or catch the exception to display it in some form. In the Visualforce Apex Controller context, it's typical to catch exceptions and route these through the ApexPage.addMessage method to display messages to the user via the ...

Get Salesforce Lightning Platform Enterprise Architecture - Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.