Making a mess of code
The last two anti-patterns of the chapter are focused on two anti-patterns that happen in code. While these aren’t the most common in the Salesforce world, we as architects should still be aware that our code-based solutions must adhere to good practice or fall into common anti-patterns.
God class
Example
ShoeCo, a maker of some of the world’s most popular sneaker brands, has a complex, multi-cloud Salesforce org that it uses to run key parts of its business. As it has many custom requirements as well as a substantial amount of legacy on the platform, it has a large number of Apex classes to handle both business logic and integrations.
It has recently started to make the switch to flows, and in practice, most functionality is a combination of code and declarative functionality. Over time, ShoeCo would like to simplify its Salesforce...