SlideShare a Scribd company logo
1 of 33
TO BE REPLACED
Forward-Looking Statement
Statement 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 / #forcewebinar
▪ 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
Have Questions?
Agenda
1. Advanced Apps for Lightning Experience
2. Lightning Component Architecture
3. Lightning Utility Bar
4. Designing for Performance
Advanced Apps for Lightning
Experience
Let’s define the scope…
 Native, built from the ground-up for Lightning Experience
 Some functionality exposed in Salesforce1
 Combines declarative and programmatic elements
 Does not conform to 80% declarative / 20% programmatic
 UX driven mostly by custom Lightning Components
 Customised using declarative tools (e.g. App Builder, Metadata, Utility Bar)
 Examples:
 Significant customisation of Sales Cloud
 Horizontal apps such as HR, Accounting
 Vertical apps such as Insurance, Retail, Public Sector
What is an Advanced Lightning App?
 Designed from the ground-up for Lightning Experience
- Some functionality exposed in Salesforce1
 Combines declarative and programmatic elements
- Does not conform to 80% declarative / 20% programmatic
- UX driven mostly by custom Lightning Components
- Customised using declarative tools (e.g. App Builder, Metadata, Utility Bar)
 Examples:
- Significant customisation of Sales Cloud
- Horizontal apps such as HR, Accounting
- Vertical apps such as Real Estate, Insurance, Retail, Public Sector
How can I design
this app?
Lightning toolkit
Declarative Programmatic
Lightning Apps
Lightning Pages
Lightning Utility Bar
Lightning Actions
Tabs
+
Metadata (Custom Objects, CMT)
Data Model
Security Model
Standard Events
Base/Standard Lightning Components
Custom Lightning Components/Events
Lightning Design System
Lightning Data Service
+
Visualforce
Apex/SOQL/SOSL/APIs
Lightning Component Architecture
Lightning Component Architecture
Purpose Markup Comments
Service Components
Extended/used by other
components
Handle server calls
Shared code base
Minimal Extensible = true
Helper Components
Event interaction
Metadata caching
Minimal When applicable
Building Block
Components
Implement UX
functionality at different
levels of granularity
Base Lightning Components
Lightning Design System
Building Block
Components/Content
Majority of code
Experience
Components
Available in App Builder /
AppExchange for
Components
Building Block
Components/Content
Simple:
Lightning Data Service
Advanced:
Dynamic if applicable
Potentially metadata-driven
Lightning Components – Release Roadmap
Release Theme Components
Spring ‘17 Adding depth to single
record foundational
components
Eg: avatar,
inputSearch,
inputSelect, picklist,
inputRichText, tile, pill,
modal and notification
Summer ‘17 Introducing experience
and databound
components
Eg: inputField,
outputField, list, lookup
Service Component: Example
<aura:component description=”ServiceComponent" extensible="true">
<div>{!v.body}</div>
</aura:component>
callToServer function:
Parameters:
Name of Apex @AuraEnabled Method
Method Parameters
Action properties:
setAbortable()
setStorable() + ignoreExisting
setBackground()
Fires $A.enqueueAction(), defines callback function
Component Markup
Client-side Helper
Service Component: Example
<c:ServiceComponent/> <c:UtilityBarMenu/> UtilityBarController
UtilityBarConfig__c
<c:CardListView/> CardListViewController
Account Opportunity Custom__c
Apex
+
SOQL
Dynamic
Apex
+
SOQL
extends c:serviceComponent
extends c:serviceComponent
Example Experience Components
Designing a custom Experience Component
Dynamic, metadata-driven Components
 Support your own use cases
 When possible support any SObject
 Maximise code reusability
 Simplify component logic
 Providing admins with a greater degree of
flexibility…
 ... while simplifying App Builder experience Field to filter on
