Salesforce Application Lifecycle Management presented to EA Forum by Sam Garforth

41
Salesforce Application Lifecycle Management Sam Garforth Technical Architect Development Lifecycle and Deployment Designer Certified

Transcript of Salesforce Application Lifecycle Management presented to EA Forum by Sam Garforth

Page 1: Salesforce Application Lifecycle Management presented to EA Forum by Sam Garforth

Salesforce Application Lifecycle Management

Sam GarforthTechnical Architect

Development Lifecycle and Deployment

Designer Certified

Page 2: Salesforce Application Lifecycle Management presented to EA Forum by Sam Garforth
Page 3: Salesforce Application Lifecycle Management presented to EA Forum by Sam Garforth

Agenda

• What is Application Lifecycle Management?

• Centre of Excellence

• Release Management

• Deployment Tool Options

• Testing Strategy

• SFDX Roadmap

Page 4: Salesforce Application Lifecycle Management presented to EA Forum by Sam Garforth

What is Application Lifecycle Management?

Page 5: Salesforce Application Lifecycle Management presented to EA Forum by Sam Garforth

A Salesforce Development Lifecycle

BacklogRelease

ManagementDevelopment Process

IdeasBusiness Backlog

Sprint

Developers• Code or

Configure• Unit Test• Migration Scripts

Testing

UserAcceptance

Testing Production

Environmental Management

Agile Methodology

Break-Fix

Page 6: Salesforce Application Lifecycle Management presented to EA Forum by Sam Garforth

Governance

Backlog

Release Management

Development Process

Ideas Business

Backlog

SprintDevelopers• Co

de or Configure

• Unit Test

• Migration Scripts

Testing

UserAcceptance

Testing

Production

Environmental Management

Agile Methodology

Break-Fix

Backlog

Release Management

Development Process

Ideas Business

Backlog

SprintDevelopers• Co

de or Configure

• Unit Test

• Migration Scripts

Testing

UserAcceptance

Testing

Production

Environmental Management

Agile Methodology

Break-Fix

Backlog

Release Management

Development Process

Ideas Business

Backlog

SprintDevelopers• Co

de or Configure

• Unit Test

• Migration Scripts

Testing

UserAcceptance

Testing

Production

Environmental Management

Agile Methodology

Break-Fix

Backlog

Release Management

Development Process

Ideas Business

Backlog

SprintDevelopers• Co

de or Configure

• Unit Test

• Migration Scripts

Testing

UserAcceptance

Testing

Production

Environmental Management

Agile Methodology

Break-Fix

Backlog

Release Management

Development Process

Ideas Business

Backlog

SprintDevelopers• Co

de or Configure

• Unit Test

• Migration Scripts

Testing

UserAcceptance

Testing

Production

Environmental Management

Agile Methodology

Break-Fix

Backlog

Release Management

Development Process

Ideas Business

Backlog

SprintDevelopers• Co

de or Configure

• Unit Test

• Migration Scripts

Testing

UserAcceptance

Testing

Production

Environmental Management

Agile Methodology

Break-Fix

Consistent governance is needed across all projects

Page 7: Salesforce Application Lifecycle Management presented to EA Forum by Sam Garforth

The Software Development Lifecycle

Technology• Delivery • Support and Training

Processes and Roles• Business Process • Technology Process

Tooling• Platform• Metadata• Migration

PROCESSESPEO

PLE TRUSTED ADVISOR

TECHNOLOGY

DeliveringValue

Business• Users• Stakeholders

Page 8: Salesforce Application Lifecycle Management presented to EA Forum by Sam Garforth

The Key Elements of a Salesforce Governance Framework

• Center of Excellence (CoE)The process of managing governance.

• Change ManagementProcesses to manage the overall program or project lifecycle: from collecting Business requirements to moving code from development through production.

• Org StrategyDesigning and structuring the foundational “Orgs” or areas where the customer’s Salesforce applications will reside and run.

• Technical GovernanceGuiding principles for effectively developing the technical aspects of Salesforce.

Center of Excellence

Change Management

Org Strategy Technical Governance

Page 9: Salesforce Application Lifecycle Management presented to EA Forum by Sam Garforth

What is a Salesforce Centre of Excellence?

Page 10: Salesforce Application Lifecycle Management presented to EA Forum by Sam Garforth

Defining accountability at the Executive level Ensuring Business Goals & Strategic Initiatives are prioritized, leveraged, and executed upon

