Unlocked Packages
Unlocked packages is a new way to manage applications and deployment on salesforce environment. Packages are container which contains set of related features, schema, customizations. It keeps customizations more organized and in tractable way.
With package development, package will become ultimate source of truth. First you can create package with some basics and then update package version as you build it. So now it is just matter of installation of right version of package on your different environment and every org will be on same speed.
DevHub can be authenticated through salesforce CLI as well with command
DevHub Org
Configuration for your environment
- Make sure Dev Hub is enabled from setup
- Enable second-generation packaging on Dev Hub org
This demo explains how to login and authenticate to Dev Hub, then enable Dev Hub and second generation packaging.
DevHub can be authenticated through salesforce CLI as well with command
sfdx force:auth:web:login
DevHub Org
Developer hub org can create and manage scratch orgs. Scratch orgs are desposable and temporary environments. Scratch org is source driven and fully configurable and also facilitate continuous integration.
With unlocked package development you could modularize your data and metadata customizations into package. First spend some wise time to divide functionality into packages. Maybe one package for Lightning App page, one for any app, visual force page and so on.
You can start to put your small functionality code and metadata into package. It is not necessary that everything of your org is in packages on first day.
Unlike managed packages Unlocked packages as name suggests you can change metadata of packages at any time ,even once installed on production environment. But you have to perform same changes on packages so that updated version of package could be installed on other orgs.
Second generation packaging allows to create packages in source driven development environment. we can create packages and deploy on salesforce environment
| Enable Dev hub and Unlocked packages |
More about Unlocked Packages
It is the new approach compared to traditional change set deployment and ant migration tools etc. It gives more control on managing change in environments.
You can start to put your small functionality code and metadata into package. It is not necessary that everything of your org is in packages on first day.
Unlike managed packages Unlocked packages as name suggests you can change metadata of packages at any time ,even once installed on production environment. But you have to perform same changes on packages so that updated version of package could be installed on other orgs.
Changes made directly on production package does not automatically pulled out to package but it gives flexibility to quick small changes on production which comes with great responsibilities.
No comments:
Post a Comment