In this fifth episode of this tutorial series covering Separation of Concerns and the Apex Commons Library, I'm going to explain what the unit of work pattern is, why you would use it and how it fits into the apex common library and SoC.
Separation of Concerns Tutorial Series Order (Subject to Change):
Episode 1 - The Basics of Separation of Concerns
Episode 2 - Introduction to the Apex Common Library
Episode 3 - The Factory Pattern
Episode 4 - The fflib_Application Class
Episode 5 - The Unit of Work Pattern
Episode 6 - The fflib_SObjectUnitOfWork Class
Episode 7 - The Service Layer
Episode 8 - Implementing the Service Layer with the Apex Common Library
Episode 9 - The Template Method Pattern
Episode 10 - The Domain Layer
Episode 11 - Implementing the Domain Layer with the Apex Common Library
Episode 12 - The Builder Pattern
Episode 13 - The Selector Layer
Episode 14 - Implementing the Selector Layer with the Apex Common Library
Episode 15 - The Difference Between Unit Tests and Integration Tests
Episode 16 - Unit Testing and Separation of Concerns
Episode 17 - Implementing Unit Testing with Apex Mocks
0:00 - Intro
1:17 - Why use the Unit of Work Pattern?
5:27 - Unit of Work Pattern Examples
16:56 - Outro
DISCLAIMER: The views and ideas expressed on this YouTube channel and blog are based on past development experiences and may not always work for your particular scenarios. The advice in these videos may also become outdated as technology advances. They should be used as examples for educational purposes only. Using any shown solutions in your own org is not advisable since they are example scenarios.