Salesforce DX (SFDX) provides an integrated, end-to-end lifecycle designed for high-performance agile development. It consists set of tools including Salesforce CLI, Second-Generation Packaging (2GP), Scratch Orgs, VCS and CI support.
The Salesforce CLI is a command line interface that simplifies development and build automation when working with Salesforce org. It can be used to;
- Aggregate all the tools you need to develop with and perform commands against your Salesforce org
- Synchronize source to and from scratch orgs
- Create and manage orgs
- Import and export data
- Create and execute tests
- Create and install packages
Second-Generation Packaging (2GP)
2GP allows create packages in a source-driven development environment. It can be used to create and deploy packages in own Salesforce org or to develop and distribute packages to customers. Here are some highlights of 2GP;
- Salesforce command-line (CLI) support.
- Options for enterprise customers to organize and deploy metadata to production orgs.
- Multiple packages per namespace
- Feature branch development and testing.
- Fully API-driven functionality.
- Packages that are source-driven, not org-based.
- Ease of development and distribution of dependent packages.
The scratch org is a source-driven and disposable deployment of Salesforce code and metadata. A scratch org is fully configurable, allowing developers to emulate different Salesforce editions with different features and preferences. And the scratch org configuration file can be shared with other team members.