SlideShare a Scribd company logo
Advanced Lightning Components
​ Skip Sauls
​ Director of Product Management
​ ssauls@salesforce.com
​ @SkipSauls
​ 
​ Kris Gray
​ PMTS, Aura Framework
​ kgray@salesforce.com
​ @grayjustise
​ 
​ John Buchanan
​ PMTS, Aura Framework
​ jbuchanan@salesforce.com
​ 
​ Safe harbor 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.
Safe Harbor
​ Overview
​ Best Practices
​ Debugging
​ Demos
​ Q&A
Agenda
Advanced Lightning Components
​ Use createComponent
•  newComponentAsync and other variants are being deprecated
​ Use $A when accessing APIs
•  “aura” is being deprecated
​ Avoid method name collisions
•  Use unique method names for server vs. client-side methods
​ Use the official API
•  Don’t use undocumented members on $A or components
​ Efficient events
•  Don’t handle your own events
​ Don’t use setTimeout
Best Practices
Advanced Lightning Components
​ Component Lifecycle
•  Ensure that you really need to use a renderer
​ DOM Manipulation
•  “If you didn’t create it, don’t touch it.” – Doug Chasman
​ CSS
•  Always use properly namespaced rules – See above about not touching things you don’t own
​ 3rd Party Libraries
•  Ensure that you really need to load jQuery, Bootstrap, etc. before doing so
•  Remember that these aren’t single-page applications (SPAs), especially in mobile clients
​ Use Actions
•  Actions are optimized by the framework, unlike XHRs
Best Practices
Advanced Lightning Components
•  Many apps such as Salesforce1 and
Lightning Experience catch most
exceptions to provide a better user
experience.
•  Enable features such as “Pause On
Caught Exceptions” in the browser
debugger to ensure that you don’t
miss something.
Debugging – Client Side
Advanced Lightning Components
Google Chrome
Developer Tools
Apple Safari
Web Inspector
Mozilla Firefox
Firebug
Mozilla Firefox
Developer Tools
Microsoft Edge
Developer Tools
Microsoft IE11
Developer Tools
​ Use the debugger statement
​ Enable Pause on Caught Exceptions
​ Turn on Debug for Lightning Components
​ Leverage the browser Developer Tools features
​ Debug on more than one client
Debugging – Client Side
Advanced Lightning Components
Demos
Q&A
Thank you

More Related Content

PDF
Lightning Components - Advanced Features
PDF
Customizing Salesforce User Interfaces with Lightning Components
PDF
Lightning Out: Components for the Rest of the World
PPTX
Building apps faster with lightning and winter '17
PPTX
Lightning Components Introduction
PPTX
Best Practices for Lightning Apps
PDF
SLDS and Lightning Components
PPTX
Build and Package Lightning Components for Lightning Exchange
Lightning Components - Advanced Features
Customizing Salesforce User Interfaces with Lightning Components
Lightning Out: Components for the Rest of the World
Building apps faster with lightning and winter '17
Lightning Components Introduction
Best Practices for Lightning Apps
SLDS and Lightning Components
Build and Package Lightning Components for Lightning Exchange

What's hot (20)

