SlideShare a Scribd company logo
1 of 41
Download to read offline
Packaging - It's not just for ISVs
Keir Bowden
https://trailblazer.me/id/bob-buzzard
@bob_buzzard
CTO at BrightGen
11 time MVP
Certified Technical Architect
> 10 years package development experience - SI + ISV
About Me
Packages
1st and 2nd Generation
Ancestry and Branching
Choose your Plan
Agenda
Packages
A collection of metadata components
Treated as a single unit
Install in one atomic operation
Everything goes in, or nothing does
Remove in one atomic operation
After removing local references
… Deletes data for packaged objects
What is a package
Distribution
Internal
Selected customers
Entire world
Promotes modular development
Isolated functionality
Independent release cadence
Communication through well-defined interfaces
Identifiable
Components from packages are marked with an icon
Why Packages?
1st and 2nd Generation Packaging
Terminology
Packaging Org (1st)
Developer Edition for First Generation package development
Namespace
Prefix applied to all metadata
Package version
Snapshot of the components at a point in time
Immutable
Subscriber Org
Org where package has been installed
Dev Hub (2nd)
Salesforce DX Developer Hub
Create and manage second generation packages
Create and manage scratch orgs
Unpackaged Metadata
Metadata required during package develop/test
Not included in final package
Beta version
Unreleased version of a package
May never be released
Install only in scratch, developer or sandbox orgs
Promote to release if testing successful
Terminology
Comparison
Source of Truth
First Gen Second Gen
Packaging Org Version Control
SFDX/CLI
Optional/Basic Mandatory/Integrated
Team Development
Challenging Straightforward
Create Version
Packaging Org UI Filesystem + CLI
Namespace
Single Package Multiple Packages
Ancestry
Linear Flexible
Unpackaged Metadata
Mixed in org Declarative
Namespace defined in Packaging Org
Unique to each package
Restricted to this one org
Expose code through global keyword
Blunt instrument
Code available to everyone
• Subscriber Org
• Any other packages installed in that org
Namespace - 1st Gen
Defined in developer edition
Registered in Dev Hub
Available for multiple packages
Potential for namespace collisions
E.g. BOOKSTORE__Book__c in two packages
Expose code through global keyword
Namespace - 2nd Gen
And @namespaceAccessible annotation
@namespaceAccessible
Package COREPKG Package SALESPKG
Explicitly grant access to each member
Class
Method
Property
Interface
Can add or remove at any time - may break code
Cannot mix with @AuraEnabled
Creates dependency
SALESPKG requires COREPKG to be installed
@namespaceAccessible Annotation
Ancestry and Branching
V1.0.0
Ancestry - 1st Gen
Patch Version
V2.0.0 V2.1.0 V2.2.0
V2.1.1
Define previous version (ancestorVersion)
Optional
Ancestry - 2nd Gen
1.25.0 can extend 1.24.0 released version
And any ancestors of 1.24.0
"Use the ancestor that’s the immediate parent of the version you’re creating"
SalesforceDXDeveloper Guide, https://sforce.co/3jUdxZH
Ancestry - 2nd Gen
V1.0.0 V2.0.0 V2.1.0 V2.2.0
V3.0.0 V3.1.0
V4.0.0 V4.1.0
ancestorVersion1.0.0 ancestorVersion2.0.0 ancestorVersion2.1.0
ancestorVersion2.0.0 ancestorVersion3.0.0
No ancestorVersion ancestorVersion4.0.0
Parallel development streams, like version control
Multiple beta versions with the same number
Only one can be promoted to released
Use --branch <name> switch when creating version
Branching
Branching
2.0.0
2.0.0.
1
2.1.0.
1
2.1.0.
2
2.1.0.
1
2.1.0.
2
2.1.0
Version Control
Merge
Feature Branch
AuthorReading
Feature Branch
OrderApprovals
Feature Branch
LoyaltyCard
Choose Your Plan
FirstGeneration SecondGeneration
Managed
Unmanaged Unlocked Managed Org
Dependent
1st Gen Unmanaged
Features
No namespace
Code visible/editable
Not upgradeable
When to use
Never!
1st Gen Managed
Features
Namespaced
Code obfuscated
Upgradeable
When to use
List on app exchange
Features missing in 2GP
2nd Gen Managed
Features
Namespaced
Code obfuscated
Upgradeable
When to use
List on app exchange
Extend 1GP
ISV
Tightly controlled apps
2nd Gen Unlocked
Features
Optional Namespace
Code visible/editable
Upgradeable
Downgradeable
Migrate metadata
Example - revert 1.33 version of package to 1.25
Downgrade Package
Metadata is :
Modified (Apex classes reverted to 1.25)
Deprecated (Custom objects not present in 1.25)
Deleted (Report not present in 1.25)
Fails if local code depends on 1.33 code
Move metadata in/out of package
Release metadata from package into org
Claim metadata from org in to package
Collaboration required
Cannot use namespaces
Package and org must be logically complete
No demo, just screenshots (sorry)
Migrate Metadata
Migrate Metadata
Migrate Metadata
Migrate Metadata
Migrate Metadata
Migrate Metadata
Migrate Metadata
2nd Gen Unlocked
When to Use
System Integrator
Enterprise Customer
Newer Org
Entire Application New
Distribute Open Source
2nd Generation Org Dependent Unlocked
Features
No Namespace
Code visible/editable
Upgradeable
Downgradeable
Migrate metadata
Depend on Org Metadata
Org Dependent
Org Package
Tests run on installation
Faster development
Slower installation
Complicates development process
Dependent metadata must be present during development
Local changes may prevent upgrade - collaboration required
Scratch orgs can be a challenge
Tooling can't tell the difference
Dependent metadata can sneak into package
LIkely to target fewer subscriber orgs
Org Dependent
2nd Generation Org Dependent Unlocked
When to Use
Mature Org
Rely on existing metadata
Extend existing apps
Enterprise Customer
Sweet spot for SI
2nd Generation
Flexibility
Managed
Unlocked
Org-Dependent
Developer
Collaboration
Control
Official Docs
Managed : sforce.co/398qygi
Unlocked : sforce.co/3NuNBk9
Trailhead :
Managed Module : sforce.co/3GUTmFr
Unlocked Trail : sforce.co/38W51qQ
2nd Gen Launch FAQs - historic interest
Developer Controlled : bit.ly/3MsZV2W
Unlocked : bit.ly/3O1ZWMO
Trailblazer groups :
Unlocked : sforce.co/3xo6jEC
London's Calling 21 Org Dependent Packages
youtu.be/XzUWr6gV9zk
More Information - 2nd Generation Only!
Thank You
Keir Bowden
https://trailblazer.me/id/bob-buzzard
@bob_buzzard

