Use Lightning Components in Lightning Experience
- Describe the importance of Lightning components to Lightning Experience.
- Name some of the key considerations for using Lightning components over Visualforce.
- Identify three places where you can use Lightning components.
Lightning Components in Lightning Experience
By now you’ve read the word “Lightning” so many times it’s probably lost all meaning. Worse, we’ve been talking so much about both “Lightning Experience” and “Lightning components” that maybe the two terms are blurring together. Let’s clear up the relationship between the two.
Remember all that information about developing following either a page-centric or app-centric model? Salesforce Classic uses a page-centric model, but Lightning Experience uses an app-centric model. It’s made up of—you guessed it—components.
You can probably see where this is going. Lightning components were designed with Lightning Experience in mind. As the core Salesforce app shifts to the app-centric framework, we want you to shift along with us. We want you to think about developing on the platform in a whole new way.
You might have developed some Lightning components in Salesforce Classic. You can still use the old interface with Lightning components and all your existing component functionality transfers seamlessly into Lightning Experience.
Considerations for Use
We’ve covered some of the considerations for using Lightning components. You probably don’t want to switch to Lightning components with in-progress Visualforce projects. You also want to stick with Visualforce if you need to do things like render PDFs from a page. Visualforce hasn’t gone away, and remains a foundational part of developing on the Salesforce platform.
- Lightning Experience We said it earlier, but don’t want you to get the wrong idea by leaving it off this list. Lightning Experience and Lightning components are two great tastes that taste great together.
- Salesforce App We’re repeating this one often because it’s important: use Lightning components for your mobile development. When you’re using a mobile device, you don’t want to make a call to the server every time a user presses a button. Using Lightning components vastly improves mobile app performance.
- Standalone Apps If you used Lightning components in Salesforce Classic, you probably made at least one standalone Lightning app. Lightning App Builder lets you declaratively create apps with standard components ranging from buttons to Canvas apps. Alternatively, use the Developer Console to create apps made up of both standard and custom Aura components. See the Lightning Aura Components Developer Guide for more information.
- Visualforce Pages This capability is perfect for Salesforce developers who are Visualforce veterans. If you’re not quite ready to commit to a full Lightning app, smooth the transition by integrating Aura components into Visualforce pages. This task only requires a few lines of markup and gives you a huge amount of flexibility. See the Lightning Aura Components Developer Guide for more information about Aura components for Visualforce.
- Anywhere! Lightning Out, currently available in beta, lets you run your Aura components and apps, well, pretty much anywhere you can serve a web page. Whether it’s a Node.js app running on Heroku, a department server inside the firewall, or even SharePoint (yes, SharePoint), build your custom app with Lightning components and run it wherever your users are.
- Screen Flows If you haven't taken advantage of screen flows yet, you're missing out on a powerful way to guide your users through a business process. Customize the look-and-feel and functionality of your flow’s screens by adding Aura components to them.
As much engineering effort as we’ve put into making Lightning components a framework you can use to create applications for the next decade, we’re not done. There’s still a few places where you can use Visualforce to customize Salesforce but you can’t yet use Lightning components. Stay tuned to this channel.