Salesforce DX is a set of tools allowing developers to build collaboratively and deliver continuously. While we work tools like Eclipse, Maven, Ant etc. to version control the metadata, Salesforce DX’s modern approach makes development and version control much easier on Salesforce platform. It provides an integrated, end-to-end lifecycle for high-performance agile development.
Core Principles of Salesforce DX
- Source Driven Development: Collaboration with technologies like Git to version control your data. Specify the edition, features and configuration options of development and production environments.
- Salesforce CLI
- Scratch Orgs: They are disposable deployments of Salesforce code that can be used for continuous integration, testing and development.
- Open and Standard Developer Experience: Allows you to work with the tools you prefer be it working with a text editor or a modern integrated development environment.
- Modular metadata and code
- Facilitate Continuous Delivery
- Agile Development supported by Flexible Packaging: To automate and manage end-to-end lifecycle Managed Packages allows partners as well as the enterprise customers to adopt a source-drive, CLI-centric approach thus delivering apps in a modern and efficient manner.
- Rapid Development and Testing: The scratch Orgs allows you to immediately test and promote the code. You can merge your branch, build packages, and deploy to a staging sandbox for final testing.
What are Scratch Orgs and why do we need them?
Scratch Orgs are disposable and temporary deployments of Salesforce code unlike Sandboxes or Dev environments that are not disposable. You need to enable Salesforce DX to enable Scratch Orgs. You can enable it for any Salesforce instance. And it is also known as Developer Hub. One Developer Hub can have multiple Scratch Orgs. And you can easily delete these Scratch Orgs after a package is built and saved on SCM (Source Code Management).
What’s new in Salesforce DX Beta?
- The Dev Hub is now a replacement for the Env Hub in earlier version to manage scratch Orgs
- Lightning Test Service and Lightning linting support
- Distribution of managed packages through installation keys and secure testing
- Salesforce CLI binary now runs side-by-side with Heroku CLI
- Enhanced org information from force:org:list and force:org:display
- Improved Apex Test error reporting and performance
- Automatically add new components to a managed package in Packaging orgs with force:mdapi:deploy
- Scratch org definition values are now a part of the Salesforce CLI