55

Simplify your code with Salesforce DX and module development

Embed Size (px)

Citation preview

Forward-Looking StatementStatement under the Private Securities Litigation Reform Act of 1995:

This presentation may contain forward-looking statements that involve risks, uncertainties, and assumptions. If any such uncertainties

materialize or if any of the assumptions proves incorrect, the results of salesforce.com, inc. could differ materially from the results expressed or

implied by the forward-looking statements we make. All statements other than statements of historical fact could be deemed forward-looking,

including any projections of product or service availability, subscriber growth, earnings, revenues, or other financial items and any statements

regarding strategies or plans of management for future operations, statements of belief, any statements concerning new, planned, or upgraded

services or technology developments and customer contracts or use of our services.

The risks and uncertainties referred to above include – but are not limited to – risks associated with developing and delivering new functionality

for our service, new products and services, our new business model, our past operating losses, possible fluctuations in our operating results and

rate of growth, interruptions or delays in our Web hosting, breach of our security measures, the outcome of any litigation, risks associated with

completed and any possible mergers and acquisitions, the immature market in which we operate, our relatively limited operating history, our

ability to expand, retain, and motivate our employees and manage our growth, new releases of our service and successful customer deployment,

our limited history reselling non-salesforce.com products, and utilization and selling to larger enterprise customers. Further information on

potential factors that could affect the financial results of salesforce.com, inc. is included in our annual report on Form 10-K for the most recent

fiscal year and in our quarterly report on Form 10-Q for the most recent fiscal quarter. These documents and others containing important

disclosures are available on the SEC Filings section of the Investor Information section of our Web site.

Any unreleased services or features referenced in this or other presentations, press releases or public statements are not currently available and

may not be delivered on time or at all. Customers who purchase our services should make the purchase decisions based upon features that are

currently available. Salesforce.com, inc. assumes no obligation and does not intend to update these forward-looking statements.

Go Social!

Salesforce Developers

Salesforce Developers

Salesforce Developers

The video will be posted to YouTube & the

webinar recap page (same URL as registration).This webinar is being recorded!

@salesforcedevs / #SalesforceDX

Salesforce DX Webinar Agenda Salesforce Development Overview

Adopting the Salesforce Development Experience

Understanding Modular, Package Development

Preparing and Migrating to Modular Projects and Packages

Managing Org Shape

Have Questions?

Don’t wait until the end to ask your question!

Technical support will answer questions starting now.

Respect Q&A etiquette

Please don’t repeat questions. The support team is working their way down the

queue.

Stick around for live Q&A at the end

Speakers will tackle more questions at the end, time-allowing

Head to Developer Forums

More questions? Visit developer.salesforce.com/forums

Salesforce Platform

Development

Development Processes before Salesforce DX

CodeDevelop+ Unit Tests

BuildIntegration + QA

TestStaging + UAT

ReleaseTraining + Deploy

Dev

SBX

PRODFull

SBX

Dev

SBX

Dev

SBX

Partial

SBX

Dev

Pro

SBX

Dev

Pro

SBX

Declarative Development:

Code is promoted through

Change Sets

Source Based Development:

Changes are tracked in a VCS.

The Ant Tool is used to move

source through development,

test, and release Sandboxes.

Version Control System (repo) Ant Tool Commands/Scripting

Change Set Promotions

Dev

SBX

Dev

SBX

Build with the Tools you love,

within a Process you already understand

Environments are

easily created

and disposable

Metadata

and code are

modular

Flexible

packaging

supports agile

distribution model

Everything is

driven from

source code

Development is

organized around

team

collaboration

Development is

based on open

standards and

extensibility

Processes and

tools facilitate

continuous

delivery

Salesforce Development ExperienceBuild together and deliver continuously

Source-driven developmentGreater agility to test out features with confidence

Team collaboration Increased dev productivity, faster time to market

Continuous integration and deliveryHigher quality code, more automation

Open and prescriptive Build with the tools and processes you know and love;

bring together Lightning, Force.com, and Heroku

Improve the Developer ExperienceAcross Application Lifecycle Management

Plan

Code

BuildTest

Release

CLI for integration with 3rd

party editors

Scratch orgs for devs,

built off of source

Continuous Delivery/ build

automation

