Interview Questions

Part1: Salesforce Lightning interview Questions

Pinterest LinkedIn Tumblr

In this article, We will try cover Salesforce Lightning Interview Questions in detail

1. What is Lightning?

Lightning is a component framework that was built on Aura framework. We can build reusable blocks that could be used in Lightning experience, communities, and mobile. Salesforce mobile app was created on Aura framework and released in Dreamforce 2013.

2. What are different types of Lightning Events?

Lightning uses event-driven programming.In Aura framework events are fired from Javascript     Controller Actions. Events can contain attributes that can be set before the event is fired and read  when the event is handled.

 We have three different types of Lightning Events.

  1. Component Event
  2. Application Event
  3. Standard Event

3. Define Lightning Bundle?

 Lightning bundle contains different elements such as

  1. Application
  2. Controller(JavaScript)
  3. Helper(Reusable JavaScript within the component)
  4. Style
  5. Documentation
  6. Renderer
  7. Svg

4. What is Lightning Out functionality?

 Lightning out functionality is used to display lightning components in the Salesforce classic on Visualforce Page. We can also display Lightning apps on the External site using Lightning out functionality.

5. What is Lightning Locker Service?

  Lightning Locker Service helps in eliminating Cross-site Scripting attacks. If there are multiple components in the Lightning app then each component will not be able to access each other JS Component and also will not be able to access Real Dom/Window. Salesforce authored components run in System/admin mode and has access to everything. Custom components can access other components DOM as long as they are in the same namespace but won’t be able to access other DOM if they are in the different namespace when Lightning locker service is enabled.

6. Can we communicate with Visualforce or Lightning Aura/Web components?

 Yes, Salesforce introduced  Lightning Message Service Api(beta as of Spring 2020) to communicate among Salesforce User Interfaces(DOM, Aura Components, Visualforce Pages and Lightning Web Components). A Lightning Web component uses a Lightning Message Channel to access the Lightning Message Service API. Reference Lightning Message Channel with the scoped module @salesforce/messageChannel. In Visualforce, use the global variable $MessageChannel. In Aura, use lightning:messageChannel in your component.

7. Prior Lightning Message API how did the communication happen between Visualforce and   Lightning Aura/Web components in Lightning Experience?

 Earlier we have to implement a custom Publish-Subscribe(Pub-sub) solution to communicate between Visualforce and Lightning Aura/Web components in Lightning Experience.

8. What is Component Event in Lightning?

  A component event could be handled by Parent components or the components above the Hierarchy. A component event could also be consumed by the source component that fired the event.

9. Does Lightning Component run Synchronously or asynchronously?

 Salesforce Lightning components are executed asynchronously.

10. Can we Integrate Third party JavaScript frameworks with Lightning?

Yes we can integrate 3rd party applications like Angular JS, Node JS and other Java script frameworks with Lightning.

Write A Comment