More Related Content

Similar to LC 2022 - Second Generation Packaging

Future of Installation Packaging
Future of Installation PackagingFuture of Installation Packaging
Future of Installation PackagingAlexandro Colorado
 
Our move to Salesforce DX and Unlocked Packages
Our move to Salesforce DX and Unlocked PackagesOur move to Salesforce DX and Unlocked Packages
Our move to Salesforce DX and Unlocked PackagesFabien Taillon
 
OpenTuesday: Agile Testautomatisierung und Continuous Integration
OpenTuesday: Agile Testautomatisierung und Continuous IntegrationOpenTuesday: Agile Testautomatisierung und Continuous Integration
OpenTuesday: Agile Testautomatisierung und Continuous IntegrationDigicomp Academy AG
 
A Journey through the JDKs (Java 9 to Java 11)
A Journey through the JDKs (Java 9 to Java 11)A Journey through the JDKs (Java 9 to Java 11)
A Journey through the JDKs (Java 9 to Java 11)Markus Günther
 
ATAGTR2017 Expanding test horizons with Robot Framework
ATAGTR2017 Expanding test horizons with Robot FrameworkATAGTR2017 Expanding test horizons with Robot Framework
ATAGTR2017 Expanding test horizons with Robot FrameworkAgile Testing Alliance
 
Customising Oracle's eBusiness Suite
Customising Oracle's eBusiness SuiteCustomising Oracle's eBusiness Suite
Customising Oracle's eBusiness Suitedrdavidtaylor
 
Maven 2.0 - Improve your build patterns
Maven 2.0 - Improve your build patternsMaven 2.0 - Improve your build patterns
Maven 2.0 - Improve your build patternselliando dias
 
Robin_Informatica
Robin_InformaticaRobin_Informatica
Robin_InformaticaRobin Goyal
 
Operations Support Workflow - Rundeck
Operations Support Workflow - RundeckOperations Support Workflow - Rundeck
Operations Support Workflow - RundeckNeil McCaughley
 
