Skip to content
Generic DI library with support for Apex, Triggers, Visualforce and Lightning
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
config
force-app-1 removed references that don't work in an enterprise scratch org Feb 11, 2019
force-app-2/main moving some files around Dec 10, 2018
force-app-3/main
force-di-trigger-demo/main/classes
force-di the key name should be based on a hash so as to ensure Feb 25, 2019
.execanon
.forceignore
.gitignore
LICENSE
README.md
sfdx-project.json

README.md

Force DI

Generic dependency injection (DI) library with support for injecting Apex, Visualforce, Lightning, and Flows at runtime.

Documentation

Project Folders

Force DI Example

Folder Description
force-di Core library, contains Injector Apex API and <c:di_injector> VF and Lightning Components
force-app-1 Sample application using the API and Components to inject Apex, VF and Lightning at runtime
force-app-2 Sample package providing impls for various bindings above
force-app-3 Sample package providing impls for various bindings above
force-di-trigger-demo Sample basic trigger framework leveraging the API

Install latest version via a Salesforce DX Package

You have two options you can install via your web browser here or you can install via the Salesforce DX CLI as shown below.

sfdx plugins:install shane-sfdx-plugins
sfdx shane:github:package:install -g afawcett -r force-di

Other Resources on Dependency Injection Design Pattern

Some of these blogs and videos are not necessarily Salesforce-specific but give good insights on use cases and purpose behind this design pattern.

Videos

Blogs

You can’t perform that action at this time.