In this chapter, we have taken an in-depth look at how the platform executes the Apex code and the different contexts from which it does so. We have also taken time to understand how key concepts like state and security are managed, in addition to highlighting some Apex governors and their respective scopes.
This has allowed us to observe some common needs from which we have distilled into a Separation of Concerns that we can start to apply as guidelines into layers in our business application code, making the Apex logic more reusable and accessible from different contexts as your application functionality and indeed the platform itself evolves.
As we progress further into practicing Separation of Concerns, the Domain, Service, and Selector layers' patterns will become a further layer of separation within our application business logic. We will continue to define the naming and coding guidelines as we progress through the next three chapters so that it becomes easier to maintain a...