Salesforce DX has added a lot of new tools and features which are meant to streamline and ease up the application development lifecycle. This further improves the efficiency of development and integration and also facilitates:
Reviews also point out the DX capabilities in making the release cycles more efficient.
In fact, Salesforce DX features a lot more than a few sets of handy tools for the developers to make use of. It offers a complete alternative to the conventional mode of development and helps to shift the actual source of truth to VCS (version control systems) from org. It may further shift the development focus to packaged type of development from the old-age org development.
Now, let’s look into the details of how to set up your Salesforce DX environment and get introduced to a few handy tools.
Scratch Org Concept
(Article Continues Below Advertisement)
A large number of new tools from Salesforce DX enable the developers to get access to a brand new org type called the Scratch Org. When compared to the older versions, Scratch Org boasts of being much more configurable, dedicated, and the short-term environment from Salesforce.
Scratch orgs have proven capacity to enhance developer productivity as well as the collaboration of the end-to-end development process. It also facilitates the scope for automated testing as well as continuous integration is also made possible. You can effectively use Salesforce Extensions or CLI for the VS Code, which sets open the Scratch Org in the browser. There is no need to log in for this. You can try and spin up Scratch Org when there is a need to:
Initiate new projects.
Build a feature branch.
Testing of any new features.
Run automated testing.
Conduct any development tasks at Org directly.
Start from the very beginning with a new Org.
Even though a typical Scratch Org is considered disposable, configuration files still contain real brawn. As Flosum.com suggests, using a configuration file, developers can custom configure Scratch Org using different editions of Salesforce and add any settings and features you want. The Scratch Org file is also shareable with other members of the team. This way, all tend to share one basic org on which the can develop.
Scratch Orgs over Sandboxes
Contradictory to the common belief, Scratch orgs are not the replicas of typical Sandboxes and other production orgs. Scratch orgs are ephemeral in nature with a maximum of 30-day life and so are perfect to develop new features or packages. Scratch Org also works great in unit testing as well as also facilitates continuous integration. However, Sandboxes containing metadata of the production org still becomes necessary to do the user testing, staging, and ongoing delivery, etc.
In order to start with the Scratch Orgs, one should first choose the specific org to work as the Dev Hub. You may further enable the Dev Hub in some of the paid orgs, but it’s best to try it out somewhere outside production. Dev Hub offers the development team the capability to create Scratch orgs and manage them. Instead of doing it, you can also try setting up Dev Hub in the Developer Edition or also at Trailhead Playground which helps to make use of this module.
Wake up Right! Subscribe to our Morning Briefing and get the news delivered to your inbox before breakfast!