Understanding the Concept of Source-Driven development with Salesforce DX

Technology

Sachin ReddyWritten by:

As an organization grows, one may start to experience many unforeseen challenges in terms of coordinating the development projects and also doing testing across the projects using the changesets. Salesforce DS package development methodologies can effectively address these challenges.

In this developmental model, the source is better organized into various packages based on a specific group of advanced features and customizations one wants to combine and deliver.

A typical Salesforce DX project will effectively reflect such a package-based developmental approach in terms of organizing the source. As a steadily growing platform, we can surely expect Salesforce to fully revolutionize the application development experience for developers across the platform.

The concept of Salesforce DX project

Salesforce DX offers the development teams an end-to-end, integrated lifecycle for agile development with optimum performance. It is designed to be open and highly flexible so that you can build on it with any tools of your choice. Salesforce DX project was first announced at the Dreamforce 2016 a generated a lot of interested in the development community since then.

A typical Salesforce DX project consists of a local directory structure with your metadata held in the source format. This approach will let the developers test using Salesforce DX tools. The directory contains configuration files for the purpose to create scratch orgs. The data to be loaded is put into the orgs for development and testing. This also contains tests which you can rely on in order to validate the packages.

Also Read: How to get a job in data science?

While using CLI for creation of a Salesforce DX project, this will actually create a directory structure. While creating a new project from scratch, many add-on things are getting created for you. At the first point, we have to create a configuration file for the project. Creation of scratch definition sample directories and files are done at the first point for the developers to test and sample the data sets. One need to also create a “package” directory by default for the package source.

In Salesforce DX project, the package is actually a set of related codes as well as customizations. You may test each package independently from the other components inside the org. Alongside to doing this, you may also release the packages independently. In fact, metadata components in a package can only live one at a time within an installed org.

In a bare minimum, projects manage the source for a single package. Considering this, if there are multiple packages to be built as well as released altogether, the developers can better organize all these into a single Salesforce DX project. As done by Flosum.com, each of these packages can better align to a single package directory inside the configuration file of the project.

An innovative shift in developer mindset

In terms of Salesforce DX development, everything the developer does revolve around the org. Whether the independent developer or development team work around a production org, or on dependent sandboxes, or in any unique developer edition, the unique source of truth remains in the Salesforce environment, which helps reduce the chance of an error.

In terms of typical development mindset, this is totally different from the conventional workflows, which the developers are familiar with. On many other platforms, the source of truth is typically a version control system and current-day developmental tools have made test automation and delivery also a unique commodity. Salesforce DX changes the way how the developers work to a much easier and more accurate way.

Also Read: How Network Monitoring brings better Visibility in your business

Salesforce DX tools

Even on getting on to Salesforce DX development, software developers can still use their most familiar tools. However, you can enjoy a whole lot more by being on the Salesforce DX with a unique set of enhancement tools on offer. The most advanced and significant features for many developers are the brand-new APIs, innovative scratch orgs, environment hub, and a very powerful CLI (command line interface). Let’s have a quick overview of these.

  • New APIs and CLI

Even though all the APIs developers use are made available, Salesforce has created some new APIs also to help the developers work more effectively with the Scratch Orgs and Environment Hub. This will make it easier to integrate these features into the workflow. Wrapping up all these existing and new APIs is a fresh CLI which is a significant enhancement in Salesforce DX developer lifecycle. Whatever the developers want to do as to work directly from within the terminal or create any scripted deployments, CLI acts a single interact to access any APIs. It can also be used as a foundation to build more tools in a very simple declarative way.

  • Environment Hub

Environment Hub is another advanced feature you can see in the org on enabling Salesforce DX. It is much similar to the Sandbox lists you see in the Setup. The major difference between these is that the Environment Hub will allow the users to track all orgs in use. While the Environment Hub gets enabled, it can further establish that org to a central management point along with other orgs. The users in those orgs too can get permission to access and manage other orgs.

  • Scratch Orgs

In a typical development environment, there could be at least 100 developer editions or more, which the developers need to keep for long. On the other hand, Scratch Orgs now represents a significant change in the conventional development and testing environments. Scratch Orgs are quick to provision and is accessible to a single user as a developer, tester, or administrator. This is kept temporary and can be destroyed easily once the job is done. Scratch orgs are made on JSON descriptor files which can be kept or maintained in the source control.

Apart from these, there are also many other delivery tools and development pipelines built as a part of Salesforce DX by leveraging the Heroku tooling. Announced in 2016 and released shortly after that, even though it features many mighty tools as we discussed here, one may have to consider Salesforce DX in its infancy state still now. We may expect more powerful tools and mightier development experience on this same platform in the nature future itself as its continuously evolving.

Also Read:

Understanding the SaaS Business Model Made Simple

How People Are Embracing IoT Devices in The Home

Comments are closed.