Coordinating across initiatives Facilitating and driving user adoption

Improving speed of execution Sharing business and technology best practices across business units

Improving communication and visibility across the organization Driving corporate and industry compliance

Benefits of Establishing a Center of Excellence

A CoE can accelerate business value by:

A CoE drives organizations to identify, prioritize, execute, and communicate, while optimally leveraging People, Processes, Knowledge, and Technology and at the same time ensuring high value for all users and meeting the overall Business GOALS.

Center of Excellence

People

Processes

Technology

Knowledge Base

Page 11: Salesforce Application Lifecycle Management presented to EA Forum by Sam Garforth

What is a Sample CoE Structure?

Executive Sponsors

Programme Team

Rel

ease

(P

rogr

am m

anag

emen

t)

Bus

ines

s

Scru

m T

eam

s (D

evel

opm

ent)

Arc

hite

ctur

al

Ado

ptio

n/Tr

aini

ng

Supp

ort

Page 12: Salesforce Application Lifecycle Management presented to EA Forum by Sam Garforth

What are the Crucial “Starter Set” Assets to Focus On?

SolutionArchitecture

DataStrategy

Security & DataSharing Model

Development Standards &Best Practices

Data Integration

Approaches & Execution

ChangeManagement

CoEDrives

Innovation

Page 13: Salesforce Application Lifecycle Management presented to EA Forum by Sam Garforth

Lifecycle of a Salesforce Center of Excellence

Getting Started§ Identify Executive Sponsors§ Conduct Stakeholder Analysis§ Define Business Objectives

§ Define Program Charter§ Define Center of Excellence

Operating Model, Roles and Responsibilities

§ Set up Meeting Agenda and Schedule

Emerging§ Define Process Maps§ Define System Blueprint§ Define Management and Risk

Controls§ Define Release Request Process§ Define Success Metrics Strategy§ Define Data Architecture§ Define Data Quality Strategy§ Develop Adoption and Strategy

Plan§ Establish Environment

Management and Code Migration process

Practicing§ Map Business

Process/Requirements§ Develop Roadmap§ Develop Integration Architecture§ Define Deployment and

Training Strategy § Define On-going Support Plan § Establish Change Control

Process§ Define long-term Data

management strategy§ Define long-term Integration

strategy§ Establish key cross-unit

standards

Leading§ Provide frequent updates via

Newsletter/Website§ Conduct User Group Meetings § Develop Vendor Management

processes and standards§ Validate Success Metrics and

Adjust (KPI’s)§ Define ROI model

Page 14: Salesforce Application Lifecycle Management presented to EA Forum by Sam Garforth

Release Management

Page 15: Salesforce Application Lifecycle Management presented to EA Forum by Sam Garforth

Development Method - A flexible approachMust follow change process• Apex and VisualForce

• Add/modify fields and page layouts

• Create/update Workflow Rules and Approvals

• Create/update sharing rules and public groups

• Create/update Profiles

• Create/update Custom Objects and Fields

Safe in Production• Add Users

• Update Role Hierarchy (depends on solution)

• Reports

• Dashboards

• List View Management

• Documentation Management

• User Administration

• Solution Management

• Communication Templates

• Email Templates

• Manage Case processes (escalation, assignment, etc.)

• Manage Leads processes (escalation, assignment, etc.)

DailyChanges

ScheduledChanges

Page 16: Salesforce Application Lifecycle Management presented to EA Forum by Sam Garforth

Segregating Business and IT ResponsibilitiesBusiness Responsibilities

DailyChanges

• Reports• Dashboards• List View Management• Documentation Management• User Administration• Solution Management• Communication Templates• Email Templates

IT Responsibilities

• Hotfix / Emergency Release: Immediate fix for showstopper issue(Ad hoc – As required)

• Minor Release: Simple configuration changes that do not impact day to day business or require training. (Target Monthly / Fortnightly)

• Major Release: New Initiatives and other changes that require training or testing. (Target Quarterly)

ScheduledChanges

Page 17: Salesforce Application Lifecycle Management presented to EA Forum by Sam Garforth

Salesforce Sandbox is a Key Part of Building in the Cloud

• Copy of production on same infrastructure• Development tools to build and customize• Change Sets and Templates for faster

deployment• Metadata APIs and IDE for faster development

SANDBOX

PRODUCTION

Page 18: Salesforce Application Lifecycle Management presented to EA Forum by Sam Garforth

