Salesforce Lightning Interview Questions and Answers

25+ TOP Salesforce Lightning Interview Questions and Answers

Salesforce Lightning Interview Questions
Salesforce Lightning Interview Questions

1. What is Lightning?
Lightning refers to a set of tools and technologies which are behind a prominent upgrade to the Salesforce platform.

2. How can Lightning Components be used with the Salesforce1 Mobile App?
Lightning components can be used with Salesforce1 Mobile App by creating a custom Lightning tab which points to our component and includes that tab in our Salesforce1 Mobile navigation.

3. Can a Lightning Component which shows up in both the Mobile and the Desktop User Interfaces be made?
Lightning Components can be directly used in Lightning Experience, the Salesforce1 Mobile app, template-based communities, and other standalone apps. Additionally, it also includes Lightning components in a Visualforce page, which allows us to use them in Salesforce Classic, Visualforce-based communities and Console.

4. Do you think Lightning is an Mvc Framework?
Lightning is a component-based framework.
Know more about Salesforce Lightning through our Salesforce online Training (demo link)

5. Which parts of the Lightning Components are server-side and which are on client-side?
Lightning components make use of JavaScript on the client-side and Apex on the server-side.

6. What is the type of different events into Salesforce Lightning Component?
Application Event: The event has a scope that is throughout the lightning App, and any component which has registered for this event gets a notification.
System Event: These are the events that are fired by the Salesforce system during the lifecycle of the app.
Component Event: The scope of this falls within the parent component of this event. All the components declared by the parent will also get notified of this event.

7. What is the difference between the component event and the application event?
Component Events: these are used when the parent and child need to communicate. They make use of bubbling and capture, just like it is used in DOM events. A change in a child component will be communicated to the parent component through the component event.

Application Events: these are basically used for communicating any kind of change in the component to a larger audience. Any component which has been registered for this event will get notified.

8. When should component events and application events be used?
It is always a good idea to use a component event over an application event. Component events can be handled only by the components which are above them in the hierarchy of containment. Thus, the usage is limited to the components which need to know them.
Application events are best used when something is handled at the application level, like navigating to a particular record. Application events permit any communication between the components which are in separate parts of the application and have no direct containment relationship.

9. Which interface is often used for implementation so that a lightning component can be used for quick action?
Implementation can be done following the “force: lightningQuickAction” so that the component can be used for quick action.

10. Which interface is often used for implementation so that a lightning component can be used as a Tab?
The lightning component can be used as a Tab by following “force: apps stable.”

11. How can a Lightning component be used in a Visualforce page?
A Lightning Component can be embedded in any kind of webpage by a highly powerful and flexible feature called the Lightning out. In Visualforce, some level of complexity comes down. Lightning Component can be used in the Visualforce page in three steps:

Add the Lightning Components for Visualforce JavaScript library for the targeted page of Visualforce using the tag.
Next, a Lightning app has to be created and referred to in component dependencies.
Finally, a JavaScript Function needs to be written which will ultimately create the component on the page by making use of $Lightning.createComponentt()

12. How can we communicate between two different components?
In a Lightning Component Framework, the communication between two components can be accomplished in the following ways:
Attributes which pass data down the component hierarchy
Lightning Events which pass data up and around the hierarchy of the components.

13. How can FLS be ensured while working on the Lightning Component?
FLS and CRUD have to be manually enforced in the Apex Controller, or it can be done using the Lightning Data service wherever possible as it handles both the FLS and CRUD. Both of them are not enforced automatically in case any object is referenced in the Apex Controller.

14. How can Lightning Components be used in the Salesforce1 Mobile App?
A lightning tab has to be made, which is aimed at the lightning component which has been created. The tab then has to be included in the salesforce1 Mobile Navigation select list and the newly created tab for it.

15. Is it possible to make a Lightning Component that shows up in the mobile and the desktop user interfaces?
Lightning Component refers to a lightning experience which is ready by default and also has compatibility in Salesforce1 App. The layout is responsive and thus adjusts as per the resolution of the screen size. Hence, it cannot be used on a desktop and without any separate code.

16. What is the limit on the number of components which can be included in one Application?
The number of components which can be defined in an application in Salesforce has no upper limit.
With Salesforce Self-learning, you can drive the effective learning process at your own pace.

17. What do you mean by Aura?
Aura is basically a User Interface framework that which is used in the development of dynamic web apps for both mobile and desktop devices. Aura gives scalable long-lived lifecycle support to the building of apps which are engineered for growth. Aura backs the partitioned multi-tier component development which bridges the client and the server. JavaScript is used on the client-side while Java is used on the server-side.

18. Do you think a namespace is used for the development of Lightning Components?
A namespace is not essential for the development of a lightning component.

19. What is the underlying difference between Visualforce Component and the Lightning Component?
Visualforce page is created by keeping it at the center of the application, and most of its calculation is taken up at the server-side. The lightning component, on the other hand, is created by making use of the component-based framework, and most of the calculations are performed at the side of the client. It gives a more dynamic and rich customer experience. The lightning component is built using the mobile-first approach.

20. Are there any CSS styles provided by the Salesforce.com which support the Lightning components?
Salesforce has given the lightning design system as the default CSS which can be used with the Lightning component.

21. Do you think Lightning Components are only directed towards mobile apps?
Lightning Components are designed with a mobile-first approach, but the responsive design allows it to give the same experience even over the desktop without the need for writing any separate lines of code.

22. Mention any advantages of lightning?
Lightning has many advantages like an extraordinary component set which lets fast creation of new apps, easy decoupling between the components can be enabled by the event-driven architecture. Also, it is endowed with device awareness, cross-browser compatibility, and an optimized framework for performance.

23. Is it possible to integrate Lightning components with another framework like Angular?
Yes, Lightning components can be integrated with any third-party framework like Angular.

24. What is the use of implements in the lightning component?
Implements are basically used for referring to various interfaces of the platform which enable a component for use in different contexts or granting access to extra context data. A component can often implement multiple interfaces.

25. How can components be deployed to the production org?
Lightning components can be deployed to the production by change sets, force.com, IDE, and Managed Package.

Frequently Asked Salesforce Lightning Interview Questions