-
Notifications
You must be signed in to change notification settings - Fork 19
Home
This wiki hopes to simplify the concept of Separation of Concerns in Salesforce and leveraging the Apex Common Library to implement it. While this wiki hopes to make this easier, if you finish everything here and want even more information about this topic I would suggest reading Andy Fawcett's Salesforce Lightning Platform Enterprise Architecture Book. Specifically pages 159-268 for Separation of Concerns and how to use Apex Commons to implement it and pages 477-520 for information on Unit Testing and Apex Mocks. It's a lot harder to consume (in my opinion) than the wiki below, but it is loaded with valuable information. It's how I learned most of what I'm presenting to you in the repo.
If you enjoy this wiki and would like to say thank you, feel free to send a donation here! But no pressure, I really just do this for fun!
- Introduction to the Separation of Concerns Design Principle
- Introduction to the Apex Common Library
- The Factory Pattern
- The fflib_Application Class
- The Unit of Work Pattern
- The fflib_SObjectUnitOfWork Class
- The Service Layer
- Implementing the Service Layer with the Apex Common Library
- The Template Method Pattern
- The Domain Layer
- Implementing the Domain Layer with the Apex Common Library
- The Builder Pattern
- The Selector Layer
- Implementing the Selector Layer with the Apex Common Library
- The Difference Between Unit Tests and Integration Tests
- Unit Testing and Separation of Concerns
- Implementing Unit Testing with Apex Mocks
If you believe there is any information missing from this guide or that it needs more info in certain places, please submit an issue on this repo here and I'll add it ASAP!