D'fflib
WHY

Business benefits

D'fflib unlocks scalable and maintainable applications which can significantly reduce your delivery overhead.

Highlights & takeaways

D'fflib is a free, easy-to-install, community-driven framework
that enables organisations to build scalable and maintainable Salesforce code.
Leading to reduction of delivery overhead, time-to-market and maintenance costs.
It extends the proven 'fflib' framework, focusing to enable developers.
Significantly extending the framework, improving the performance and simplifying adoption and application.

Despite having the best developers on your team, it will always remain a challenge to refactor and debug logic that was written by someone else some time ago. This is a known challenge for the stability of your applications, and can negatively impact the delivery velocity, throughput time and increase costs. fflib is a proven coding framework that guides developers to structure their code in a way that is easier to understand, maintain, and extend over time. Thanks to this structure, new team members can quickly get up to speed, and existing team members can work more efficiently. D'fflib is a significantly enriched version of the original fflib and not only applies the theory but also focuses on relaxing and enabling the developers, reducing the time to learn, adopt and apply the framework.

Main benefits

Reduced delivery overhead

With a well-defined structure, developers can quickly understand existing codebases and implement new features. This modular and structured setup helps to reduce time for debugging and onboarding new team members, which results in shorter development cycles and quicker time-to-market for new functionalities.

Reduced time to delivery

Both by the improved maintainability and scalability of the code, the acceleration by preventing the need to re-invent the wheel with some pre-setup and tested frameworks, and also by the significant reduction of unit test runtime which runs on deployments.

Reduced maintenance costs

fflib helps to minimise technical debt by guiding developers to apply best-practices and eliminate the need for writing duplicate and repetitive code. This leads to cleaner, more efficient code that automatically applies industry standards like security enforcement and exception handling.

AI-enabler for fewer tokens and more accurate responses

A well-structured and consistently organised codebase directly benefits AI-assisted development. AI tools need less context to understand your code, reducing token usage and costs. Combined with D'fflib's full documentation and a set of ready-to-apply AI skills, AI tools can provide faster, more accurate and thus cheaper responses. → Check FAQ for coding framework relevancy in AI era

Fit-for-the-future

Structuring your codebase with the patterns shipped with (D')fflib, ensures your code is scalable, modular and maintainable. Code is structured in smaller, bulkified and reusable services, preparing for easier extension and re-use for emerging technologies, like Headless CRM and MCPs. Note: (D')fflib provides the structure, which still needs to be applied and respected by developers for success.

Distinction between D'fflib vs. fflib

  • fflib (apex-common) is the proven open-source framework launched by Andrew Fawcett around 2014 from FinancialForce. Focusing to enable the theoretical implementation of Apex Enterprise Design Patterns in Salesforce development.
  • D'fflib is a significantly enriched extension on top of fflib, which focuses on truly enabling developers in their development and the onboarding and utilisation of this framework.

Most of the benefits shared above are applicable to both fflib and D'fflib and we would always recommend to at least apply fflib. To further unlock the potential and support your developers we believe D'fflib can help ease their work even more, while leveraging some serious performance improvements for your end-users. Hence, below you find some links and numbers to help understand the differences.

Benefits of D'fflib

  • Focused on enabling developers, an extended framework, tailored to reduce lines of (repetitive) code
  • Enabling developers with all latest Salesforce feature
  • Significant performance improvements (for your end-users)
  • Simplified and standardised usage, flattening learning and adoption curve
  • Resolving several known fflib challenges
  • Simple install and upgrade via (unlocked) package link
  • Only one package to maintain, reducing technical debt and dependencies

→ Click to see all benefits.

Maintained and supported by an active community

  • D'fflib provides full documentation (for both fflib and D'fflib) on edge cases or basic steps
  • D'fflib provides AI-skills to enable developers and their agents
  • The active community ensures continuity in improvements, like adopting the latest Salesforce features
  • With the unlocked package urls newer versions can be swiftly installed or upgraded

→ Click to read more about available support.

Developer accelerators

D'fflib comes with multiple shortcuts, accelerators and built-in frameworks to fully support your developers, without the need to repetitively duplicate code or custom-build a framework to support common functionalities.

→ Click to read more about our accelerators, shortcuts and built-in frameworks.

14x faster database interactions

  • Using D'fflib makes each database interaction ~14x faster than the original fflib.
  • Both frameworks guarantee proper error handling and transaction management ensuring data integrity. Without the need for a developer to consciously repeat its code, as it's automatically applied.
  • Both frameworks enable bulkified database interactions, eliminating overhead and risk of hitting governor limits.

+10-20% reduction of Unit Test Runtime (50-70%)

  • A proper fflib implementation can reduce your full Unit Test runtime by 40-50%.
  • D'fflib even unlocks an additional 10-20%, due to framework enrichments.

This is realised by 'mocking' methods during unit tests, avoiding unnecessary executions and only validating the single-responsibility of the method being tested.

Implementation efforts

Efforts might vary per organisation depending on the current codebase, team experience, and project complexity.

Install (5 min) or upgrade (1 day)
D'fflib comes with an easy unlocked package install-link, which allows you to install within a couple minutes. Additionally, D'fflib is fully backward compatible with the original fflib (apex-common) framework, allowing for an easy upgrade path within approx. one day. An upgrade from a previous D'fflib version is feasible within minutes.

Training
This completely depends on the experience of your developers with layered architectures and/or other frameworks. The proper adoption of fflib requires the understanding of some more abstract concepts and therefore it's recommended to have some senior developers trained, to allow them to guide others (this is possible given the possible phased roll-out and application of the framework). In addition to this extensive documentation website, we also provide training sessions (4 hours to 2 days, depending on demand).

Phased roll-out (weeks to months)
Depending on your current codebase there are different strategies to roll-out fflib.

  1. Foundational: Move low-increment changes to fflib first, having the structure set up and first files created
  2. New development: Apply fflib only on new development work, gradually increasing the coverage
  3. Full refactor: Move all existing code to fflib in one go

Each strategy has its pros and cons, and the choice depends on your organisation's priorities and resources. In doubt what strategy to apply? Our fflib tailored maturity assessment can help to understand your status quo, and provide concrete actions including their potential (business) benefits.

Frequently asked (business) questions

For questions on how D'fflib makes code more reusable, or what 'dependency' there is to Deloitte, → visit the FAQ page (as we'd like things centralised).


Except for the listed items, the content on this site is licensed under CC-BY-NC-4.0
and allows sharing, provided an appropriate credit and link to source.

On this page