A comprehensive Apex library implementing enterprise patterns like Service Layer, Domain, Selector, and Unit of Work for Salesforce development.
FFLib Apex Common is an open-source Apex library that implements enterprise application patterns like Service Layer, Domain, Selector, and Unit of Work for Salesforce development. It provides a structured framework to build scalable, maintainable, and testable Apex code by separating concerns and managing platform resources efficiently.
Salesforce developers and architects building complex, enterprise-grade applications on the Force.com platform who need a standardized approach to application architecture.
Developers choose FFLib Apex Common because it offers a battle-tested, community-driven implementation of enterprise patterns specifically tailored for Salesforce's governor limits and security model, reducing boilerplate code and improving code quality.
Common Apex Library supporting Apex Enterprise Patterns and much more!
Implements Service, Domain, Selector, and Unit of Work layers specifically adapted for Salesforce, ensuring clear separation of concerns as outlined in the documentation.
The Unit of Work class optimizes DML operations, and Selectors centralize SOQL queries with security stripping, reducing governor limit consumption.
Supports native USER_MODE and SYSTEM_MODE for CRUD/FLS and sharing, with recent updates providing performance benefits and clearer intent over sharing declarations.
Dependency injection via Application Factory and integration with ApexMocks allows for comprehensive unit testing and mocking of business logic layers.
Significant updates like the April 2021 domain split and December 2022 deprecations require code migrations, as highlighted in the README's 'IMPORTANT CHANGE' sections.
Requires deploying the ApexMocks dependency first and a deep understanding of the patterns, which can slow down project kickoffs.
Core guidance is spread across external blog posts and articles, rather than a centralized, up-to-date documentation site.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.