Use Lightning Components in Lightning Experience
Learning Objectives
- 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.
The Lightning Component framework is, relatively speaking, the new kid on the block—but this new kid has skills. As of the Spring ’19 release (API version 45.0), you can build Lightning components using two programming models: the Lightning Web Components model and the original Aura Components model. Lightning web components are custom HTML elements built using HTML and modern JavaScript. Lightning web components and Aura components can coexist and interoperate on a page. While Lightning components have a few specific limitations, for the most part, they’re ready to go. There are many situations where you should consider making the switch to developing with Lightning components. Salesforce mobile development, for example, is a great place to use Lightning components. Also use Lightning components for new projects and any project involving highly interactive applications.
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.