Standard actions available
Lightning actions available
Columns to display
SOQL query
Card List View title
Number of rows
Enable pagination
Reference to metadata record
Metadata:
App Builder attributes:
Component Tree: custom Card List View
<c:CardListView/>
<c:Header/> <c:Table/> <c:Footer/>
<c:GenericListView/>
<c:TableData/>
<c:OutputField/>
<c:OutputField/>
<c:OutputField/>
<lightning:buttonMenu/>
<lightning:buttonMenu/>
<lightning:buttonMenu/>
<lightning:(…)/><ui:(…)/> <c:Action/>
<lightning:buttonGroup/> <c:Pagination/>
App Builder
Attributes (incl.
Metadata reference)
Which type of list
view?
Handle UI events
What data to render?
Which actions?
Renders data and
actions
Record selection
Render filters?
Which mass actions?
Display and fire mass
actions
Display and fire
record-level actions
Links e.g.
Visualforce, Record
Home Page
Render pagination?
Or link to list view?
Display and fire
pagination events
Component event
bubbles up, handled,
pagination attributes
updated
How do I fire
platform actions?
Firing Platform Actions
 Which actions to display?
Metadata – pre-selected actions
Display all available actions for SObject in specific context
 Query PlatformAction object to obtain action type e.g.:
Action Type Examples Implementation
Standard Action View, Edit Fire createRecord, editRecord event
Visualforce Action E-mail PDF CV Fire force:navigateToURL event
Lightning Action Reject Candidate
Display Modal, inject Lightning Component, pass
appropriate parameters
Lightning Utility Bar
Utility Bar Overview
 Always available
 Unique per app
 Flexipage containing a number of Lightning
Components – Standard or custom
 Customisable via UI (Spring ‘17)
 Component Properties:
Height + Width
Icon + Label
Background Load
Dynamic Content in the Utility Bar
<c:UtilityBarMenu/> UtilityBarController
UtilityBarConfig__c
Menu
Metadata
Handles c:PageChanged events
<c:CardListView/>
<c:PageChanged/>
Application Event
On click
Containing e.g. help
button
Designing for Performance
SOQL Queries Limit
 Typical of chatty custom Experience Components
 Cause:
Calls to server on init are aggregated into same Apex transaction
 Mitigation:
Use Lightning Data Service when possible
Use cached data (for static data/metadata)
Leverage Custom Metadata Types
 Do not count against SOQL Limits
Use setBackground() on calls to server
 Calls processed separately, designed for lower priority calls but generally processed quickly
Chain component loading by groups
 Last component to load in a group fires application event to load 2nd group – and so on
Performance Best Practices
 Enable Secure Cache and LockerService
 Disable Lightning Components debugging
 Use Lightning Data Service when possible
 Lazy load when appropriate
 Load data upon user intervention (e.g. click)
 Pre-load when possible
 Load data in background (especially static data)
 Use setStorable() on calls to server
 Local cache provides recent copy of data. Separate call to server takes place to obtain refreshed
copy
 Implement data store for metadata/data that remains static
Demo
New York City
December 15, 2016
Join us at the
Salesforce World Tour
http://www.salesforce.com/events/worldtour/nyc/
Survey
Your feedback is crucial to the success
of our webinar programs. Thank you!
http://bit.ly/BestLightning
Q & A
Try Trailhead: trailhead.salesforce.com
Join the conversation: @salesforcedevs
Thank You

More Related Content

What's hot

Lightning Design System and Components for Visualforce Developers
Lightning Design System and Components for Visualforce DevelopersLightning Design System and Components for Visualforce Developers
Lightning Design System and Components for Visualforce DevelopersSalesforce Developers
 
Secure Development on the Salesforce Platform - Part I
Secure Development on the Salesforce Platform - Part ISecure Development on the Salesforce Platform - Part I
Secure Development on the Salesforce Platform - Part ISalesforce Developers
 
Secure Development on the Salesforce Platform - Part 3
Secure Development on the Salesforce Platform - Part 3Secure Development on the Salesforce Platform - Part 3
Secure Development on the Salesforce Platform - Part 3Mark Adcock
 
