# apex-enterprise-patterns/fflib-apex-common

Common Apex Library supporting Apex Enterprise Patterns and much more!

Repository: https://github.com/apex-enterprise-patterns/fflib-apex-common
Canonical: https://ross.abutalabs.com/products/fflib-apex-common
Language: Apex
License: BSD-3-Clause
License Family: permissive
Last push: 2026-08-29T06:48:28+00:00

## Health v2 (maintenance only)
Score: 77/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 100, release rhythm 35, longevity 100
- inputs: {"age_days": 4754, "days_push": 4, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1011, forks 569 (observed 2026-09-01T02:13:58.857767+00:00)

## What it is
A common Apex library for Salesforce implementing Apex Enterprise Patterns such as Service Layer, Unit of Work, and Data Mapper. It helps structure enterprise Salesforce code with better separation of concerns and best practices.

## Use cases
- apply enterprise design patterns in Salesforce Apex code
- implement service layer and unit of work on Force.com
- manage DML governor limits with separation of concerns
- structure a large Salesforce codebase with best practices
- build testable Apex applications with ApexMocks
- learn Apex Enterprise Patterns from a reference implementation

## When to choose
- You are building a substantial Salesforce application and want proven architectural patterns
- You want better separation of concerns and governed resource management in Apex
- You plan to use ApexMocks for Mockito-style unit testing

## When to avoid
- You are writing small, simple Salesforce scripts or triggers where patterns add overhead
- You are not developing on the Salesforce platform

## Facets
- artifact type: library
- maturity: active
- function: testing, mocking, developer-tools
- domain: developer-tools, testing
- platform: cloud
- tags: salesforce, apex, enterprise-patterns, design-patterns, unit-of-work, service-layer, force-com, automation

## Member repositories
- apex-enterprise-patterns/fflib-apex-common (main) score 77

## Provenance
- Observed fields: from GitHub, fetched 2026-09-01T02:13:58.857767+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T07:12:01.513724+00:00, confidence not recorded.
  - readme: https://github.com/apex-enterprise-patterns/fflib-apex-common (fetched 2026-09-01T02:13:58.857767+00:00, sha 70fe4d43a580)
- Data as of 2026-08-30T08:39:29.467469+00:00.