PDF
Secure Salesforce: Lightning Components Best Practices
PPTX
Building a Single Page App with Lightning Components
PPTX
Lightning Updates: Summer, Winter & Beyond
PDF
Easy REST Integrations with Lightning Components and Salesforce1
PPTX
Diving Into Heroku Private Spaces
PDF
Javascript Security and Lightning Locker Service
PPTX
Webinar: Build Apps Customers Love as a Salesforce Developer
PPTX
Build Apps Visually with Lightning App Builder
PPTX
Intro to Lightning Components - Dreamforce 2016
PPTX
Secure Development on the Salesforce Platform - Part 3
PPTX
Winter'18 Developer Preview Webinar
PPTX
Unleash the Power of Apex Realtime Debugger
PPTX
Migrating Visualforce Pages to Lightning
PPTX
Build Better Communities with Lightning
PPTX
Snap-in Service to Web and Mobile Apps
PPTX
Preparing for Lightning: Replacing URL Hacks with Actions
PPTX
Process Automation on Lightning Platform Workshop
PPTX
Lightning Developer Experience, Eclipse IDE Evolved
PPTX
Build custom user interfaces for your Salesforce data with the UI API
PPTX
#Df17 Recap Series Build Apps Faster with the Salesforce Platform
Secure Salesforce: Lightning Components Best Practices
Building a Single Page App with Lightning Components
Lightning Updates: Summer, Winter & Beyond
Easy REST Integrations with Lightning Components and Salesforce1
Diving Into Heroku Private Spaces
Javascript Security and Lightning Locker Service
Webinar: Build Apps Customers Love as a Salesforce Developer
Build Apps Visually with Lightning App Builder
Intro to Lightning Components - Dreamforce 2016
Secure Development on the Salesforce Platform - Part 3
Winter'18 Developer Preview Webinar
Unleash the Power of Apex Realtime Debugger
Migrating Visualforce Pages to Lightning
Build Better Communities with Lightning
Snap-in Service to Web and Mobile Apps
Preparing for Lightning: Replacing URL Hacks with Actions
Process Automation on Lightning Platform Workshop
Lightning Developer Experience, Eclipse IDE Evolved
Build custom user interfaces for your Salesforce data with the UI API
#Df17 Recap Series Build Apps Faster with the Salesforce Platform
Ad

Viewers also liked (20)

PPTX
Mastering the Lightning Framework - Part 1
PPTX
Lightning Components Workshop
PDF
Advanced designs for reusable lightning components
PPTX
Mastering the Lightning Framework - Part 2
PDF
Workbook for Lightning Developers
PDF
JavaScript Patterns and Practices from the Salesforce Experts
PPTX
Aura Framework and Lightning (Nikolay Zenko and Alexey Filippov)
PDF
Setting up Security in Your Salesforce Instance
PPTX
Building Apps Faster with Lightning and Winter '17
PPTX
Integrating The Cloud - How to integrate Salesforce
PPTX
Lightning Sessions for Salesforce Admins at Dreamforce 2016
PPTX
Lightning Component - Components, Actions and Events
PPTX
Five Steps to Effective, Efficient and Evolutionary Process Flows
PDF
RESTful API - Retour d'expérience
PDF
Secure Salesforce: External App Integrations
PPTX
Roadmap Lightning Updates (November 3, 2016)
PPTX
Docker 1.5
PDF
Gestion des risques contractuels / HEG Genève
PDF
Aura Framework Overview
PDF
Le cycle de vie de la gestion des risques
Mastering the Lightning Framework - Part 1
Lightning Components Workshop
Advanced designs for reusable lightning components
Mastering the Lightning Framework - Part 2
Workbook for Lightning Developers
JavaScript Patterns and Practices from the Salesforce Experts
Aura Framework and Lightning (Nikolay Zenko and Alexey Filippov)
Setting up Security in Your Salesforce Instance
Building Apps Faster with Lightning and Winter '17
Integrating The Cloud - How to integrate Salesforce
Lightning Sessions for Salesforce Admins at Dreamforce 2016
Lightning Component - Components, Actions and Events
Five Steps to Effective, Efficient and Evolutionary Process Flows
RESTful API - Retour d'expérience
Secure Salesforce: External App Integrations
Roadmap Lightning Updates (November 3, 2016)
Docker 1.5
Gestion des risques contractuels / HEG Genève
Aura Framework Overview
Le cycle de vie de la gestion des risques
Ad

Similar to Advanced Lightning Components (20)