Lightning Updates: Summer, Winter & Beyond
Lightning Updates: Summer, Winter & BeyondLightning Updates: Summer, Winter & Beyond
Lightning Updates: Summer, Winter & BeyondSalesforce Developers
 
Secure Salesforce: Lightning Components Best Practices
Secure Salesforce: Lightning Components Best PracticesSecure Salesforce: Lightning Components Best Practices
Secure Salesforce: Lightning Components Best PracticesSalesforce Developers
 
Introduction to the Wave Platform API
Introduction to the Wave Platform APIIntroduction to the Wave Platform API
Introduction to the Wave Platform APISalesforce Developers
 
Building a Single Page App with Lightning Components
Building a Single Page App with Lightning ComponentsBuilding a Single Page App with Lightning Components
Building a Single Page App with Lightning ComponentsSalesforce Developers
 
Build Faster with Base Lightning Components
Build Faster with Base Lightning ComponentsBuild Faster with Base Lightning Components
Build Faster with Base Lightning ComponentsSalesforce Developers
 
Building apps faster with lightning and winter '17
Building apps faster with lightning and winter '17Building apps faster with lightning and winter '17
Building apps faster with lightning and winter '17Salesforce Developers
 
#Df17 Recap Series Build Apps Faster with the Salesforce Platform
#Df17 Recap Series Build Apps Faster with the Salesforce Platform #Df17 Recap Series Build Apps Faster with the Salesforce Platform
#Df17 Recap Series Build Apps Faster with the Salesforce Platform Salesforce Developers
 
Lightning web components episode 2- work with salesforce data
Lightning web components   episode 2- work with salesforce dataLightning web components   episode 2- work with salesforce data
Lightning web components episode 2- work with salesforce dataSalesforce Developers
 
Salesforce.com API Series: Service Cloud Console Deep Dive
Salesforce.com API Series: Service Cloud Console Deep DiveSalesforce.com API Series: Service Cloud Console Deep Dive
Salesforce.com API Series: Service Cloud Console Deep DiveSalesforce Developers
 
Lightning web components - Episode 4 : Security and Testing
Lightning web components  - Episode 4 : Security and TestingLightning web components  - Episode 4 : Security and Testing
Lightning web components - Episode 4 : Security and TestingSalesforce Developers
 
Building JavaScript Applications on the Salesforce1 Platform
Building JavaScript Applications on the Salesforce1 PlatformBuilding JavaScript Applications on the Salesforce1 Platform
Building JavaScript Applications on the Salesforce1 PlatformSalesforce Developers
 
Process Automation on Lightning Platform Workshop
Process Automation on Lightning Platform WorkshopProcess Automation on Lightning Platform Workshop
Process Automation on Lightning Platform WorkshopSalesforce Developers
 
sf tools from community
sf tools from communitysf tools from community
sf tools from communityDurgesh Dhoot
 
Webinar: Build Apps Customers Love as a Salesforce Developer
Webinar: Build Apps Customers Love as a Salesforce DeveloperWebinar: Build Apps Customers Love as a Salesforce Developer
Webinar: Build Apps Customers Love as a Salesforce DeveloperSalesforce Developers
 

What's hot (20)

Lightning Design System and Components for Visualforce Developers
Lightning Design System and Components for Visualforce DevelopersLightning Design System and Components for Visualforce Developers
Lightning Design System and Components for Visualforce Developers
 
Secure Development on the Salesforce Platform - Part I
Secure Development on the Salesforce Platform - Part ISecure Development on the Salesforce Platform - Part I
Secure Development on the Salesforce Platform - Part I
 
Coding in the App Cloud
Coding in the App CloudCoding in the App Cloud
Coding in the App Cloud
 
Secure Development on the Salesforce Platform - Part 3
Secure Development on the Salesforce Platform - Part 3Secure Development on the Salesforce Platform - Part 3
Secure Development on the Salesforce Platform - Part 3
 
Lightning Updates: Summer, Winter & Beyond
Lightning Updates: Summer, Winter & BeyondLightning Updates: Summer, Winter & Beyond
Lightning Updates: Summer, Winter & Beyond
 
