SoC and the Apex Common Library Tutorial Series Part 6: The fflib_SObjectUnitOfWork Class
| |

SoC and the Apex Common Library Tutorial Series Part 6: The fflib_SObjectUnitOfWork Class

What is the fflib_SObjectUnitOfWork class? It is a foundation built to allow you to leverage the unit of work design pattern from within Salesforce. Basically this class is designed to hold your database operations (insert, update, etc) in memory until you are ready to do all of your database transactions in one big transaction. It…

SoC and the Apex Common Library Tutorial Series Part 5: The Unit of Work Pattern
| |

SoC and the Apex Common Library Tutorial Series Part 5: The Unit of Work Pattern

What is the Unit of Work Pattern (UOW) A Unit of Work, “Maintains a list of objects affected by a business transaction and coordinates the writing out of changes and the resolution of concurrency problems”. The goal of the unit of work pattern is to simplify DML in your code and only commit changes to…

SoC and the Apex Common Library Tutorial Series Part 4: The fflib_Application Class
| |

SoC and the Apex Common Library Tutorial Series Part 4: The fflib_Application Class

What is the fflib_Application class? Quality question… I mean honestly wtf is this thing? Lol, sorry, let’s figure it out together. The fflib_Application class is around for two primary purposes. The first is to allow you an extremely abstract way of creating new instances of your unit of work, service layer, domain layer and selector…

SoC and the Apex Common Library Tutorial Series Part 2: Introduction to the Apex Common Library
| |

SoC and the Apex Common Library Tutorial Series Part 2: Introduction to the Apex Common Library

What is the Apex Common Library? The Apex Common Library is an open source library originally created by Andy Fawcett when he was the CTO of FinancialForce and currently upkept by many community members, but most notably John Daniel. Aside from its origins and the fflib_ in the class names, it is no longer linked…