CSE681 – Software Modeling and Analysis Fall 2013 Project .docx
CSE681 – Software Modeling and Analysis Fall 2013 Project .docxCSE681 – Software Modeling and Analysis Fall 2013 Project .docx
CSE681 – Software Modeling and Analysis Fall 2013 Project .docxfaithxdunce63732
 
OWASP Dependency-Track Introduction
OWASP Dependency-Track IntroductionOWASP Dependency-Track Introduction
OWASP Dependency-Track IntroductionSergey Sotnikov
 
Deep Dive Azure Functions - Global Azure Bootcamp 2019
Deep Dive Azure Functions - Global Azure Bootcamp 2019Deep Dive Azure Functions - Global Azure Bootcamp 2019
Deep Dive Azure Functions - Global Azure Bootcamp 2019Andrea Tosato
 
Alm tce parallel development
Alm tce parallel developmentAlm tce parallel development
Alm tce parallel developmentshalom938
 
SFDC Deployments
SFDC DeploymentsSFDC Deployments
SFDC DeploymentsSujit Kumar
 
IntelliJ IDEA Architecture and Performance
IntelliJ IDEA Architecture and PerformanceIntelliJ IDEA Architecture and Performance
IntelliJ IDEA Architecture and Performanceintelliyole
 

Similar to LC 2022 - Second Generation Packaging (20)

Future of Installation Packaging
Future of Installation PackagingFuture of Installation Packaging
Future of Installation Packaging
 
Our move to Salesforce DX and Unlocked Packages
Our move to Salesforce DX and Unlocked PackagesOur move to Salesforce DX and Unlocked Packages
Our move to Salesforce DX and Unlocked Packages
 
OpenTuesday: Agile Testautomatisierung und Continuous Integration
OpenTuesday: Agile Testautomatisierung und Continuous IntegrationOpenTuesday: Agile Testautomatisierung und Continuous Integration
OpenTuesday: Agile Testautomatisierung und Continuous Integration
 
A Journey through the JDKs (Java 9 to Java 11)
A Journey through the JDKs (Java 9 to Java 11)A Journey through the JDKs (Java 9 to Java 11)
A Journey through the JDKs (Java 9 to Java 11)
 
ATAGTR2017 Expanding test horizons with Robot Framework
ATAGTR2017 Expanding test horizons with Robot FrameworkATAGTR2017 Expanding test horizons with Robot Framework
ATAGTR2017 Expanding test horizons with Robot Framework
 
Subversion
SubversionSubversion
Subversion
 
Customising Oracle's eBusiness Suite
Customising Oracle's eBusiness SuiteCustomising Oracle's eBusiness Suite
Customising Oracle's eBusiness Suite
 
Maven 2.0 - Improve your build patterns
Maven 2.0 - Improve your build patternsMaven 2.0 - Improve your build patterns
Maven 2.0 - Improve your build patterns
 
Robin_Informatica
Robin_InformaticaRobin_Informatica
Robin_Informatica
 
Why Drupal is Rockstar?
Why Drupal is Rockstar?Why Drupal is Rockstar?
Why Drupal is Rockstar?
 
Operations Support Workflow - Rundeck
Operations Support Workflow - RundeckOperations Support Workflow - Rundeck
Operations Support Workflow - Rundeck
 
CSE681 – Software Modeling and Analysis Fall 2013 Project .docx
CSE681 – Software Modeling and Analysis Fall 2013 Project .docxCSE681 – Software Modeling and Analysis Fall 2013 Project .docx
CSE681 – Software Modeling and Analysis Fall 2013 Project .docx
 
OWASP Dependency-Track Introduction
OWASP Dependency-Track IntroductionOWASP Dependency-Track Introduction
OWASP Dependency-Track Introduction
 
Deep Dive Azure Functions - Global Azure Bootcamp 2019
Deep Dive Azure Functions - Global Azure Bootcamp 2019Deep Dive Azure Functions - Global Azure Bootcamp 2019
Deep Dive Azure Functions - Global Azure Bootcamp 2019
 
kishore_Nokia
kishore_Nokiakishore_Nokia
kishore_Nokia
 
Alm tce parallel development
Alm tce parallel developmentAlm tce parallel development
Alm tce parallel development
 
The path to cdi 2.0
The path to cdi 2.0The path to cdi 2.0
The path to cdi 2.0
 
Composer
ComposerComposer
Composer
 
SFDC Deployments
SFDC DeploymentsSFDC Deployments
SFDC Deployments
 