Secure Salesforce: Lightning Components Best Practices
Secure Salesforce: Lightning Components Best PracticesSecure Salesforce: Lightning Components Best Practices
Secure Salesforce: Lightning Components Best Practices
 
Introduction to the Wave Platform API
Introduction to the Wave Platform APIIntroduction to the Wave Platform API
Introduction to the Wave Platform API
 
Building a Single Page App with Lightning Components
Building a Single Page App with Lightning ComponentsBuilding a Single Page App with Lightning Components
Building a Single Page App with Lightning Components
 
Build Faster with Base Lightning Components
Build Faster with Base Lightning ComponentsBuild Faster with Base Lightning Components
Build Faster with Base Lightning Components
 
Building apps faster with lightning and winter '17
Building apps faster with lightning and winter '17Building apps faster with lightning and winter '17
Building apps faster with lightning and winter '17
 
#Df17 Recap Series Build Apps Faster with the Salesforce Platform
#Df17 Recap Series Build Apps Faster with the Salesforce Platform #Df17 Recap Series Build Apps Faster with the Salesforce Platform
#Df17 Recap Series Build Apps Faster with the Salesforce Platform
 
Lightning web components episode 2- work with salesforce data
Lightning web components   episode 2- work with salesforce dataLightning web components   episode 2- work with salesforce data
Lightning web components episode 2- work with salesforce data
 
SLDS and Lightning Components
SLDS and Lightning ComponentsSLDS and Lightning Components
SLDS and Lightning Components
 
Salesforce.com API Series: Service Cloud Console Deep Dive
Salesforce.com API Series: Service Cloud Console Deep DiveSalesforce.com API Series: Service Cloud Console Deep Dive
Salesforce.com API Series: Service Cloud Console Deep Dive
 
Lightning web components - Episode 4 : Security and Testing
Lightning web components  - Episode 4 : Security and TestingLightning web components  - Episode 4 : Security and Testing
Lightning web components - Episode 4 : Security and Testing
 
Building JavaScript Applications on the Salesforce1 Platform
Building JavaScript Applications on the Salesforce1 PlatformBuilding JavaScript Applications on the Salesforce1 Platform
Building JavaScript Applications on the Salesforce1 Platform
 
Process Automation on Lightning Platform Workshop
Process Automation on Lightning Platform WorkshopProcess Automation on Lightning Platform Workshop
Process Automation on Lightning Platform Workshop
 
Winter'18 Developer Preview Webinar
Winter'18 Developer Preview WebinarWinter'18 Developer Preview Webinar
Winter'18 Developer Preview Webinar
 
sf tools from community
sf tools from communitysf tools from community
sf tools from community
 
Webinar: Build Apps Customers Love as a Salesforce Developer
Webinar: Build Apps Customers Love as a Salesforce DeveloperWebinar: Build Apps Customers Love as a Salesforce Developer
Webinar: Build Apps Customers Love as a Salesforce Developer
 

Similar to Best Practices for Lightning Apps

Learn MOAR Winter '20 Developer Community
Learn MOAR Winter '20 Developer Community Learn MOAR Winter '20 Developer Community
Learn MOAR Winter '20 Developer Community Federico Giust
 
Building Apps Faster with Lightning and Winter '17
Building Apps Faster with Lightning and Winter '17Building Apps Faster with Lightning and Winter '17
Building Apps Faster with Lightning and Winter '17Mark Adcock
 
Building Lightning Components for ISVs (Dreamforce 2015)
Building Lightning Components for ISVs (Dreamforce 2015)Building Lightning Components for ISVs (Dreamforce 2015)
Building Lightning Components for ISVs (Dreamforce 2015)Salesforce Partners
 
Lightning Component Framework from 0 to App
Lightning Component Framework from 0 to AppLightning Component Framework from 0 to App
Lightning Component Framework from 0 to AppDiego Szuster Marçal
 
