14
Dec

Salesforce DX – For next generation App development

Sailfin 0 comment
What is Salesforce DX? Salesforce DX is a new way to manage and develop apps on the Force.com platform across their entire life cycle. It brings together the best of Force.com to enable source-driven development, team collaboration with governance, and new levels of agility for custom app development on Salesforce. Salesforce DX benefits:

  • Improving team development and better collaboration.
  • Facilitating automated testing and continuous integration.
  • Making the release cycle more efficient and agile.

What are scratch Orgs? Much of the setup you do for Salesforce DX enables you to use a new type of org called a scratch org.

Scratch orgs are temporary Salesforce org which can be created quickly and metadata can be deployed from source code management.

These orgs can be used by developers to perform quick proof of concept or build and test packages. Once package is build and saved back on source code management, scratch org can be destroyed easily. Salesforce CLI Salesforce command-line interface (CLI) is a powerful command line interface that simplifies development and build automation when working with Salesforce environment. It combines many capabilities from across several Salesforce APIs.

It also incorporates the functionality of other Salesforce tools, such as the Force.com Migration Tool and Salesforce workbench. All in one place. Easily create environments for development and testing, synchronize source code, create and run tests, and control the full application life cycle with the help of simple scripts. Packaging 2 Second-generation packaging escort in a new way for partners and enterprise customers to develop, distribute, and manage their apps and metadata.

Benefits for enterprise customers:

  • Use the power of the Salesforce DX command-line interface (CLI) for source-driven development.
  • Install packages in scratch orgs.
  • Organize and deploy metadata and apps using developer-controlled packages.

Benefits for ISVs:

  • Implement feature branch development and testing.
  • Use a CLI to enable fully API-driven development.
  • Develop packages that are source-driven, not org-based.
  • Use public Apex classes to share code across packages rather than using global Apex classes.
  • Easily develop and distribute dependent packages.
  • Define multiple packages within a single namespace.

Salesforce Developer Tools for Visual Studio It is an open-source extension pack that includes tools for developing on the Salesforce Platform. Use the extension pack to employ the source-driven Salesforce DX development flow in the lightweight, extensible VS Code editor. These extensions provide features for working with scratch orgs, Apex, Lightning components, and Visualforce. Setting up Salesforce DX

  1. Sign up for a trial org (https://developer.salesforce.com/promotions/orgs/dx-signup ), Enable Dev Hub & Enable Packaging 2 (Beta)
  2. Add Salesforce DX Users: If you want to include your team, you can add users to your Dev Hub org.
  3. Install the Salesforce CLI (https://developer.salesforce.com/tools/sfdxcli) in your system.
  4. Once all setup done, Use the Developer Hub (Dev Hub) to create, delete, and manage your Salesforce scratch orgs. After you set up your project on your local computer, authorize the Dev Hub org using the Salesforce CLI. We can test sample app using CLI commands. (https://github.com/forcedotcom/sfdx-simple)