IntelliJ IDEA Architecture and Performance
IntelliJ IDEA Architecture and PerformanceIntelliJ IDEA Architecture and Performance
IntelliJ IDEA Architecture and Performance
 

More from Keir Bowden

Mutation Testing.pdf
Mutation Testing.pdfMutation Testing.pdf
Mutation Testing.pdfKeir Bowden
 
London Non-Profit Spring 22 Salesforce Release
London Non-Profit Spring 22 Salesforce ReleaseLondon Non-Profit Spring 22 Salesforce Release
London Non-Profit Spring 22 Salesforce ReleaseKeir Bowden
 
London Salesforce Developer January 2022
London Salesforce Developer January 2022London Salesforce Developer January 2022
London Salesforce Developer January 2022Keir Bowden
 
Winter 22 for Developers
Winter 22 for DevelopersWinter 22 for Developers
Winter 22 for DevelopersKeir Bowden
 
Londons Calling 2021
Londons Calling 2021Londons Calling 2021
Londons Calling 2021Keir Bowden
 
London Salesforce Developers TDX 20 Global Gathering
London Salesforce Developers TDX 20 Global GatheringLondon Salesforce Developers TDX 20 Global Gathering
London Salesforce Developers TDX 20 Global GatheringKeir Bowden
 
Helsinki developer group march 2020
Helsinki developer group march 2020Helsinki developer group march 2020
Helsinki developer group march 2020Keir Bowden
 
London's calling 2020 Documentor Plug-In
London's calling 2020 Documentor Plug-InLondon's calling 2020 Documentor Plug-In
London's calling 2020 Documentor Plug-InKeir Bowden
 
Lightning User Interface Testing with Selenium and Node JS
Lightning User Interface Testing with Selenium and Node JSLightning User Interface Testing with Selenium and Node JS
Lightning User Interface Testing with Selenium and Node JSKeir Bowden
 
Salesforce CLI Cheat Sheet
Salesforce CLI Cheat Sheet Salesforce CLI Cheat Sheet
Salesforce CLI Cheat Sheet Keir Bowden
 
Salesforce Spring 19 release top 10 Features
Salesforce Spring 19 release top 10 FeaturesSalesforce Spring 19 release top 10 Features
Salesforce Spring 19 release top 10 FeaturesKeir Bowden
 
UI Testing with Selenium and Node - London's Calling 2019
UI Testing with Selenium and Node - London's Calling 2019UI Testing with Selenium and Node - London's Calling 2019
UI Testing with Selenium and Node - London's Calling 2019Keir Bowden
 
Salesforce Winter 19 release top 10 features
Salesforce Winter 19 release top 10 featuresSalesforce Winter 19 release top 10 features
Salesforce Winter 19 release top 10 featuresKeir Bowden
 
Quickstart Templates with the Salesforce CLI
Quickstart Templates with the Salesforce CLIQuickstart Templates with the Salesforce CLI
Quickstart Templates with the Salesforce CLIKeir Bowden
 
TrailheaDX Global Gathering London 2018
TrailheaDX Global Gathering London 2018TrailheaDX Global Gathering London 2018
TrailheaDX Global Gathering London 2018Keir Bowden
 
Getting started with public speaking
Getting started with public speakingGetting started with public speaking
Getting started with public speakingKeir Bowden
 
London's Calling 2018 - No Connection, No Problem
London's Calling 2018 - No Connection, No ProblemLondon's Calling 2018 - No Connection, No Problem
London's Calling 2018 - No Connection, No ProblemKeir Bowden
 
No Connection? No Problem!
No Connection? No Problem!No Connection? No Problem!
No Connection? No Problem!Keir Bowden
 
Unit Testing Lightning Components with Jasmine
Unit Testing Lightning Components with JasmineUnit Testing Lightning Components with Jasmine
Unit Testing Lightning Components with JasmineKeir Bowden
 

More from Keir Bowden (20)

Mutation Testing.pdf
Mutation Testing.pdfMutation Testing.pdf
Mutation Testing.pdf
 
London Non-Profit Spring 22 Salesforce Release
London Non-Profit Spring 22 Salesforce ReleaseLondon Non-Profit Spring 22 Salesforce Release
London Non-Profit Spring 22 Salesforce Release
 
London Salesforce Developer January 2022
London Salesforce Developer January 2022London Salesforce Developer January 2022
London Salesforce Developer January 2022
 
Winter 22 for Developers
Winter 22 for DevelopersWinter 22 for Developers
Winter 22 for Developers
 
