Dreamforce always comes with a box of tech surprises every year. 2016 was no exception, one of the big points of discussion was Salesforce DX. Salesforce DX is an absolutely new and unique way to manage and develop Salesforce apps across the entire lifecycle. It has set new standards for various levels of collaboration, productivity, and control. Salesforce DX proves to be a typical paradigm shift with a brilliant set of tools all set to give a modern and enhanced user experience for Salesforce developers.
What Is Salesforce DX All About?
Salesforce DX helps in exquisite team collaboration. It brings the best aspects of Forcedotcom and Heroku under a single shell. It supports perfect collaboration with a deep focus on predictability and quality of open and standardized development lifecycle on Salesforce. The core theme of Salesforce DX allows developers to select the tools they desire. For example, if you opt for Forcedotcom IDE, with Salesforce DX and the new command line interface you use the text editor or the IDE of your choice along with the CLI to build your app.
Apart from this, Salesforce DX gives the provision of seamless integration with Heroku Flow which supports automated deployments off of the GitHub repositories, staging, app pipelines to streamline development, a thoroughly integrated test suite to support continuous integration. It further allows developers to build automation tools and plug into the third-party test.
Now The Question Arises Why Salesforce DX?
The toughest phase faced by the development team is probably keeping up with the pace of inevitably changing business requirements. Salesforce tries to combat this situation by enabling a much broader group of people to make changes to the applications safely and focusing on the core business outcomes. However, the no or low-code aspect allows Salesforce to provide a greater ability to developers and helps to get things done quicker and better.
As the business needs to grow certain things tend to fall beyond no or low code solution. Some solutions require a full-fledged traditional development process and require bespoke logic. Salesforce caters to this problem in the form of Forcedotcom. But just a programming environment is not sufficient to enable this bespoke logic, to take advantage of all the available features more traditional developers and large development teams are needed.
But the traditional teams come with their own set of expectations which brings along with it additional process and more collaboration. However, most platforms have developed tools to support this approach and make the lives of developers a lot easier. Salesforce has definitely excelled in empowering admins but maybe fallen a little back when we talk about catering to such traditional development and their expectations— Enter Salesforce DX.
Salesforce DX introduces the scratch org a new Salesforce environment. A source was driven and disposable deployment of Salesforce code and metadata. To add to the advantage Scratch orgs are completely disposable which allows the developers to emulate the various editions with varied features and preferences. Thereby playing a vital and critical role in enhancing the developer productivity and managing perfect collaboration during the entire development lifecycle. They can also be used for automated testing and implementation of an entire continuous integration suite.
Scratch orgs are the most impactful feature which can be trivially created and destroyed with the force:org:create and force:org:delete commands. Rather than creating DE org or using a sandbox and trying to sync that to a corresponding source control branch, the developer can now make use of existing tools like MavensMate and Eclipse. Subsequently, when we need to run it the changes spin up a new org and push the metadata to it.
sfdx force:org:create -f config/org-definition.json -w sfdx force:src:push -w sfdx force:data:import --plan data/org-sample-data.json
The above code will create a scratch org that will be based on the definition of that org in the org-definition.json push the contents from the cloned version to the new org and import the sample data defined in org-sample-data.json. It simply implies that you can go from version control to running a representation of your org within seconds.
— Salesforce Customer Success Group (@asksalesforce) January 10, 2017
Is Salesforce DX only for coders???
A much-asked question is that whether Salesforce DX is only for coders or admins and low code developers has something in store for them as well? Well, the answer to this question is that at present it is primarily focused on coders. But over the time it looks forward to Salesforce DX innovations ranging from metadata externalization to new packaging and aids the coders as well as the non-coders to work together in perfect collaboration to build high-quality Salesforce apps.
In short, we can say that Salesforce DX is the initial step towards a fresh process for the Salesforce Developers with exquisite new features. However it now mostly caters to the more experienced developers but the brighter aspect being it is underpinned by the correct philosophy. Salesforce DX will without any doubt expand and evolve over the coming years and empower the developers and admin to work closely with perfect collaboration than ever before.
References: gearset, infoq, developer.salesforce