Apex Enterprise Patterns (FFLIB)

•
9
•

Implements scalable Salesforce architecture using Apex Enterprise Patterns including Selector, Domain, Service, and Unit of Work layers.

This skill provides expert guidance and implementation patterns for Salesforce Apex Enterprise Patterns (AEP), commonly known as the FFLIB framework. It facilitates the creation of robust, testable, and maintainable Salesforce applications by enforcing a strict separation of concerns through four core layers: Selectors for SOQL, Domains for business logic, Services for process orchestration, and Unit of Work for atomic DML operations. It is specifically designed for enterprise-scale projects where complex trigger logic and scattered queries need to be centralized and standardized to ensure long-term stability and code quality.

主な機能

01Standardized implementation of Selector, Domain, Service, and Unit of Work layers
02Service-level orchestration for complex cross-object business processes
039 GitHub stars
04Business logic encapsulation within record-specific Domain classes to replace complex triggers
05Centralized SOQL management within dedicated Selector classes
06Atomic DML handling using the Unit of Work pattern to ensure data integrity

ユースケース

01Implementing the FFLIB framework to enable advanced mocking and unit testing strategies
02Architecting new large-scale Salesforce applications requiring high testability and scalability
03Refactoring monolithic triggers into maintainable Domain classes for better readability