Londons Calling 2021
Londons Calling 2021Londons Calling 2021
Londons Calling 2021
 
London Salesforce Developers TDX 20 Global Gathering
London Salesforce Developers TDX 20 Global GatheringLondon Salesforce Developers TDX 20 Global Gathering
London Salesforce Developers TDX 20 Global Gathering
 
Helsinki developer group march 2020
Helsinki developer group march 2020Helsinki developer group march 2020
Helsinki developer group march 2020
 
London's calling 2020 Documentor Plug-In
London's calling 2020 Documentor Plug-InLondon's calling 2020 Documentor Plug-In
London's calling 2020 Documentor Plug-In
 
Lightning User Interface Testing with Selenium and Node JS
Lightning User Interface Testing with Selenium and Node JSLightning User Interface Testing with Selenium and Node JS
Lightning User Interface Testing with Selenium and Node JS
 
Salesforce CLI Cheat Sheet
Salesforce CLI Cheat Sheet Salesforce CLI Cheat Sheet
Salesforce CLI Cheat Sheet
 
Salesforce Spring 19 release top 10 Features
Salesforce Spring 19 release top 10 FeaturesSalesforce Spring 19 release top 10 Features
Salesforce Spring 19 release top 10 Features
 
UI Testing with Selenium and Node - London's Calling 2019
UI Testing with Selenium and Node - London's Calling 2019UI Testing with Selenium and Node - London's Calling 2019
UI Testing with Selenium and Node - London's Calling 2019
 
Salesforce Winter 19 release top 10 features
Salesforce Winter 19 release top 10 featuresSalesforce Winter 19 release top 10 features
Salesforce Winter 19 release top 10 features
 
Quickstart Templates with the Salesforce CLI
Quickstart Templates with the Salesforce CLIQuickstart Templates with the Salesforce CLI
Quickstart Templates with the Salesforce CLI
 
TrailheaDX Global Gathering London 2018
TrailheaDX Global Gathering London 2018TrailheaDX Global Gathering London 2018
TrailheaDX Global Gathering London 2018
 
Getting started with public speaking
Getting started with public speakingGetting started with public speaking
Getting started with public speaking
 
Salesforce CLI
Salesforce CLISalesforce CLI
Salesforce CLI
 
London's Calling 2018 - No Connection, No Problem
London's Calling 2018 - No Connection, No ProblemLondon's Calling 2018 - No Connection, No Problem
London's Calling 2018 - No Connection, No Problem
 
No Connection? No Problem!
No Connection? No Problem!No Connection? No Problem!
No Connection? No Problem!
 
Unit Testing Lightning Components with Jasmine
Unit Testing Lightning Components with JasmineUnit Testing Lightning Components with Jasmine
Unit Testing Lightning Components with Jasmine
 

Recently uploaded

Call Girls South Delhi Delhi reach out to us at ☎ 9711199012
Call Girls South Delhi Delhi reach out to us at ☎ 9711199012Call Girls South Delhi Delhi reach out to us at ☎ 9711199012
Call Girls South Delhi Delhi reach out to us at ☎ 9711199012rehmti665
 
Packaging the Monolith - PHP Tek 2024 (Breaking it down one bite at a time)
Packaging the Monolith - PHP Tek 2024 (Breaking it down one bite at a time)Packaging the Monolith - PHP Tek 2024 (Breaking it down one bite at a time)
Packaging the Monolith - PHP Tek 2024 (Breaking it down one bite at a time)Dana Luther
 
Magic exist by Marta Loveguard - presentation.pptx
Magic exist by Marta Loveguard - presentation.pptxMagic exist by Marta Loveguard - presentation.pptx
Magic exist by Marta Loveguard - presentation.pptxMartaLoveguard
 
Film cover research (1).pptxsdasdasdasdasdasa
Film cover research (1).pptxsdasdasdasdasdasaFilm cover research (1).pptxsdasdasdasdasdasa
Film cover research (1).pptxsdasdasdasdasdasa494f574xmv
 
A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)
A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)
A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)Christopher H Felton
 
定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一
定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一
定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一Fs
 
定制(Management毕业证书)新加坡管理大学毕业证成绩单原版一比一
定制(Management毕业证书)新加坡管理大学毕业证成绩单原版一比一定制(Management毕业证书)新加坡管理大学毕业证成绩单原版一比一
定制(Management毕业证书)新加坡管理大学毕业证成绩单原版一比一Fs
 