Trailhead live - Overview of Salesforce App Cloud
Trailhead live - Overview of Salesforce App CloudTrailhead live - Overview of Salesforce App Cloud
Trailhead live - Overview of Salesforce App CloudJohn Stevenson
 
Trailhead in a Box & Winter 20 Release
Trailhead in a Box & Winter 20 ReleaseTrailhead in a Box & Winter 20 Release
Trailhead in a Box & Winter 20 ReleaseJayant Jindal
 
Salesforce API: Salesforce Console Deep Dive
Salesforce API: Salesforce Console Deep DiveSalesforce API: Salesforce Console Deep Dive
Salesforce API: Salesforce Console Deep DiveSalesforce Developers
 
Salesforce Spring19 Release Overview Deck
Salesforce Spring19 Release Overview DeckSalesforce Spring19 Release Overview Deck
Salesforce Spring19 Release Overview DeckRoy Gilad
 
Building Visualforce Custom Events Handlers
Building Visualforce Custom Events HandlersBuilding Visualforce Custom Events Handlers
Building Visualforce Custom Events HandlersSalesforce Developers
 
Real Time Integration with Salesforce Platform Events
Real Time Integration with Salesforce Platform EventsReal Time Integration with Salesforce Platform Events
Real Time Integration with Salesforce Platform EventsSalesforce Developers
 
Salesforce Summer 19 Release Overview
Salesforce Summer 19 Release OverviewSalesforce Summer 19 Release Overview
Salesforce Summer 19 Release OverviewRoy Gilad
 
ISV Monthly Tech Enablement (August 2017)
ISV Monthly Tech Enablement (August 2017)ISV Monthly Tech Enablement (August 2017)
ISV Monthly Tech Enablement (August 2017)Salesforce Partners
 
Boxcars and Cabooses: When One More XHR Is Too Much
Boxcars and Cabooses: When One More XHR Is Too MuchBoxcars and Cabooses: When One More XHR Is Too Much
Boxcars and Cabooses: When One More XHR Is Too MuchPeter Chittum
 
Lightning Reports - Dreamforce 2015
Lightning Reports - Dreamforce 2015Lightning Reports - Dreamforce 2015
Lightning Reports - Dreamforce 2015Daniel Peter
 
Salesforce Lightning Component Framework Roadmap (TDX18)
Salesforce Lightning Component Framework Roadmap (TDX18)Salesforce Lightning Component Framework Roadmap (TDX18)
Salesforce Lightning Component Framework Roadmap (TDX18)Developer Force
 
Forcelandia 2016 Wave App Development
Forcelandia 2016   Wave App DevelopmentForcelandia 2016   Wave App Development
Forcelandia 2016 Wave App DevelopmentSkip Sauls
 
A Beginner's Guide to Lightning Components by Niels Bryna-Low
A Beginner's Guide to Lightning Components by Niels Bryna-LowA Beginner's Guide to Lightning Components by Niels Bryna-Low
A Beginner's Guide to Lightning Components by Niels Bryna-LowSalesforce Admins
 

Similar to Best Practices for Lightning Apps (20)

Learn MOAR Winter '20 Developer Community
Learn MOAR Winter '20 Developer Community Learn MOAR Winter '20 Developer Community
Learn MOAR Winter '20 Developer Community
 
Building Apps Faster with Lightning and Winter '17
Building Apps Faster with Lightning and Winter '17Building Apps Faster with Lightning and Winter '17
Building Apps Faster with Lightning and Winter '17
 
Building Lightning Components for ISVs (Dreamforce 2015)
Building Lightning Components for ISVs (Dreamforce 2015)Building Lightning Components for ISVs (Dreamforce 2015)
Building Lightning Components for ISVs (Dreamforce 2015)
 
Lightning Component Framework from 0 to App
Lightning Component Framework from 0 to AppLightning Component Framework from 0 to App
Lightning Component Framework from 0 to App
 
Trailhead live - Overview of Salesforce App Cloud
Trailhead live - Overview of Salesforce App CloudTrailhead live - Overview of Salesforce App Cloud
Trailhead live - Overview of Salesforce App Cloud
 
