Lightning Out
Components for the Rest of the World
​ Skip Sauls
​ Director of Product Management
​ ssauls@salesforce.com
​ @SkipSauls
​ 
​ Doug Chasman
​ Distinguished Engineer, Force.com Architect
​ dchasman@salesforce.com
​ @dougchasman
​ 
​ 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
Introducing Lightning Out
Platforms
Lightning Out
Frameworks, Toolkits, and Libraries
Lightning Out
? XXX
​ Lightning Components can now be used in nearly any remote web container
​ Requirements
•  Valid Salesforce session ID (SID), for example from OAuth
•  Ability to modify the generated markup for the remote site
​ Supports
•  Secure browser (HTTPS)
•  Cross-Origin Resource Sharing (CORS)
​ Lightning Components for Visualforce is powered by Lightning Out
​ Availability
•  Lightning Components for Visualforce is GA in Winter ‘16
•  Lightning Out is in pre-release in Winter ‘16, with plans to be GA in Spring ‘16
Overview
Lightning Out
​ Lightning Out is the technology that allows Lightning Components to be used in Visualforce
​ Differences & Considerations
•  Does not require CORS
•  Does not require a Connected App
•  Styles are from Aloha/VF and may differ from Salesforce1, Lightning Experience, or standalone apps
​ Uses
•  Use components directly in Visualforce, integrated on the client via JavaScript, Lightning Events, and more
•  Migrate Visualforce pages and components to Lightning Components, while retaining use in Aloha
•  Build “hybrid” pages that leverage the best of Lightning Components and Visualforce
Lightning Components for Visualforce (LC4VF)
Lightning Out
​ Lightning Out can be up and running with very little effort:
1.  Configure the remote site for CORS and a Connected App with Oauth
2.  Create a Lightning App that extends ltng:outApp with dependencies for components
3.  Include lightning.out.js in the remote site
4.  Authenticate with Salesforce OAuth using the Consumer Key
5.  Initialize Lightning App with $Lightning.use, passing in the OAuth token
6.  Add the components to the remote site using $Lightning.createComponent
Usage
Lightning Out
​ Lightning Components can be included on the remote site with as few as three lines of code:
Usage
Lightning Out
<script src="https://gs0.lightning.force.com/lightning/lightning.out.js"></script>
$Lightning.use("ltngx:lotest", function() {}, oauth.instance_url, oauth.access_token);
$Lightning.createComponent("ltngx:chatter", {}, "chatterFeed”, function(cmp) {});
Demos
Q&A
Thank you
​ The following slides were getting too detailed…
​ Cross-Origin Resource Sharing (CORS) provides a safe mechanism for enabling access across
domains. Lightning Out requires that an origin for the remote site to be added to the CORS
whitelist using Setup.
1.  Setup -> Administer -> Security Controls -> CORS -> New
2.  Enter the origin URL pattern, e.g., https://cryptic-mesa-8923.herokuapp.com
3.  Save
Usage – Configure CORS
Lightning Out
​ Lightning Out requires a valid SFDC SID, e.g., as obtained by OAUTH. A Connected App provides
the
1.  Setup -> Build-> Create -> Apps -> Connected Apps -> New
2.  Enter the name, etc. and toggle Enable OAuth Settings
3.  Enter the callback URL, e.g., https://cryptic-mesa-8923.herokuapp.com/oauthcallback
4.  Select the OAuth Scopes, e.g., Full
5.  Save
Usage – Configure Connected Apps
Lightning Out
​ The OAuth Consumer Key will be used on the client when authenticating.
1.  Setup -> Build-> Create -> Apps -> Connected Apps -> appname -> Edit
2.  Copy the Consumer Key
Usage – Configure Connected Apps
Lightning Out
​ Lightning Out is included in the remote site with a very small JavaScript file, lightning.out.js,
served from the SFDC org that you are accessing. This should be included on any page that will
include Lightning Components:
Usage
Lightning Out
<script src="https://gs0.lightning.force.com/lightning/lightning.out.js"></script>
​ Lightning Out requires a valid SFDC SID, but it does not provide this capability OOTB in the early
access release. A library such as force.js
Usage
Lightning Out
<script src="https://gs0.lightning.force.com/lightning/lightning.out.js"></script>
Lightning Out
​ Usage
<script src="https://gs0.lightning.force.com/lightning/lightning.out.js"></script>
$Lightning.use("ltngx:lotest", function() {}, oauth.instance_url, oauth.access_token);
$Lightning.createComponent("ltngx:chatter", {}, "chatterFeed”, function(cmp) {});
Lightning Out
​ Usage
<script src="https://gs0.lightning.force.com/lightning/lightning.out.js"></script>
$Lightning.use("ltngx:lotest", function() {}, oauth.instance_url, oauth.access_token);
$Lightning.createComponent("ltngx:chatter", {}, "chatterFeed”, function(cmp) {});
Salesforce Everywhere
Lightning Out
Salesforce Heroku – Node.js
Lightning Out
Microsoft SharePoint
Lightning Out
SAP HANA – UI5
Lightning Out
Salesforce Force.com - Visualforce
Lightning Out
RedHat OpenShift - PHP
Lightning Out

More Related Content

XLS
DMAIC Freight Reduction Project
PPTX
Princípios SOLID
PPTX
Salesforce Org lifecycle management : empowering admins
PPTX
Introduction to lightning out df16
PPTX
Go Faster with Lightning - Overview
PDF
Lightning breakout mun world tour 2015 sfsans
PDF
New Lightning Experience: Build Custom Apps in a Flash
PPTX
Roadmap Lightning Updates (November 3, 2016)
DMAIC Freight Reduction Project
Princípios SOLID
Salesforce Org lifecycle management : empowering admins
Introduction to lightning out df16
Go Faster with Lightning - Overview
Lightning breakout mun world tour 2015 sfsans
New Lightning Experience: Build Custom Apps in a Flash
Roadmap Lightning Updates (November 3, 2016)

Similar to Lightning Out: Components for the Rest of the World (20)

PDF
Summer '16 Lightning Update for ISVs (June 30, 2016)
PPTX
Salesforce Lightning workshop
PPTX
Lightning Developer Week - Bangalore Salesforce Developer Group
PDF
ISV Lightning Webinar Series - Part 1 (December 1, 2015)
PPTX
Salesforce Lightning workshop Hartford - 12 March
PDF
Easy REST Integrations with Lightning Components and Salesforce1
PDF
Lightning week - Paris DUG
PPTX
AppExchange for Components First Call Deck
PDF
Salesforce Lightning Components and App Builder EMEA World Tour 2015
PPTX
Build lightning components with salesforce dx
PDF
Lightning Workshop London
PPTX
Suisse Romande SF DG - Lightning workshop
PPTX
Migrating Visualforce Pages to Lightning
PPTX
Intro to Salesforce Lightning for Admins
PDF
Lightning Experience for ISVs
PPTX
Salesforce Lightning Component Framework Roadmap (TDX18)
PDF
Summer '18 Developer Highlights
PPTX
TrailheaDX and Summer '19: Developer Highlights
PPTX
Salesforce Lightning component framework from 0 to app
PDF
Staying Ahead of the Curve with Lightning - Snowforce16 Keynote
Summer '16 Lightning Update for ISVs (June 30, 2016)
Salesforce Lightning workshop
Lightning Developer Week - Bangalore Salesforce Developer Group
ISV Lightning Webinar Series - Part 1 (December 1, 2015)
Salesforce Lightning workshop Hartford - 12 March
Easy REST Integrations with Lightning Components and Salesforce1
Lightning week - Paris DUG
AppExchange for Components First Call Deck
Salesforce Lightning Components and App Builder EMEA World Tour 2015
Build lightning components with salesforce dx
Lightning Workshop London
Suisse Romande SF DG - Lightning workshop
Migrating Visualforce Pages to Lightning
Intro to Salesforce Lightning for Admins
Lightning Experience for ISVs
Salesforce Lightning Component Framework Roadmap (TDX18)
Summer '18 Developer Highlights
TrailheaDX and Summer '19: Developer Highlights
Salesforce Lightning component framework from 0 to app
Staying Ahead of the Curve with Lightning - Snowforce16 Keynote
Ad

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
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
PDF
Introduction to MuleSoft
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
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
Introduction to MuleSoft
Ad

Recently uploaded (20)

PDF
Getting started with AI Agents and Multi-Agent Systems
PPTX
MicrosoftCybserSecurityReferenceArchitecture-April-2025.pptx
PDF
STKI Israel Market Study 2025 version august
PDF
Enhancing emotion recognition model for a student engagement use case through...
PDF
Unlock new opportunities with location data.pdf
PDF
TrustArc Webinar - Click, Consent, Trust: Winning the Privacy Game
PPTX
Chapter 5: Probability Theory and Statistics
PDF
NewMind AI Weekly Chronicles – August ’25 Week III
PDF
Getting Started with Data Integration: FME Form 101
PDF
Five Habits of High-Impact Board Members
PDF
A Late Bloomer's Guide to GenAI: Ethics, Bias, and Effective Prompting - Boha...
PDF
sustainability-14-14877-v2.pddhzftheheeeee
PDF
CloudStack 4.21: First Look Webinar slides
PDF
Assigned Numbers - 2025 - Bluetooth® Document
PDF
A review of recent deep learning applications in wood surface defect identifi...
PPT
Module 1.ppt Iot fundamentals and Architecture
PPTX
Modernising the Digital Integration Hub
PDF
From MVP to Full-Scale Product A Startup’s Software Journey.pdf
PDF
Developing a website for English-speaking practice to English as a foreign la...
PDF
Zenith AI: Advanced Artificial Intelligence
Getting started with AI Agents and Multi-Agent Systems
MicrosoftCybserSecurityReferenceArchitecture-April-2025.pptx
STKI Israel Market Study 2025 version august
Enhancing emotion recognition model for a student engagement use case through...
Unlock new opportunities with location data.pdf
TrustArc Webinar - Click, Consent, Trust: Winning the Privacy Game
Chapter 5: Probability Theory and Statistics
NewMind AI Weekly Chronicles – August ’25 Week III
Getting Started with Data Integration: FME Form 101
Five Habits of High-Impact Board Members
A Late Bloomer's Guide to GenAI: Ethics, Bias, and Effective Prompting - Boha...
sustainability-14-14877-v2.pddhzftheheeeee
CloudStack 4.21: First Look Webinar slides
Assigned Numbers - 2025 - Bluetooth® Document
A review of recent deep learning applications in wood surface defect identifi...
Module 1.ppt Iot fundamentals and Architecture
Modernising the Digital Integration Hub
From MVP to Full-Scale Product A Startup’s Software Journey.pdf
Developing a website for English-speaking practice to English as a foreign la...
Zenith AI: Advanced Artificial Intelligence

Lightning Out: Components for the Rest of the World

  • 1. Lightning Out Components for the Rest of the World ​ Skip Sauls ​ Director of Product Management ​ [email protected] ​ @SkipSauls ​  ​ Doug Chasman ​ Distinguished Engineer, Force.com Architect ​ [email protected] ​ @dougchasman ​ 
  • 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
  • 5. Frameworks, Toolkits, and Libraries Lightning Out ? XXX
  • 6. ​ Lightning Components can now be used in nearly any remote web container ​ Requirements •  Valid Salesforce session ID (SID), for example from OAuth •  Ability to modify the generated markup for the remote site ​ Supports •  Secure browser (HTTPS) •  Cross-Origin Resource Sharing (CORS) ​ Lightning Components for Visualforce is powered by Lightning Out ​ Availability •  Lightning Components for Visualforce is GA in Winter ‘16 •  Lightning Out is in pre-release in Winter ‘16, with plans to be GA in Spring ‘16 Overview Lightning Out
  • 7. ​ Lightning Out is the technology that allows Lightning Components to be used in Visualforce ​ Differences & Considerations •  Does not require CORS •  Does not require a Connected App •  Styles are from Aloha/VF and may differ from Salesforce1, Lightning Experience, or standalone apps ​ Uses •  Use components directly in Visualforce, integrated on the client via JavaScript, Lightning Events, and more •  Migrate Visualforce pages and components to Lightning Components, while retaining use in Aloha •  Build “hybrid” pages that leverage the best of Lightning Components and Visualforce Lightning Components for Visualforce (LC4VF) Lightning Out
  • 8. ​ Lightning Out can be up and running with very little effort: 1.  Configure the remote site for CORS and a Connected App with Oauth 2.  Create a Lightning App that extends ltng:outApp with dependencies for components 3.  Include lightning.out.js in the remote site 4.  Authenticate with Salesforce OAuth using the Consumer Key 5.  Initialize Lightning App with $Lightning.use, passing in the OAuth token 6.  Add the components to the remote site using $Lightning.createComponent Usage Lightning Out
  • 9. ​ Lightning Components can be included on the remote site with as few as three lines of code: Usage Lightning Out <script src="https://gs0.lightning.force.com/lightning/lightning.out.js"></script> $Lightning.use("ltngx:lotest", function() {}, oauth.instance_url, oauth.access_token); $Lightning.createComponent("ltngx:chatter", {}, "chatterFeed”, function(cmp) {});
  • 10. Demos
  • 11. Q&A
  • 13. ​ The following slides were getting too detailed…
  • 14. ​ Cross-Origin Resource Sharing (CORS) provides a safe mechanism for enabling access across domains. Lightning Out requires that an origin for the remote site to be added to the CORS whitelist using Setup. 1.  Setup -> Administer -> Security Controls -> CORS -> New 2.  Enter the origin URL pattern, e.g., https://cryptic-mesa-8923.herokuapp.com 3.  Save Usage – Configure CORS Lightning Out
  • 15. ​ Lightning Out requires a valid SFDC SID, e.g., as obtained by OAUTH. A Connected App provides the 1.  Setup -> Build-> Create -> Apps -> Connected Apps -> New 2.  Enter the name, etc. and toggle Enable OAuth Settings 3.  Enter the callback URL, e.g., https://cryptic-mesa-8923.herokuapp.com/oauthcallback 4.  Select the OAuth Scopes, e.g., Full 5.  Save Usage – Configure Connected Apps Lightning Out
  • 16. ​ The OAuth Consumer Key will be used on the client when authenticating. 1.  Setup -> Build-> Create -> Apps -> Connected Apps -> appname -> Edit 2.  Copy the Consumer Key Usage – Configure Connected Apps Lightning Out
  • 17. ​ Lightning Out is included in the remote site with a very small JavaScript file, lightning.out.js, served from the SFDC org that you are accessing. This should be included on any page that will include Lightning Components: Usage Lightning Out <script src="https://gs0.lightning.force.com/lightning/lightning.out.js"></script>
  • 18. ​ Lightning Out requires a valid SFDC SID, but it does not provide this capability OOTB in the early access release. A library such as force.js Usage Lightning Out <script src="https://gs0.lightning.force.com/lightning/lightning.out.js"></script>
  • 19. Lightning Out ​ Usage <script src="https://gs0.lightning.force.com/lightning/lightning.out.js"></script> $Lightning.use("ltngx:lotest", function() {}, oauth.instance_url, oauth.access_token); $Lightning.createComponent("ltngx:chatter", {}, "chatterFeed”, function(cmp) {});
  • 20. Lightning Out ​ Usage <script src="https://gs0.lightning.force.com/lightning/lightning.out.js"></script> $Lightning.use("ltngx:lotest", function() {}, oauth.instance_url, oauth.access_token); $Lightning.createComponent("ltngx:chatter", {}, "chatterFeed”, function(cmp) {});
  • 22. Salesforce Heroku – Node.js Lightning Out
  • 24. SAP HANA – UI5 Lightning Out
  • 25. Salesforce Force.com - Visualforce Lightning Out
  • 26. RedHat OpenShift - PHP Lightning Out