Continuous integration

with test automation

Sandboxes for

performance testing, UAT,

staging

Packaging to

streamline delivery

to prod

VCS as the

source of truth

IDEs, Text Editors,

Language Services

Source Based Development Evolving with SFDXCode

Develop + Unit Tests

BuildIntegration + QA

TestStaging + UAT

ReleaseTraining + Deploy

Org Based Development:

Org Diffs are developed and

released through Ant

Migration, Metadata API

Deploy and Retrieve

PRODFull

SBX

Partial

SBX

Dev

Pro

SBX

Dev

SBX

Dev

SBXDev

SBX

Version Control System (repo)

force:mdapi:deploy

force:mdapi:retrieve

Module Development:

Changes are developed with

source push and pull.

Modules are released through

Metadata API Deploy.

PRODFull

SBX

Partial

SBX

Dev

Pro

SBX

Version Control System (repo) force:source:convert

force:mdapi:retrieve

force:source:push

force:source:pull

Scratch

Org

Scratch

Org Scratch

Org

Scratch

Org

Adopting Salesforce DX

Adopting Salesforce DX

Salesforce DX CLI

Migrate your current Force.com development tasks (e.g. Metadata API Deploy,

Apex Testing)

Continuous Integration and Delivery

Automate Tests and Releases through CLI commands, Sandboxes and/or

Scratch orgs to produce higher quality code.

Modular Development with Projects, Scratch Orgs, and DCPs

Scratch orgs and source change tracking provide greater agility.

to test out features with confidence

Not just all-or-nothing

Migrate Existing Tasks to the CLIAll of your Developer needs in One Tool

Example Tasks Benefit Features & Products

● Metadata API Deploy and

Retrieve

● User Authentication

● Org Creation/Deletion

● All of your commands in one place

● More secure authentication

● Improved scripting and usability

● Salesforce DX CLI

Automate Testing and Release ManagementIntegrate with Continuous Integration and Delivery Tools

Benefit Features & Products

● Improved product quality

● Increased agility, Faster time to market

● Better governance and stability

● Salesforce DX CLI

● Sandboxes + Scratch Orgs

● 3rd party VCS

● 3rd party CI/CD Tool

Understanding Modular, Package Development

Development Processes before Salesforce DX

CodeDevelop+ Unit Tests

BuildIntegration + QA

TestStaging + UAT

ReleaseTraining + Deploy

Dev

SBX

PRODFull

SBX

Dev

SBX

Dev

SBX

Partial

SBX

Dev

Pro

SBX

Dev

Pro

SBX

Declarative Development:

Code is promoted through

Change Sets

Source Based Development:

Changes are tracked in a VCS.

The Ant Tool is used to move

source through development,

test, and release Sandboxes.

Version Control System (repo) Ant Tool Commands/Scripting

Change Set Promotions

Dev

SBX

Dev

SBX

Source Based Development Evolving with SFDXCode

Develop + Unit Tests

BuildIntegration + QA

TestStaging + UAT

ReleaseTraining + Deploy

PRODFull

SBX

Partial

SBX

Dev

Pro

SBX

Scratch

Org

Scratch

Org Scratch

Org

Org Based Development:

Org Diffs are developed and

released through Ant

Migration, Metadata API

Deploy and Retrieve

Package Development:

Package Changes are

developed with source push

and pull. Package Changes

are released through new

Package Versions.

Version Control System (repo)

force:source:push

force:source:pull

PRODFull

SBX

Partial

SBX

Dev

Pro

SBX

Dev

SBX

Dev

SBXDev

SBX

Version Control System (repo)

force:mdapi:deploy

force:mdapi:retrieve

force:packageversion:create

force:package:install

Scratch

Org

What is Org-Based Development?

Change Management by tracking Org

Diffs

Releases are designed around updating a

specific Production Org

All Metadata stored in the Unpackaged

Area of the Org

Org Driven Development with Salesforce DX Org Differences are Tracked Manually

Org Differences are Version Controlled

CodeDevelop + Unit Tests

BuildIntegration + QA

TestStaging + UAT

ReleaseTraining + Deploy

PRODFull

SBX

Partial

SBX

Dev

Pro

SBX

Dev

SBX

Dev

SBXDev

SBX