Managing Configuration Changes - declarativelyPromote Changes Seamlessly with Change Sets

PRODUCTION

1. Create Sandbox

2. Make Changes

3. Deploy Change Sets

1. Create a new Sandbox in just three 3 clicks

Define acceptable change paths – who can promote changes and to which environments

2. Make changes

3. Bundle and deploy change set with full dependency checking to product or other sandbox

Page 19: Salesforce Application Lifecycle Management presented to EA Forum by Sam Garforth

Tracking Changes

Any change in the application affects the Metadata but not all Metadata is accessible through the Metadata API• The Metadata API is getting better with each new release

Changes supported by the Metadata API

Changes not supported bythe Metadata API or made in the UI

Source Control System(Centralized or Distributed)

Change Log

Metadata API Client(Force.com IDE or Migration Tool)

Web UI Scripting Tool(Selenium…)

Manual(Spreadsheet or Application)

• What application/version• Who made the change• What component has been

changed• When change occurred

• Store securely and share applications sources• Maintain a separate branch for each project and application version• Help managing concurrent access and modifications of sources with file

locking, diff and merge of source files

Page 20: Salesforce Application Lifecycle Management presented to EA Forum by Sam Garforth

Single Sandbox – Scenario for small & quick projects

New custom objects, tabs, and applications

Integrations with other systems

Apps involving Visualforce, workflow, or new validation

rules

New customer/orgSmaller accountNew admins/developer

Org is not liveNo interference with production data

Challenge Addressed

For Whom

How

What

Not being able to track changes going on in production

Page 21: Salesforce Application Lifecycle Management presented to EA Forum by Sam Garforth

Multiple Sandbox – For greater development flexibility

Developing new app/featureInstalling AppExchange AppTesting/QA app

Emerging customer/Single OrgMaturing DeveloperAppex/Partner Projects

Isolate developer environmentNo customizations occur in production org

Conflicts and overwriting changesChallenge Addressed

For Whom

How

What

Page 22: Salesforce Application Lifecycle Management presented to EA Forum by Sam Garforth

Multiple Sandbox – Merge Changes before deploy

Test in the integration sandbox.Migrate changes to a UAT environmentPerform user-acceptance testing.Migrate changes to a staging environment Schedule the release

Enterprise CustomerSingle/multiple orgs

Keeping orgs in sync as a teamIncomplete tracking and logging of changesConflicts and errors discovered while deployment

Create one Developer sandbox per developer

Challenge Addressed

For Whom

How

What

Page 23: Salesforce Application Lifecycle Management presented to EA Forum by Sam Garforth

Sandbox EnvironmentsEnvironments for every stage in the development lifecycle

Developer

Daily RefreshMetadata Only200 MB / 200 MB

Developer Pro

Daily RefreshMetadata Only1 GB / 1 GB

Partial Copy

5-Day RefreshSample Production Data5 GB / 5 GB

Full Copy

29-Day RefreshAll Production DataSame as Production

★ Development★ Testing

★ Development★ Testing★ Continuous Build

★ Continuous Build★ UAT★ Training

★ Integration★ Load Testing★ Staging

Page 24: Salesforce Application Lifecycle Management presented to EA Forum by Sam Garforth

Sandboxes Support robust ALM Environment Management

Production

Full Copy

Developer Pro

Partial Copy

Legend

Developer

Example Architecture

developer

developer

developer

developer

developer

pro

Integrated Dev

developer

pro

QA

partial

copy

Integrated QA

full

copy

Staging

full

copy

full

copy

UAT

Performance Testing

partial

copy

Training

full

copy

ProductionSupport

Production

Page 25: Salesforce Application Lifecycle Management presented to EA Forum by Sam Garforth

Sandboxes Available Per Edition

2550100

Page 26: Salesforce Application Lifecycle Management presented to EA Forum by Sam Garforth

Deployment Tool Options

Page 27: Salesforce Application Lifecycle Management presented to EA Forum by Sam Garforth

Tools: Selecting the right tools for the jobSalesforce Tools and Framework• Force.com IDE (Eclipse based)

• Change Sets (Cloud Deploy)

• Ant/force.com migration tool

3rd Party Tools• Dreamfactory Monarch: Copy, merge, migrate and archive data between

orgs

• Dreamfactory SnapShot: View, compare and push configurations (Metadata)

Customer Tools• Version Control

• Change Management

Dev

Test

Dev

Version Control

Project Branch

BASIC ADVANCED

