/force-di-demo

Demo packages using force-di

Primary LanguageApex

Force-DI Demo Application

This sample shipping app was developed for the Dreamforce 2018 session Understanding the Value of Dependency Injection in the Lightning Platform presented by Andy Fawcett and Doug Ayers.

Getting Started

  1. Clone this project to your local machine
git clone https://github.com/afawcett/force-di-demo.git
cd force-di-demo
  1. Create a new scratch org
sfdx force:org:create -a force-di-demo -s -f config/project-scratch-def.json
  1. Install the force-di unlocked package
sfdx force:package:install -u force-di-demo --package force-di@0.1.0-5 --wait 10
  1. Push the demo app's source
sfdx force:source:push
  1. Assign the ShippingApp permission set
sfdx force:user:permset:assign --permsetname ShippingApp
  1. Test out the application: log in and create a new shipment record
sfdx force:org:open --path "//lightning/o/Shipment/list"
  1. Inject different implementations by editing the Binding custom metadata types

For example, to change the tracking number component shown on the Shipment record page, edit the binding custom metadata record with name ShipmentTracking from c:expressShipTracking to c:happyShipCoTracking.