Version Control System (repo)

force:mdapi:deploy

force:mdapi:retrieve

Release are scheduled around the Production Org

Release Artifacts are specific to a Production Org

All Phases of the Development Process are

executed via Metadata API

What is a Developer Controlled Package?

Container for transporting entire modules

of metadata components to your org

Durable module that exists in your Org

Releases are designed around the

installation or upgrade of a Package

Version

Package Development with Salesforce DX Changes to the Packages are Automatically Tracked

Entire Package (all metadata) always version controlled

Dev, Test and CI executved via force:sourcecommands

CodeDevelop + Unit Tests

BuildIntegration + QA

TestStaging + UAT

ReleaseTraining + Deploy

Release schedule for each Package

Release Artifacts are new Package Version

CD and Release Mgmt executed via force:packagecommands

force:source:push

force:source:pull

force:packageversion:create

force:package:install

PRODFull

SBX

Partial

SBX

Dev

Pro

SBX

Scratch

Org

Scratch

Org Scratch

Org

Version Control System (repo)

Scratch

Org

Benefits of Developer Controlled Packages (DCPs)

Easy to add/edit/remove components

Source-driven Development

Iterate using Versions

Improved Audit / Change Management

Dependency ManagementSimplified CI / CD

Repeatable, Scriptable, Trackable

Increased Developer

Productivity and Release

Management

Preparing for Developer Controlled PackagesCode

Develop + Unit Tests

BuildIntegration + QA

TestStaging + UAT

ReleaseTraining + Deploy

PRODFull

SBX

Partial

SBX

Dev

Pro

SBX

Scratch

Org

Scratch

Org Scratch

Org

Module Development:

Changes are developed with

source push and pull.

Modules are released through

Metadata API Deploy.

Package Development:

Package Changes are

developed with source push

and pull. Package Changes

are released through new

Package Versions.

Version Control System (repo)

force:source:push

force:source:pull

PRODFull

SBX

Partial

SBX

Dev

Pro

SBX

Version Control System (repo) force:source:convert

force:mdapi:retrieve

force:packageversion:create

force:package:install

Scratch

Org

force:source:push

force:source:pull

Scratch

Org

Scratch

Org Scratch

Org

Scratch

Org Module

Development

Process available

in Winter ’18

Package

Development

Process available

in Spring ’18

Migrate Existing Metadata and

Prepare for Package Development

What is Unpackaged Metadata?

Production Org

Installed AppExchange

Apps

Unpackaged Metadata

Organizing Unpackaged Metadata

using Packages

Production Org

Unpackaged Metadata

Package

Package

Installed AppExchange

Apps

Organizing Unpackaged Metadata using Packages

Production Org

Unpackaged

MetadataSalesforce DX

Packages

Installed AppExchange

Apps

Identifying Metadata that can migrate into a Package

Package Development

Identifying Metadata that can migrate into a Package

Package Development

Metadata of an App built in-house

Metadata that represent extensions of Sales Cloud, Service Cloud,…

Metadata that represent extensions of an AppExchange App

Newly created Metadata (Lightning Pages, Apex Classes,…)

Criteria for Identifying Metadata that can migrate into a Package

Package Development

A group of related code and customizations

Can be tested independently from other components in your org

Able to be released independently

Source components can only live in one project at a time

Things we’ve learned don’t work

Package Development Considerations

Don’t export entire org as a single project

Modularize

Be careful with schema

Put shared schema in its own project

Watch for shared objects

Add to a common project

Preparing for Developer Controlled PackagesCode

Develop + Unit Tests

BuildIntegration + QA

TestStaging + UAT

ReleaseTraining + Deploy

PRODFull

SBX

Partial

SBX

Dev

Pro

SBX

Scratch

Org

Scratch

Org Scratch

Org

Module Development:

Changes are developed with

source push and pull.

Modules are released through

Metadata API Deploy.

Package Development:

Package Changes are

developed with source push

and pull. Package Changes

are released through new

Package Versions.

Version Control System (repo)

force:source:push

force:source:pull

PRODFull

SBX

Partial

SBX

Dev

Pro

SBX

Version Control System (repo) force:source:convert

force:mdapi:retrieve

force:packageversion:create

force:package:install

Scratch

Org

force:source:push