PDF
Lightning Components: The Future
PDF
New Lightning Experience: Build Custom Apps in a Flash
PPTX
Lightning Component Framework from 0 to App
PPTX
Build Faster with Base Lightning Components
PPTX
Modern UI development with Lightning Components - Spanish!
PPTX
A Beginner's Guide to Lightning Components by Niels Bryna-Low
PPTX
Go Faster with Lightning - Overview
PDF
Salesforce: Go Faster with Lightning (DocuSign DevCon)
PPTX
Building first lightning component at udaipur admin group session
PPTX
Developers Introduction To Lightning
PPTX
Lightning components performance best practices
PPTX
Salesforce Lightning Component Framework Roadmap (TDX18)
PPTX
Build Next-gen Apps Faster with Lightning Components
PPTX
Lightning Flow: The Best Feature You're Not Using
PDF
アドバンスドLightningコンポーネント:品質の高いコンポーネント開発のためのTips
PDF
Introducing: The Lightning Experience
PDF
Build a Lightning Reporting App with the Salesforce Analytics API
PDF
Get Started with Lightning Web Components Open Source
PPTX
Lightning Fast Tips For Your Lightning Roll Out by Kim Schaefges, Nicole Dams...
PDF
#DF17Recap series: Integrate apps easier with the Salesforce platform
Lightning Components: The Future
New Lightning Experience: Build Custom Apps in a Flash
Lightning Component Framework from 0 to App
Build Faster with Base Lightning Components
Modern UI development with Lightning Components - Spanish!
A Beginner's Guide to Lightning Components by Niels Bryna-Low
Go Faster with Lightning - Overview
Salesforce: Go Faster with Lightning (DocuSign DevCon)
Building first lightning component at udaipur admin group session
Developers Introduction To Lightning
Lightning components performance best practices
Salesforce Lightning Component Framework Roadmap (TDX18)
Build Next-gen Apps Faster with Lightning Components
Lightning Flow: The Best Feature You're Not Using
アドバンスドLightningコンポーネント:品質の高いコンポーネント開発のためのTips
Introducing: The Lightning Experience
Build a Lightning Reporting App with the Salesforce Analytics API
Get Started with Lightning Web Components Open Source
Lightning Fast Tips For Your Lightning Roll Out by Kim Schaefges, Nicole Dams...
#DF17Recap series: Integrate apps easier with the Salesforce platform

More from Salesforce Developers (20)

PDF
Sample Gallery: Reference Code and Best Practices for Salesforce Developers
PDF
Maximizing Salesforce Lightning Experience and Lightning Component Performance
PDF
Local development with Open Source Base Components
PPTX
TrailheaDX India : Developer Highlights
PDF
Why developers shouldn’t miss TrailheaDX India
PPTX
CodeLive: Build Lightning Web Components faster with Local Development
PPTX
CodeLive: Converting Aura Components to Lightning Web Components
PPTX
Enterprise-grade UI with open source Lightning Web Components
PPTX
TrailheaDX and Summer '19: Developer Highlights
PDF
Live coding with LWC
PDF
Lightning web components - Episode 4 : Security and Testing
PDF
LWC Episode 3- Component Communication and Aura Interoperability
PDF
Lightning web components episode 2- work with salesforce data
PDF
Lightning web components - Episode 1 - An Introduction
PDF
Migrating CPQ to Advanced Calculator and JSQCP
PDF
Scale with Large Data Volumes and Big Objects in Salesforce
PDF
Replicate Salesforce Data in Real Time with Change Data Capture
PDF
Modern Development with Salesforce DX
PDF
Get Into Lightning Flow Development
PDF
Integrate CMS Content Into Lightning Communities with CMS Connect
Sample Gallery: Reference Code and Best Practices for Salesforce Developers
Maximizing Salesforce Lightning Experience and Lightning Component Performance
Local development with Open Source Base Components
TrailheaDX India : Developer Highlights
Why developers shouldn’t miss TrailheaDX India
CodeLive: Build Lightning Web Components faster with Local Development
CodeLive: Converting Aura Components to Lightning Web Components
Enterprise-grade UI with open source Lightning Web Components
TrailheaDX and Summer '19: Developer Highlights
Live coding with LWC
Lightning web components - Episode 4 : Security and Testing
LWC Episode 3- Component Communication and Aura Interoperability
Lightning web components episode 2- work with salesforce data
Lightning web components - Episode 1 - An Introduction
Migrating CPQ to Advanced Calculator and JSQCP
Scale with Large Data Volumes and Big Objects in Salesforce
Replicate Salesforce Data in Real Time with Change Data Capture
Modern Development with Salesforce DX
Get Into Lightning Flow Development
Integrate CMS Content Into Lightning Communities with CMS Connect