Cloud Deploy IDE Ant Version

Control

Page 28: Salesforce Application Lifecycle Management presented to EA Forum by Sam Garforth

Managing Configuration Changes – programmatically Integrate (and automate) with version control and continuous integration

Page 29: Salesforce Application Lifecycle Management presented to EA Forum by Sam Garforth

• Dreamfactory Cascade• Copado• Flosum• AutoRabit• GearSet• Odaseva for Salesforce

3rd Party Code Migration Tools

Page 30: Salesforce Application Lifecycle Management presented to EA Forum by Sam Garforth

What does the Salesforce community say?Copado

AutoRABIT

Source: Salesforce.com AppExchange as at 13 July 2016

Page 31: Salesforce Application Lifecycle Management presented to EA Forum by Sam Garforth

Deployment Artifacts - PackagesArtifact Description Best For Limitations

Unmanaged Packages

A collection of application components that can be distributed and installed in other orgs.

• One-time setup of a development environment• A starting point configuration that can be customised

• You can’t make further changes to packaged components using subsequent packages• Requires a Developer Edition org

Managed Packages

A collection of application components with a namespace that can be distributed and installed in other orgs. Managed packages can be listed on the AppExchange and are upgradeable.

• Commercial applications• Functionality you want to add in multiple, possibly non-related orgs

• Access to code is limited or hidden• Unique namespace can be bothersome or a blocker• Difficult to modify or delete components• Requires a Developer Edition org

Page 32: Salesforce Application Lifecycle Management presented to EA Forum by Sam Garforth

Let’s look at what is required for a testing strategy

Testing Strategy

Page 33: Salesforce Application Lifecycle Management presented to EA Forum by Sam Garforth

The Testing CycleDevelopment

User Acceptance Testing

ProductionRelease

Manager

Perform Unit Tests

EvaluateOutcomes

Refactor or Push to QA

Write Code

Quality Assurance

Functional Test

Regression TestAutomated

Smoke Test

End-to-End Performance

TestApproved

Failed

Page 34: Salesforce Application Lifecycle Management presented to EA Forum by Sam Garforth

Test Data in SandboxYou can supply data for testing in sandbox in several ways.• Sandbox templates provide real-world data that makes your testing

environment more closely resemble your production instance. Only available in a Partial Copy or Full sandbox.

• Import external data into your sandbox to make repeatable testing easier because the data set is static and can be relied on not to change.

Page 35: Salesforce Application Lifecycle Management presented to EA Forum by Sam Garforth

Performance & End to End Testing• Governor limits• Significant Transactions:

• Business transactions that are executed in high volume

• Transactions involved in integration with other systems/applications

• Transactions that may be suspect from a design standpoint (complex multi-object dependencies) or contention with respect to other types of transactions.

• User Interface which has complex JavaScript and/or JS remoting• Peak Load

Page 36: Salesforce Application Lifecycle Management presented to EA Forum by Sam Garforth

Security

Website Vulnerabilities Code Scanners

• Cross-site scripting

• Cross-site request forgery

• Authentication, authorization, and session management

• Injection flaws

• Force.com Security Source Code Scanner

• Checkmarx

• The Chimera web scanner

• SonarQube with CodeScan

Test Custom Controllers

Best Practices

Page 37: Salesforce Application Lifecycle Management presented to EA Forum by Sam Garforth

Testing Tools

Page 38: Salesforce Application Lifecycle Management presented to EA Forum by Sam Garforth

Cinnamon & Selenium• Cinnamon uses Selenium to execute actions on a browser• Selenium is a de-facto browser-based automation tool for web applications today• Selenium supports all modern web browsers• Salesforce R&D uses Selenium for internal GUI test automation and we have strong expertise and experience with

Selenium• By using a cloud-solution such as Sauce Labs, you can run your tests on more than 150 OS/Browser combinations

without having any hardware setup

Page 39: Salesforce Application Lifecycle Management presented to EA Forum by Sam Garforth

Next Generation Developer Experience

SF/DX

Page 40: Salesforce Application Lifecycle Management presented to EA Forum by Sam Garforth

Next Generation Developer Experience

For more info see

https://developer.salesforce.com/blogs/developer-relations/2016/12/salesforce-dx-source-driven-development.html

and the videos that it links to

Page 41: Salesforce Application Lifecycle Management presented to EA Forum by Sam Garforth

Thank Y u

Sam GarforthPrincipal Technical Architect

@samjgarforth