force:source:pull

Scratch

Org

Scratch

Org Scratch

Org

Scratch

Org

Managing Org Shape

Developing with Scratch Orgs using Org Shape

Current Product Capability

Org Shape is defined as the edition, features and preferences

Currently enabled through Scratch Definition files

Known Issues

Difficult to specify features and preferences for non-partners

All available features NOT available (as of Winter ’18)

Ensuring customers can easily setup development orgs

Developing with Scratch Orgs using Org Shape

Product Roadmap

Provide more features within Scratch Definition

Org Shape Pilot enables creation of scratch orgs with the shape of your

production org

Ensuring customers can easily setup development orgs

Salesforce DX | Major Release Milestones

Winter ’18 Spring ’18 Summer ’18

Salesforce CLI GA GA +1 GA+2

Scratch OrgsGA

Org “Shape” Pilot

GA

Org “Shape” BetaGA

IDEs, Text Editors & Language

ServicesGA GA +1 GA+2

PackagingDeveloper Controlled

Packages (DCPs) Pilot

Developer Controlled

Packages (DCPs) BetaGA

Q & ATry Trailhead: trailhead.salesforce.com

Join the conversation: @salesforcedevs

Additional Slides

Salesforce DX Automation

Salesforce DX Gaps Understood

Source Driven Development

Winter ‘18 – Only supports a subset of Metadata API entities

Spring ‘18 – Open Beta – Supports use of all Metadata API Entities

Summer ’18 – GA – Supports use of all Metadata Entities

Developer Controlled Packages

Winter ‘18 – Pilot – Only supports a subset of Metadata API entities supported

by managed packages

Spring ‘18 – Open Beta – Supports use of most Metadata API

Entities

Summer ’18 – GA – Supports the use of all Metadata Entities

Goal: Get to Parity with Metadata API Functionality and Supported Entities

Metadata API Gaps Internal Program working to address API Gaps

External Metadata Coverage Report (sneak peek)

Prioritization of Gaps

Which type of Packaging is suitable for Google?

Package Type Suitable for Google? Why?

Managed Packages (aka

Packaging 1)

No Rigid manageability rules; more

suitable for ISV use cases

Unmanaged Packages No No support for package upgrades

Managed Second-Generation

Packages

No Rigid manageability rules; more

suitable for ISV use cases

Developer-Controlled Packages Yes Supports seamless changes,

version upgrades and modularity

Migration Recipe

Install Salesforce CLI

Enable Dev Hub in Production/Business Org or sign up for trial

Scaffold a project workspace, add to VCS

Update scratch org configuration for desired shape

Retrieve and/or convert source from existing org or VCS repo

Commit project workspace source to VCS

Developers use source-driven development

Continuous integration and delivery driven from source in repo

High level steps

Deploying Metadata

using Packages

Developing and Deploying an App using DX

and Packages

Scratch orgs for

development

CI Runs

UAT Sandboxes

Prod Orgs

Version Control

System

Local Workspace

with IDE

Package

Maintaining and Enhancing an App using Packages

Deploy new version

to Prod Org

CI Run

Source Control

System

1

2

3

4

Ver 1.0Ver 2.0Ver 3.0

Prod Org

Source Based Development Evolving with SFDX

CodeDevelop + Unit Tests

BuildIntegration + QA

TestStaging + UAT

ReleaseTraining + Deploy

PRODFull

SBX

Partial

SBX

Dev

Pro

SBX

Scratch

Org

Scratch

Org Scratch

Org

Org Based Development:

Org Diffs are developed and

released through Ant

Migration, Metadata API

Deploy and Retrieve

Package Development:

Package Changes are

developed with source push

and pull. Package Changes

are released through new

Package Versions.

Version Control System (repo)

force:source:push

force:source:pull

PRODFull

SBX

Partial

SBX

Dev

Pro

SBX

Dev

SBX

Dev

SBXDev

SBX

Version Control System (repo)

force:mdapi:deploy

force:mdapi:retrieve

force:packageversion:create

force:package:install

Scratch

Org

Why use Packaging?

Additional Slides

How do customers deploy Metadata to

Prod Orgs today?

Force.com Migration Tool

Changesets Unmanaged Packages

App Hub - UI for Salesforce DX