Q4-1-Illustrating-Hypothesis-Testing.pptx
Q4-1-Illustrating-Hypothesis-Testing.pptxQ4-1-Illustrating-Hypothesis-Testing.pptx
Q4-1-Illustrating-Hypothesis-Testing.pptxeditsforyah
 
Blepharitis inflammation of eyelid symptoms cause everything included along w...
Blepharitis inflammation of eyelid symptoms cause everything included along w...Blepharitis inflammation of eyelid symptoms cause everything included along w...
Blepharitis inflammation of eyelid symptoms cause everything included along w...Excelmac1
 
『澳洲文凭』买拉筹伯大学毕业证书成绩单办理澳洲LTU文凭学位证书
『澳洲文凭』买拉筹伯大学毕业证书成绩单办理澳洲LTU文凭学位证书『澳洲文凭』买拉筹伯大学毕业证书成绩单办理澳洲LTU文凭学位证书
『澳洲文凭』买拉筹伯大学毕业证书成绩单办理澳洲LTU文凭学位证书rnrncn29
 
Intellectual property rightsand its types.pptx
Intellectual property rightsand its types.pptxIntellectual property rightsand its types.pptx
Intellectual property rightsand its types.pptxBipin Adhikari
 
PHP-based rendering of TYPO3 Documentation
PHP-based rendering of TYPO3 DocumentationPHP-based rendering of TYPO3 Documentation
PHP-based rendering of TYPO3 DocumentationLinaWolf1
 
Git and Github workshop GDSC MLRITM
Git and Github  workshop GDSC MLRITMGit and Github  workshop GDSC MLRITM
Git and Github workshop GDSC MLRITMgdsc13
 
办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书
办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书
办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书zdzoqco
 
办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一
办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一
办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一z xss
 
Call Girls In The Ocean Pearl Retreat Hotel New Delhi 9873777170
Call Girls In The Ocean Pearl Retreat Hotel New Delhi 9873777170Call Girls In The Ocean Pearl Retreat Hotel New Delhi 9873777170
Call Girls In The Ocean Pearl Retreat Hotel New Delhi 9873777170Sonam Pathan
 
Top 10 Interactive Website Design Trends in 2024.pptx
Top 10 Interactive Website Design Trends in 2024.pptxTop 10 Interactive Website Design Trends in 2024.pptx
Top 10 Interactive Website Design Trends in 2024.pptxDyna Gilbert
 
Contact Rya Baby for Call Girls New Delhi
Contact Rya Baby for Call Girls New DelhiContact Rya Baby for Call Girls New Delhi
Contact Rya Baby for Call Girls New Delhimiss dipika
 
SCM Symposium PPT Format Customer loyalty is predi
SCM Symposium PPT Format Customer loyalty is prediSCM Symposium PPT Format Customer loyalty is predi
SCM Symposium PPT Format Customer loyalty is predieusebiomeyer
 

Recently uploaded (20)

Call Girls South Delhi Delhi reach out to us at ☎ 9711199012
Call Girls South Delhi Delhi reach out to us at ☎ 9711199012Call Girls South Delhi Delhi reach out to us at ☎ 9711199012
Call Girls South Delhi Delhi reach out to us at ☎ 9711199012
 
Packaging the Monolith - PHP Tek 2024 (Breaking it down one bite at a time)
Packaging the Monolith - PHP Tek 2024 (Breaking it down one bite at a time)Packaging the Monolith - PHP Tek 2024 (Breaking it down one bite at a time)
Packaging the Monolith - PHP Tek 2024 (Breaking it down one bite at a time)
 
Model Call Girl in Jamuna Vihar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in  Jamuna Vihar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in  Jamuna Vihar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Jamuna Vihar Delhi reach out to us at 🔝9953056974🔝
 
Magic exist by Marta Loveguard - presentation.pptx
Magic exist by Marta Loveguard - presentation.pptxMagic exist by Marta Loveguard - presentation.pptx
Magic exist by Marta Loveguard - presentation.pptx
 
Film cover research (1).pptxsdasdasdasdasdasa
Film cover research (1).pptxsdasdasdasdasdasaFilm cover research (1).pptxsdasdasdasdasdasa
Film cover research (1).pptxsdasdasdasdasdasa
 
A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)
A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)
A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)
 
定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一
定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一
定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一
 