Trailhead in a Box & Winter 20 Release
Trailhead in a Box & Winter 20 ReleaseTrailhead in a Box & Winter 20 Release
Trailhead in a Box & Winter 20 Release
 
Salesforce Lightning workshop
Salesforce Lightning workshopSalesforce Lightning workshop
Salesforce Lightning workshop
 
Lightning Components: The Future
Lightning Components: The FutureLightning Components: The Future
Lightning Components: The Future
 
Salesforce API: Salesforce Console Deep Dive
Salesforce API: Salesforce Console Deep DiveSalesforce API: Salesforce Console Deep Dive
Salesforce API: Salesforce Console Deep Dive
 
Salesforce Spring19 Release Overview Deck
Salesforce Spring19 Release Overview DeckSalesforce Spring19 Release Overview Deck
Salesforce Spring19 Release Overview Deck
 
Building Visualforce Custom Events Handlers
Building Visualforce Custom Events HandlersBuilding Visualforce Custom Events Handlers
Building Visualforce Custom Events Handlers
 
Salesforce platform session 2
 Salesforce platform session 2 Salesforce platform session 2
Salesforce platform session 2
 
Real Time Integration with Salesforce Platform Events
Real Time Integration with Salesforce Platform EventsReal Time Integration with Salesforce Platform Events
Real Time Integration with Salesforce Platform Events
 
Salesforce Summer 19 Release Overview
Salesforce Summer 19 Release OverviewSalesforce Summer 19 Release Overview
Salesforce Summer 19 Release Overview
 
ISV Monthly Tech Enablement (August 2017)
ISV Monthly Tech Enablement (August 2017)ISV Monthly Tech Enablement (August 2017)
ISV Monthly Tech Enablement (August 2017)
 
Boxcars and Cabooses: When One More XHR Is Too Much
Boxcars and Cabooses: When One More XHR Is Too MuchBoxcars and Cabooses: When One More XHR Is Too Much
Boxcars and Cabooses: When One More XHR Is Too Much
 
Lightning Reports - Dreamforce 2015
Lightning Reports - Dreamforce 2015Lightning Reports - Dreamforce 2015
Lightning Reports - Dreamforce 2015
 
Salesforce Lightning Component Framework Roadmap (TDX18)
Salesforce Lightning Component Framework Roadmap (TDX18)Salesforce Lightning Component Framework Roadmap (TDX18)
Salesforce Lightning Component Framework Roadmap (TDX18)
 
Forcelandia 2016 Wave App Development
Forcelandia 2016   Wave App DevelopmentForcelandia 2016   Wave App Development
Forcelandia 2016 Wave App Development
 
A Beginner's Guide to Lightning Components by Niels Bryna-Low
A Beginner's Guide to Lightning Components by Niels Bryna-LowA Beginner's Guide to Lightning Components by Niels Bryna-Low
A Beginner's Guide to Lightning Components by Niels Bryna-Low
 

Recently uploaded

SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanySuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanyChristoph Pohl
 
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Matt Ray
 
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...Natan Silnitsky
 
Folding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesFolding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesPhilip Schwarz
 
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsAhmed Mohamed
 
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...confluent
 
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024StefanoLambiase
 
英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作qr0udbr0
 
Buds n Tech IT Solutions: Top-Notch Web Services in Noida
Buds n Tech IT Solutions: Top-Notch Web Services in NoidaBuds n Tech IT Solutions: Top-Notch Web Services in Noida
Buds n Tech IT Solutions: Top-Notch Web Services in Noidabntitsolutionsrishis
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityNeo4j
 
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company OdishaBalasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odishasmiwainfosol
 
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样umasea
 
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...Angel Borroy López
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio, Inc.
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...stazi3110
 
React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaReact Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaHanief Utama
 
Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)Ahmed Mater
 
How to Track Employee Performance A Comprehensive Guide.pdf
How to Track Employee Performance A Comprehensive Guide.pdfHow to Track Employee Performance A Comprehensive Guide.pdf
How to Track Employee Performance A Comprehensive Guide.pdfLivetecs LLC
 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Andreas Granig
 

