Common Salesforce architectural trade-offs
As you implement a solution programmatically in Salesforce, you will be faced with a number of choices that will impact the performance – real, perceived, and possible – of your application. In this section, we will cover four of the most common architectural trade-offs that you may encounter when deciding how to structure your code-based solution.
Synchronous versus asynchronous
As we discussed in the second section of this book, there are a number of asynchronous programming options available to us on the Salesforce platform for a variety of use cases. When designing a solution in Apex, you will sometimes need to determine whether you should move toward using an asynchronous processing option instead of attempting to run the process synchronously.
We have already covered in Chapters 7 to 10 some of the different use cases and options available. However, to reiterate, working in an asynchronous context will allow you...