With Unit Of Work

Before we take a closer look at how the FinancialForce Apex Enterprise Pattern library has helped us implement this pattern, let's first take a look at the following revised example of the code shown earlier. This code utilizes a new Apex class called Application. This class exposes a static property and method to create an instance of a Unit Of Work.

The source code for this chapter includes the FinancialForce Apex Enterprise Pattern library, as well as the FinancialForce Apex Mocks library it depends on. We will explore the Apex Mocks library in a later chapter, where we will focus on writing unit tests for each of the patterns introduced in this book.

The fflib_ISObjectUnitOfWork Apex Interface is used to expose the features ...

Get Salesforce Lightning Platform Enterprise Architecture - Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.