Improve Dev & Release Management with Salesforce DX
Salesforce itself has always been a very powerful CRM platform, but when taken apart, some of its components didn’t generate as much satisfaction. In a particular case, DevOps had noticed for a while that the developer tools were lagging behind. Some even went as far as to ponder if Salesforce was the worst development platform. Ironically, the answer to the prayers and frustration of Salesforce DevOps everywhere was launched just 3 days after the linked blog post got published.
Enter Salesforce DX, a set of tools and practices that facilitate collaboration and continuous delivery of applications. Moreover, Salesforce DX reimagines development and release management so that it is aligned with actual DevOps practices. Let’s take a closer look at how the Developer Experience toolset achieves all of this.
What Is Salesforce Developer Experience?
Announced at Dreamforce 2016, launched in open beta at the end of June 2017, and made available to the general public on October 17, 2017, Salesforce DX promises to offer both individual developers and development teams an end-to-end life cycle created specifically for high-performance agile development. Need to build together and deliver continuously? That’s exactly why Salesforce created Developer Experience.
Getting Started with Salesforce DX
Before diving right in, you are highly recommended to get familiar with Salesforce DX. Some great places to get you started with just the right info on the features and tools are Salesforce DX documentation, which includes:
- Salesforce DX Setup Guide
- Salesforce CLI Command Reference
- Salesforce DX Developer Guide
- Salesforce Development Tools for Visual Studio Code
And Trailhead, where you can earn 4 badges after completing the trail:
- Salesforce DX Development Model
- App Development with Salesforce DX
- Continuous Integration Using Salesforce DX
- Git and GitHub Basics
After going through all of this documentation, you should have a good overview on what Salesforce DX can help you achieve.
Increase Productivity with the Salesforce Command-Line Interface
The Salesforce DX CLI brings together the capabilities of several Salesforce APIs and the functionality of the Force.com Migration Tool and Salesforce APIs, among many other Salesforce tools. Using them, you can easily create development and testing environments in which to create and run tests, besides being able to synchronize the source code and to control the entire lifecycle of the application you’re developing. To make sure that you’re up to date with the latest commands and parameters, make sure to always check the latest version of the Salesforce CLI Command Reference. At the time of writing, version 41 was the most recent.
Use Scratch Orgs to Cut Down Dev Life Cycle Duration
Have you always wanted to configure every aspect of a runtime for Salesforce code and metadata? Salesforce has granted this wish of yours in the form of scratch orgs, your own personal development environments. Not only are these environments source–driven, but you can dispose of them whenever you want. Using scratch orgs, you will be able to emulate different editions with different preferences and features.
After setting up your project and authorizing the Dev Hub org using the Salesforce CLI, you will be able to create, delete and manage the scratch orgs. If, instead, you wish to set an expiration date for scratch orgs, you can do that too, with the mention that the default duration is 7 days.
Keep Track & Synchronize the Source of Salesforce DX Projects
Salesforce DX will make it easier for you to track and synchronize the source of your Salesforce DX project with scratch orgs, with the mention that in the latest release, the support for Metadata API has been expanded. Tracking the Metadata source has now been improved on the server side.
Another change brought by Salesforce DX is that static resources no longer get the .resource file extension, but receive the MIME extension, for better file management and editing.
Rev Up with Salesforce Developer Tools for Visual Studio Code
Because Salesforce Developer Tools for Visual Studio Code is open-source, you will be able to build the application using the tools of your choice, including Eclipse, Git, Selenium, Sublime, and others.
The features included in the Salesforce Developer Tools for Visual Studio Code enable you to work with:
- Scratch orgs
- Lightning components
Keep in mind that you need to install the salesforcedx-vscode extension pack in order to start using the Salesforce Development Tools for Visual Studio Code.
What’s to Come for Salesforce DX?
Salesforce means to add more features to the Developer Experience tool set, and as of the Winter ‘18 Release, second-generation packaging entered beta and a feature enabling you to create scratch orgs with the shape of another org has made it to the pilot stage. As for the second-generation packaging, it promises to make app development even more agile using source-driven packages that aren’t based on orgs.
Need help making the most out of Salesforce DX? Get in touch with us and we’ll take a look at the Developer Experience features and tools that will enable you to improve the way you’re developing Salesforce apps!