Recently uploaded (20)

SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanySuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
 
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
 
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
 
Folding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesFolding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a series
 
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML Diagrams
 
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
 
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
 
英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作
 
Buds n Tech IT Solutions: Top-Notch Web Services in Noida
Buds n Tech IT Solutions: Top-Notch Web Services in NoidaBuds n Tech IT Solutions: Top-Notch Web Services in Noida
Buds n Tech IT Solutions: Top-Notch Web Services in Noida
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered Sustainability
 
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company OdishaBalasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
 
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
 
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
 
React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaReact Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief Utama
 
Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)
 
Advantages of Odoo ERP 17 for Your Business
Advantages of Odoo ERP 17 for Your BusinessAdvantages of Odoo ERP 17 for Your Business
Advantages of Odoo ERP 17 for Your Business
 
How to Track Employee Performance A Comprehensive Guide.pdf
How to Track Employee Performance A Comprehensive Guide.pdfHow to Track Employee Performance A Comprehensive Guide.pdf
How to Track Employee Performance A Comprehensive Guide.pdf
 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024
 

Best Practices for Lightning Apps

  • 2. Forward-Looking Statement Statement 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.
  • 3. 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 / #forcewebinar
  • 4. ▪ 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 Have Questions?
  • 5. Agenda 1. Advanced Apps for Lightning Experience 2. Lightning Component Architecture 3. Lightning Utility Bar 4. Designing for Performance
  • 6. Advanced Apps for Lightning Experience
  • 7.
  • 8. Let’s define the scope…  Native, built from the ground-up for Lightning Experience  Some functionality exposed in Salesforce1  Combines declarative and programmatic elements  Does not conform to 80% declarative / 20% programmatic  UX driven mostly by custom Lightning Components  Customised using declarative tools (e.g. App Builder, Metadata, Utility Bar)  Examples:  Significant customisation of Sales Cloud  Horizontal apps such as HR, Accounting  Vertical apps such as Insurance, Retail, Public Sector
  • 9. What is an Advanced Lightning App?  Designed from the ground-up for Lightning Experience - Some functionality exposed in Salesforce1  Combines declarative and programmatic elements - Does not conform to 80% declarative / 20% programmatic - UX driven mostly by custom Lightning Components - Customised using declarative tools (e.g. App Builder, Metadata, Utility Bar)  Examples: - Significant customisation of Sales Cloud - Horizontal apps such as HR, Accounting - Vertical apps such as Real Estate, Insurance, Retail, Public Sector
  • 10. How can I design this app?
  • 11. Lightning toolkit Declarative Programmatic Lightning Apps Lightning Pages Lightning Utility Bar Lightning Actions Tabs + Metadata (Custom Objects, CMT) Data Model Security Model Standard Events Base/Standard Lightning Components Custom Lightning Components/Events Lightning Design System Lightning Data Service + Visualforce Apex/SOQL/SOSL/APIs
  • 13. Lightning Component Architecture Purpose Markup Comments Service Components Extended/used by other components Handle server calls Shared code base Minimal Extensible = true Helper Components Event interaction Metadata caching Minimal When applicable Building Block Components Implement UX functionality at different levels of granularity Base Lightning Components Lightning Design System Building Block Components/Content Majority of code Experience Components Available in App Builder / AppExchange for Components Building Block Components/Content Simple: Lightning Data Service Advanced: Dynamic if applicable Potentially metadata-driven
  • 14. Lightning Components – Release Roadmap Release Theme Components Spring ‘17 Adding depth to single record foundational components Eg: avatar, inputSearch, inputSelect, picklist, inputRichText, tile, pill, modal and notification Summer ‘17 Introducing experience and databound components Eg: inputField, outputField, list, lookup
  • 15. Service Component: Example <aura:component description=”ServiceComponent" extensible="true"> <div>{!v.body}</div> </aura:component> callToServer function: Parameters: Name of Apex @AuraEnabled Method Method Parameters Action properties: setAbortable() setStorable() + ignoreExisting setBackground() Fires $A.enqueueAction(), defines callback function Component Markup Client-side Helper
  • 16. Service Component: Example <c:ServiceComponent/> <c:UtilityBarMenu/> UtilityBarController UtilityBarConfig__c <c:CardListView/> CardListViewController Account Opportunity Custom__c Apex + SOQL Dynamic Apex + SOQL extends c:serviceComponent extends c:serviceComponent
  • 18. Designing a custom Experience Component
  • 19. Dynamic, metadata-driven Components  Support your own use cases  When possible support any SObject  Maximise code reusability  Simplify component logic  Providing admins with a greater degree of flexibility…  ... while simplifying App Builder experience Field to filter on Standard actions available Lightning actions available Columns to display SOQL query Card List View title Number of rows Enable pagination Reference to metadata record Metadata: App Builder attributes:
  • 20. Component Tree: custom Card List View <c:CardListView/> <c:Header/> <c:Table/> <c:Footer/> <c:GenericListView/> <c:TableData/> <c:OutputField/> <c:OutputField/> <c:OutputField/> <lightning:buttonMenu/> <lightning:buttonMenu/> <lightning:buttonMenu/> <lightning:(…)/><ui:(…)/> <c:Action/> <lightning:buttonGroup/> <c:Pagination/> App Builder Attributes (incl. Metadata reference) Which type of list view? Handle UI events What data to render? Which actions? Renders data and actions Record selection Render filters? Which mass actions? Display and fire mass actions Display and fire record-level actions Links e.g. Visualforce, Record Home Page Render pagination? Or link to list view? Display and fire pagination events Component event bubbles up, handled, pagination attributes updated
  • 21. How do I fire platform actions?
  • 22. Firing Platform Actions  Which actions to display? Metadata – pre-selected actions Display all available actions for SObject in specific context  Query PlatformAction object to obtain action type e.g.: Action Type Examples Implementation Standard Action View, Edit Fire createRecord, editRecord event Visualforce Action E-mail PDF CV Fire force:navigateToURL event Lightning Action Reject Candidate Display Modal, inject Lightning Component, pass appropriate parameters
  • 24. Utility Bar Overview  Always available  Unique per app  Flexipage containing a number of Lightning Components – Standard or custom  Customisable via UI (Spring ‘17)  Component Properties: Height + Width Icon + Label Background Load
  • 25. Dynamic Content in the Utility Bar <c:UtilityBarMenu/> UtilityBarController UtilityBarConfig__c Menu Metadata Handles c:PageChanged events <c:CardListView/> <c:PageChanged/> Application Event On click Containing e.g. help button
  • 27. SOQL Queries Limit  Typical of chatty custom Experience Components  Cause: Calls to server on init are aggregated into same Apex transaction  Mitigation: Use Lightning Data Service when possible Use cached data (for static data/metadata) Leverage Custom Metadata Types  Do not count against SOQL Limits Use setBackground() on calls to server  Calls processed separately, designed for lower priority calls but generally processed quickly Chain component loading by groups  Last component to load in a group fires application event to load 2nd group – and so on
  • 28. Performance Best Practices  Enable Secure Cache and LockerService  Disable Lightning Components debugging  Use Lightning Data Service when possible  Lazy load when appropriate  Load data upon user intervention (e.g. click)  Pre-load when possible  Load data in background (especially static data)  Use setStorable() on calls to server  Local cache provides recent copy of data. Separate call to server takes place to obtain refreshed copy  Implement data store for metadata/data that remains static
  • 29. Demo
  • 30. New York City December 15, 2016 Join us at the Salesforce World Tour http://www.salesforce.com/events/worldtour/nyc/
  • 31. Survey Your feedback is crucial to the success of our webinar programs. Thank you! http://bit.ly/BestLightning
  • 32. Q & A Try Trailhead: trailhead.salesforce.com Join the conversation: @salesforcedevs