Recently uploaded (20)

PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PPTX
Spectroscopy.pptx food analysis technology
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PPTX
Programs and apps: productivity, graphics, security and other tools
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
Empathic Computing: Creating Shared Understanding
PDF
Approach and Philosophy of On baking technology
PDF
Network Security Unit 5.pdf for BCA BBA.
PPTX
sap open course for s4hana steps from ECC to s4
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PDF
Encapsulation_ Review paper, used for researhc scholars
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
Review of recent advances in non-invasive hemoglobin estimation
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
Electronic commerce courselecture one. Pdf
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
Machine learning based COVID-19 study performance prediction
Per capita expenditure prediction using model stacking based on satellite ima...
Spectroscopy.pptx food analysis technology
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
Programs and apps: productivity, graphics, security and other tools
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Empathic Computing: Creating Shared Understanding
Approach and Philosophy of On baking technology
Network Security Unit 5.pdf for BCA BBA.
sap open course for s4hana steps from ECC to s4
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
Encapsulation_ Review paper, used for researhc scholars
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Review of recent advances in non-invasive hemoglobin estimation
Digital-Transformation-Roadmap-for-Companies.pptx
20250228 LYD VKU AI Blended-Learning.pptx
Electronic commerce courselecture one. Pdf
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Machine learning based COVID-19 study performance prediction

Advanced Lightning Components

  • 1. Advanced Lightning Components ​ Skip Sauls ​ Director of Product Management ​ ssauls@salesforce.com ​ @SkipSauls ​  ​ Kris Gray ​ PMTS, Aura Framework ​ kgray@salesforce.com ​ @grayjustise ​  ​ John Buchanan ​ PMTS, Aura Framework ​ jbuchanan@salesforce.com ​ 
  • 2. ​ Safe harbor 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. Safe Harbor
  • 4. ​ Use createComponent •  newComponentAsync and other variants are being deprecated ​ Use $A when accessing APIs •  “aura” is being deprecated ​ Avoid method name collisions •  Use unique method names for server vs. client-side methods ​ Use the official API •  Don’t use undocumented members on $A or components ​ Efficient events •  Don’t handle your own events ​ Don’t use setTimeout Best Practices Advanced Lightning Components
  • 5. ​ Component Lifecycle •  Ensure that you really need to use a renderer ​ DOM Manipulation •  “If you didn’t create it, don’t touch it.” – Doug Chasman ​ CSS •  Always use properly namespaced rules – See above about not touching things you don’t own ​ 3rd Party Libraries •  Ensure that you really need to load jQuery, Bootstrap, etc. before doing so •  Remember that these aren’t single-page applications (SPAs), especially in mobile clients ​ Use Actions •  Actions are optimized by the framework, unlike XHRs Best Practices Advanced Lightning Components
  • 6. •  Many apps such as Salesforce1 and Lightning Experience catch most exceptions to provide a better user experience. •  Enable features such as “Pause On Caught Exceptions” in the browser debugger to ensure that you don’t miss something. Debugging – Client Side Advanced Lightning Components Google Chrome Developer Tools Apple Safari Web Inspector Mozilla Firefox Firebug Mozilla Firefox Developer Tools Microsoft Edge Developer Tools Microsoft IE11 Developer Tools
  • 7. ​ Use the debugger statement ​ Enable Pause on Caught Exceptions ​ Turn on Debug for Lightning Components ​ Leverage the browser Developer Tools features ​ Debug on more than one client Debugging – Client Side Advanced Lightning Components
  • 9. Q&A