Org Dependent Packages
Packages for the masses
Keir Bowden
https://trailblazer.me/id/bob-buzzard
@bob_buzzard
Overview
Sample Scenario
Demo
Developing packages
Takeaways
More information
Agenda
Salesforce Org Metadata
All objects, automation, code
Hard to untangle
aka Big Ball of Mud
Happy Soup
It Works!
"These systems show unmistakable signs of unregulated
growth, and repeated, expedient repair."
Brian Foote and Joseph Yoder, Big Ball of Mud.
First Generation
Source of truth = Org
All development in Packaging Org
Package uploaded from Org
Teamwork difficult
Second Generation
Source of truth = Version Control
All development in scratch orgs
Package uploaded from local filesystem
SFDX teamwork
More Details - sforce.co/2NgzEfw
Second Generation, Unlocked, Org-Dependent
First Generation - Unmanaged
Fire and forget
Cannot upgrade
Change code locally
Second Generation - Unlocked
Can upgrade
Change code locally
Move components in and out of package
Second Generation, Unlocked, Org-Dependent
Unlocked/Unmanaged (and managed)
Logically complete
All dependencies satisfied on package upload
Can install into any org
Org-Dependent
Logically incomplete
Dependencies satisfied on package install
Only install into orgs containing dependencies
Generally Available Spring 21!
Second Generation, Unlocked, Org-Dependent
Build on top of happy soup
Standalone Packages
Org
"Happy Soup"
Non-dependent
Package
Package installs with/without Happy Soup
Happy Soup refers to Package
Package is independent of orgs
May be installed in many orgs
Org-Dependent Packages
Org
"Happy Soup"
Package Refers to Happy Soup
Happy Soup refers to package
Package only installs with Happy Soup
Will fail if dependencies not met
Non-dependent
Package
Package "reaches in" -
Nest Lightning Web Components
Access Apex classes
Add to existing sObjects
Dependency is one way
Org cannot access package if not installed
Org-dependent
Bookstore System
All stores -
Books
Authors
Publishers
Some stores -
Readings
Sample Scenario
Sample Scenario - Lightning App Builder Page
Search Criteria
Matching Books Matching Readings
LMS
Book Search Page
Sample Scenario - Objects
Reading
Book
Author
Sample Scenario - Apex
Setup Sample Data Setup Sample Data
Demo
Setup
Push Happy Soup Reset Source Tracking Push Package Code Develop Package Code
Create Scratch Org
Happy Soup
(Push Once, Do Not Change)
Package Code
Happy Soup
Version Control
Package
Version Control
Changes here End up here!
or Create Sandbox
Scratch Org
Development
Create Package
Test Package
Version
Develop Package
Create Package
Version
Install Package
Version in Sandbox
Tests
Pass ?
Promote Package
Version
Install in
Production
No
Yes
Learn the Salesforce CLI
Allow extra time
Develop -> Create Package -> Test -> Debug cycle
Develop package and happy soup separately
Resist changing installed package
Monitor your package source
Use .forceignore!
Takeaways
Developer Guide sforce.co/3qxr5vm
Sample Org Repo bobbuzz.me.uk/LC2021MAIN
Sample Package Repo bobbuzz.me.uk/LC2021PKG
Unlocked Packages Trailhead Module sforce.co/3rTUuR2
More Information
Thank You
Keir Bowden
https://trailblazer.me/id/bob-buzzard
@bob_buzzard
Questions?
Keir Bowden
https://trailblazer.me/id/bob-buzzard
@bob_buzzard

Londons Calling 2021