Salesforce.com: Add Lightning Components to Any App with Lightning Out (Beta)
Use Lightning Out to run Lightning components apps outside of Salesforce
servers. Whether it’s a Node.js app running on Heroku, a department
server inside the firewall, or even SharePoint, build your custom app
with Force.com and run it wherever your users are.
Note
This release contains a beta version of Lightning Out, which means it’s a high quality feature with known limitations. You can provide feedback and suggestions for Lightning Out on the IdeaExchange.
Developing Lightning components that you can deploy anywhere is for the most part the same as developing them to run within Salesforce. Everything you already know about Lightning components development still applies. The only real difference is in how you embed your Lightning components app in the remote web container, or origin server.
Lightning Out is added to external apps in the form of a JavaScript library you include in the page on the origin server, and markup you add to configure and activate your Lightning components app. Once initialized, Lightning Out pulls in your Lightning components app over a secure connection, spins it up, and inserts it into the DOM of the page it’s running on. Once it reaches this point, your “normal” Lightning components code takes over and runs the show.
Note
This approach is quite different from embedding an app using an iframe. Lightning components running via Lightning Out are full citizens on the page. If you choose to, you can enable interaction between your Lightning components app and the page or app you’ve embedded it in. This interaction is handled using Lightning events.
In addition to some straightforward markup, there’s a modest amount of setup and preparation within Salesforce to enable the secure connection between Salesforce and the origin server. And, because the origin server is hosting the app, you need to manage authentication with your own code.
This setup process is similar to what you’d do for an application that connects to Salesforce using the Force.com REST API, and you should expect it to require an equivalent amount of work.
Source : http://www.saasanalogy.com/add-lightning-components-to-any-app-with-lightning-out-beta/
Note
This release contains a beta version of Lightning Out, which means it’s a high quality feature with known limitations. You can provide feedback and suggestions for Lightning Out on the IdeaExchange.
Developing Lightning components that you can deploy anywhere is for the most part the same as developing them to run within Salesforce. Everything you already know about Lightning components development still applies. The only real difference is in how you embed your Lightning components app in the remote web container, or origin server.
Lightning Out is added to external apps in the form of a JavaScript library you include in the page on the origin server, and markup you add to configure and activate your Lightning components app. Once initialized, Lightning Out pulls in your Lightning components app over a secure connection, spins it up, and inserts it into the DOM of the page it’s running on. Once it reaches this point, your “normal” Lightning components code takes over and runs the show.
Note
This approach is quite different from embedding an app using an iframe. Lightning components running via Lightning Out are full citizens on the page. If you choose to, you can enable interaction between your Lightning components app and the page or app you’ve embedded it in. This interaction is handled using Lightning events.
In addition to some straightforward markup, there’s a modest amount of setup and preparation within Salesforce to enable the secure connection between Salesforce and the origin server. And, because the origin server is hosting the app, you need to manage authentication with your own code.
This setup process is similar to what you’d do for an application that connects to Salesforce using the Force.com REST API, and you should expect it to require an equivalent amount of work.
- Lightning Out Requirements
Deploying a Lightning components app using Lightning Out has a few modest requirements to ensure connectivity and security. - Lightning Out Dependencies
Create a special Lightning dependency app to describe the component dependencies of a Lightning components app to be deployed using Lightning Out or Lightning Components for Visualforce. - Lightning Out Markup
Lightning Out requires some simple markup on the page, and is activated using two straightforward JavaScript functions. - Authentication from Lightning Out
Lightning Out doesn’t handle authentication. Instead, you manually provide a Salesforce session ID or authentication token when you initialize a Lightning Out app. - Share Lightning Out Apps with Non-Authenticated Users
Add the ltng:allowGuestAccess interface to your Lightning Out dependency app to make it available to users without requiring them to authenticate with Salesforce. This interface lets you build your app with Lightning components, and deploy it anywhere and to anyone. - Lightning Out Considerations and Limitations
Creating an app using Lightning Out is, for the most part, much like creating any app with Lightning components. However, because your components are running “outside” of Salesforce, there are a few issues you want to be aware of. And it’s possible there are changes you might need to make to your components or your app.
Source : http://www.saasanalogy.com/add-lightning-components-to-any-app-with-lightning-out-beta/
Comments
Post a Comment