Salesforce Developer Experience – Part I

Salesforce Developer Experience (DX) is a new way to manage and develop apps on the Lightning platform across their entire life cycle.

Highlights of SFDX:

  1. Source-Driven Development – At present developers write code in sandbox. The developers working in a project may share the same sandbox or they may have their individual sandbox for development. Ultimately Salesforce org (sandbox or production) becomes the source of truth and it is in SFDX, there is a fundamental shift in this architecture. With SFDX, the source of truth is always a Version Control System (VCS). Developers may use Git or SVN as per the project requirement and feasibility

SFDX gives more flexibility in version control, retrieve package and deployment, as Source of Truth lies with VCS. All the developers working in a project will work on independent Scratch Orgs and will finally merge their code to VCS.

2. Scratch Orgs – SFDX can be enabled for any Salesforce Org known as Developer Hub and one developer hub can have multiple Scratch orgs. Developer Hub is authenticated only once in SFDX. A scratch org is a dedicated, configurable, and short-term Salesforce environment that can be used for development when creating a new project or doing POC. Scratch org gives flexibility of creating, updating and deleting the temporary org, if no longer required. They can also be used as part of automated testing and the implementation of a full continuous integration suite. However, Scratch org can never be a substitute for Sandbox, as Sandbox is ideal to be used for SIT/UAT or training.

3. Continuous Integration and Delivery – Continuous Integration (CI) is a process of automating build and testing of code every time a developer commits changes to VCS. CI encourages developers to share their code and unit tests by merging their changes into a shared version control repository after every task completion. Salesforce DX delivers integration with Heroku Flow, supporting automated deployments off of GitHub repositories. Committing code to VCS triggers an automated build system to grab the latest code from the shared repository and to build, validate and deploy to other Salesforce instances.

4. Salesforce Command Line Interface (CLI) – Salesforce CLI is a powerful command line interface that simplifies the build and automates common development tasks. It uses Public APIs stitched together to perform tasks. There are two plugins available – Force CLI, Salesforce ALM Dev.  Force CLI gives us common commands like SOQL Query or creating DML statements. Salesforce ALM Dev gives us SFDX commands like Create Scratch Org or Authorize a Dev Hub or Import/Export data.

5. IDE – SFDX includes an updated IDE integrated with Salesforce CLI. All CLI commands are available from IDE. It enables users to launch App Builder within an IDE and add components to it. IDE is authorized only once and after that user can retrieve and deploy updated files to org without any restriction.

Leave a Comment

Your email address will not be published.