定制(Management毕业证书)新加坡管理大学毕业证成绩单原版一比一
定制(Management毕业证书)新加坡管理大学毕业证成绩单原版一比一定制(Management毕业证书)新加坡管理大学毕业证成绩单原版一比一
定制(Management毕业证书)新加坡管理大学毕业证成绩单原版一比一
 
Q4-1-Illustrating-Hypothesis-Testing.pptx
Q4-1-Illustrating-Hypothesis-Testing.pptxQ4-1-Illustrating-Hypothesis-Testing.pptx
Q4-1-Illustrating-Hypothesis-Testing.pptx
 
Blepharitis inflammation of eyelid symptoms cause everything included along w...
Blepharitis inflammation of eyelid symptoms cause everything included along w...Blepharitis inflammation of eyelid symptoms cause everything included along w...
Blepharitis inflammation of eyelid symptoms cause everything included along w...
 
『澳洲文凭』买拉筹伯大学毕业证书成绩单办理澳洲LTU文凭学位证书
『澳洲文凭』买拉筹伯大学毕业证书成绩单办理澳洲LTU文凭学位证书『澳洲文凭』买拉筹伯大学毕业证书成绩单办理澳洲LTU文凭学位证书
『澳洲文凭』买拉筹伯大学毕业证书成绩单办理澳洲LTU文凭学位证书
 
Intellectual property rightsand its types.pptx
Intellectual property rightsand its types.pptxIntellectual property rightsand its types.pptx
Intellectual property rightsand its types.pptx
 
PHP-based rendering of TYPO3 Documentation
PHP-based rendering of TYPO3 DocumentationPHP-based rendering of TYPO3 Documentation
PHP-based rendering of TYPO3 Documentation
 
Git and Github workshop GDSC MLRITM
Git and Github  workshop GDSC MLRITMGit and Github  workshop GDSC MLRITM
Git and Github workshop GDSC MLRITM
 
办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书
办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书
办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书
 
办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一
办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一
办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一
 
Call Girls In The Ocean Pearl Retreat Hotel New Delhi 9873777170
Call Girls In The Ocean Pearl Retreat Hotel New Delhi 9873777170Call Girls In The Ocean Pearl Retreat Hotel New Delhi 9873777170
Call Girls In The Ocean Pearl Retreat Hotel New Delhi 9873777170
 
Top 10 Interactive Website Design Trends in 2024.pptx
Top 10 Interactive Website Design Trends in 2024.pptxTop 10 Interactive Website Design Trends in 2024.pptx
Top 10 Interactive Website Design Trends in 2024.pptx
 
Contact Rya Baby for Call Girls New Delhi
Contact Rya Baby for Call Girls New DelhiContact Rya Baby for Call Girls New Delhi
Contact Rya Baby for Call Girls New Delhi
 
SCM Symposium PPT Format Customer loyalty is predi
SCM Symposium PPT Format Customer loyalty is prediSCM Symposium PPT Format Customer loyalty is predi
SCM Symposium PPT Format Customer loyalty is predi
 

