Boost PC performance: How more available memory can improve productivity
[Tech Webinar] Second Generation Packaging for ISVs
1.
2. Who is CodeScience
● Founding partner of the Salesforce Product
Development Organization (PDO) Program since
2008 - named Master PDO in 2017
● PDO Program provides app development services
to ISVs for the Salesforce AppExchange
● Partner with clients in various industries to assist
in building over 250 apps on the AppExchange
● From design to build to implementation, we
support through the full lifecycle
7. Package Types
● Used to Distribute
Open-Source Projects or
Application
● Unmanaged Application
with no IP-Protection
● “Code in the Wild”
● Not upgradable
Unmanaged Package
● Collection of Components and
Applications that are Made
Available to Other
Organizations Through the
AppExchange
● IP Protected
● Version control and allows
for creation of extension
packages
● Upgradable and has a
namespace
Managed Package
● Suited for internal business apps
● provides more flexibility to
upgrade in a trackable way
● No IP restrictions
● Modular development approach
● Optional namespace
● Creation through CLI => Skill set
requirements
● lot of flexibility => lot of
responsibility
● need a governance structure
Unlocked Package
9. 2GP - What?
● Second Generation Packaging (2GP) - New way to develop,
distribute, and manage apps and metadata
● Modular development approach
● Tighter integration with source control
● All package operations are executed through CLI and can be
automated
10. 2GP - How?
Create Dev
Hub
Enable ‘Dev
hub’ and
‘Unlocked
Packages and
Second-Genera
tion Managed
Packages’
Link
namesp
ace
Create and
register a new
namespace in
a DE org and
link it to the
dev hub
Develop
and
Push
Create a
scratch org
and build your
app
Create
Package
Create
package from
the source
directory.
Once created,
namespace
and devhub
association
can’t be
changed
Create
Package
version
Iterate and
create a
package
version. A beta
package will
be created.
Install
and test
Install the
package
version into a
scratch org
and test
Release
version
Promote the
version to be
managed
released. Can
be done only
once for each
package
Iterate and repeat
12. 1GP vs 2GP
Source of truth Packaging org Source-driven. No packaging org
Ownership
Packaging org is limited to a
single managed package
Dev hub can own one or more
packages
Namespace One namespace = 1 package
Multiple packages can use the same
namespace
Versioning Linear Branching structure
Automation
A few packaging operations can’t
be automated
All packaging operations can be
automated using CLI
External access Global @namespaceAccessible
1GP 2GP
14. 2GP - Gaps / Known issues as of Winter’ 21
● Cannot delete components (pilot coming up in Spring’ 21 for a subset of types)
● Package versions can’t be deprecated
● Namespace limits do not currently work
● Cannot specify default language for labels in packages
● Unit test limitations for features that require manual setup
● Version creation fails when translations are in dependant package
● Packages cannot be used in Essentials edition orgs
● Apex exceptions do not trigger email notifications
● Multiple objects cannot have sharing reasons with the same API name
● Creation of a new version fails if the package has a protected custom object
● Existing classic packages can not be upgraded to be second generation packages
16. Packaging choice
● Salesforce investments are geared towards 2GP
● How to choose 1GP vs 2GP now?
○ ISVs with existing 1GP package
■ Cannot convert to 2GP yet. Wait!!
○ ISVs building new packages
■ Are the known gaps acceptable?
○ If yes, cautiously start with 2GP with a backup plan to convert to 1GP
○ If not,
■ Proceed with 1GP and wait for the migration plan to materialize in the future
■ If the release timeline is not within the next 1-2 releases, can choose to start
with 2GP for the development phase. Monitor release updates and be
prepared to convert to 1GP for the release version if the gaps are not
addressed by then.