LC 2022 - Second Generation Packaging

  • 1. Packaging - It's not just for ISVs Keir Bowden https://trailblazer.me/id/bob-buzzard @bob_buzzard
  • 2. CTO at BrightGen 11 time MVP Certified Technical Architect > 10 years package development experience - SI + ISV About Me
  • 3. Packages 1st and 2nd Generation Ancestry and Branching Choose your Plan Agenda
  • 5. A collection of metadata components Treated as a single unit Install in one atomic operation Everything goes in, or nothing does Remove in one atomic operation After removing local references … Deletes data for packaged objects What is a package
  • 6. Distribution Internal Selected customers Entire world Promotes modular development Isolated functionality Independent release cadence Communication through well-defined interfaces Identifiable Components from packages are marked with an icon Why Packages?
  • 7. 1st and 2nd Generation Packaging
  • 8. Terminology Packaging Org (1st) Developer Edition for First Generation package development Namespace Prefix applied to all metadata Package version Snapshot of the components at a point in time Immutable Subscriber Org Org where package has been installed
  • 9. Dev Hub (2nd) Salesforce DX Developer Hub Create and manage second generation packages Create and manage scratch orgs Unpackaged Metadata Metadata required during package develop/test Not included in final package Beta version Unreleased version of a package May never be released Install only in scratch, developer or sandbox orgs Promote to release if testing successful Terminology
  • 10. Comparison Source of Truth First Gen Second Gen Packaging Org Version Control SFDX/CLI Optional/Basic Mandatory/Integrated Team Development Challenging Straightforward Create Version Packaging Org UI Filesystem + CLI Namespace Single Package Multiple Packages Ancestry Linear Flexible Unpackaged Metadata Mixed in org Declarative
  • 11. Namespace defined in Packaging Org Unique to each package Restricted to this one org Expose code through global keyword Blunt instrument Code available to everyone • Subscriber Org • Any other packages installed in that org Namespace - 1st Gen
  • 12. Defined in developer edition Registered in Dev Hub Available for multiple packages Potential for namespace collisions E.g. BOOKSTORE__Book__c in two packages Expose code through global keyword Namespace - 2nd Gen And @namespaceAccessible annotation
  • 14. Explicitly grant access to each member Class Method Property Interface Can add or remove at any time - may break code Cannot mix with @AuraEnabled Creates dependency SALESPKG requires COREPKG to be installed @namespaceAccessible Annotation
  • 16. V1.0.0 Ancestry - 1st Gen Patch Version V2.0.0 V2.1.0 V2.2.0 V2.1.1
  • 17. Define previous version (ancestorVersion) Optional Ancestry - 2nd Gen 1.25.0 can extend 1.24.0 released version And any ancestors of 1.24.0 "Use the ancestor that’s the immediate parent of the version you’re creating" SalesforceDXDeveloper Guide, https://sforce.co/3jUdxZH
  • 18. Ancestry - 2nd Gen V1.0.0 V2.0.0 V2.1.0 V2.2.0 V3.0.0 V3.1.0 V4.0.0 V4.1.0 ancestorVersion1.0.0 ancestorVersion2.0.0 ancestorVersion2.1.0 ancestorVersion2.0.0 ancestorVersion3.0.0 No ancestorVersion ancestorVersion4.0.0
  • 19. Parallel development streams, like version control Multiple beta versions with the same number Only one can be promoted to released Use --branch <name> switch when creating version Branching
  • 21. Choose Your Plan FirstGeneration SecondGeneration Managed Unmanaged Unlocked Managed Org Dependent
  • 22. 1st Gen Unmanaged Features No namespace Code visible/editable Not upgradeable When to use Never!
  • 23. 1st Gen Managed Features Namespaced Code obfuscated Upgradeable When to use List on app exchange Features missing in 2GP
  • 24. 2nd Gen Managed Features Namespaced Code obfuscated Upgradeable When to use List on app exchange Extend 1GP ISV Tightly controlled apps
  • 25. 2nd Gen Unlocked Features Optional Namespace Code visible/editable Upgradeable Downgradeable Migrate metadata
  • 26. Example - revert 1.33 version of package to 1.25 Downgrade Package Metadata is : Modified (Apex classes reverted to 1.25) Deprecated (Custom objects not present in 1.25) Deleted (Report not present in 1.25) Fails if local code depends on 1.33 code
  • 27. Move metadata in/out of package Release metadata from package into org Claim metadata from org in to package Collaboration required Cannot use namespaces Package and org must be logically complete No demo, just screenshots (sorry) Migrate Metadata
  • 34. 2nd Gen Unlocked When to Use System Integrator Enterprise Customer Newer Org Entire Application New Distribute Open Source
  • 35. 2nd Generation Org Dependent Unlocked Features No Namespace Code visible/editable Upgradeable Downgradeable Migrate metadata Depend on Org Metadata
  • 37. Tests run on installation Faster development Slower installation Complicates development process Dependent metadata must be present during development Local changes may prevent upgrade - collaboration required Scratch orgs can be a challenge Tooling can't tell the difference Dependent metadata can sneak into package LIkely to target fewer subscriber orgs Org Dependent
  • 38. 2nd Generation Org Dependent Unlocked When to Use Mature Org Rely on existing metadata Extend existing apps Enterprise Customer Sweet spot for SI
  • 40. Official Docs Managed : sforce.co/398qygi Unlocked : sforce.co/3NuNBk9 Trailhead : Managed Module : sforce.co/3GUTmFr Unlocked Trail : sforce.co/38W51qQ 2nd Gen Launch FAQs - historic interest Developer Controlled : bit.ly/3MsZV2W Unlocked : bit.ly/3O1ZWMO Trailblazer groups : Unlocked : sforce.co/3xo6jEC London's Calling 21 Org Dependent Packages youtu.be/XzUWr6gV9zk More Information - 2nd Generation Only!