Monday 5 August 2019

Interview Questions On Salesforce Lightning

 What is Aura Framework?
  • Aura is an open source framework developed by Salesforce. 
  • It is a component based framework to develop UI components.
  • Aura components to build modern web apps with reusable UI components. 
  • Aura Component are XML Markup.


What is Lightning Framework?
Lightning Framework is based on Aura Framework to design and develop Salesforce Aura components. Lightning framework is also developed by Salesforce, but unlike Aura Framework, it is not open source.
What are the different Lightning component bundles?

a. Component
b. Controller
c. Helper
d. Style
e. Document
f. Design
g. SVG
h. Rendrer

What are different ways to call a javascript controller method?
Javascript Controller method can be called via:
  • By browser events like onclick, onchange etc
  • By Aura handlers of lifecycle events init handler, render handler
  • By Aura handlers of component and application events
  • By Aura Method
How many parameters are there in a javascript controller method?
There are three parameters that a javascript controller method accept.
  • Component – Component or markup file reference
  • Event – It has all the properties of the event which fired this method
  • Helper – Helper file reference
These parameters are supplied by the framework itself and does not need to be passed explicitly.
 What are the type of events into Salesforce Lightning component Or What is Event driven architecture?
Event-driven architecture is used for better decoupling between components. Components can communicate with each other using events. Lightning Framework supports two type of custom events and one system event:
a. Application Event – Scope of this event is throughout the lightning App and any component which has registered for this event would get a notification.
b. Component Event– Scope of this event is within itself or the parent component of this event, all the components declared within the parent component would get notified of this event.
c. System Event- these are the events fired by Salesforce’s system during the lifecycle of the lightning app
.
What interface we are supposed to implement so that a lightning component can be used as a Tab?

We need to implement the following “force:appHostable” so that we can use the component as a Tab.

Which interface we are supposed to implement so that a lightning component can be used as quick action?
We need to implement the following “force: lightningQuickAction” so that we can use the component as a Quick Action
What are the tools included in lightning ?

Lightning Component Framework – Components and extensions that allow you to build reusable components, customize the Salesforce1 Mobile App, and build standalone apps.
Lightning App Builder – A new UI tool that lets you build apps lightning fast, using components provided by Salesforce and platform developers.
Lightning Connect – An integration tool that makes it easier for your Force.com app to consume data from any external source that conforms to the OData spec.
Lightning Process Builder – A UI tool for visualizing and creating automated business processes.
Lightning Schema Builder – A UI tool for viewing and creating objects, fields, and relationships.

Can we Include One Lightning component to another ?

Yes, we can include one Lightning component in another Lightning component.

Can we call one javascript controller method from other one?
No, javascript controller method can only be called by component markup.

How can we call child component controller method from the parent component controller method?

To call a child component’s controller method, we need to first create a aura:method which is publicly accessible, aura:method is used to communicate down the containment hierarchy 
i.e. parent to child.

What are the basic differences between Application Event and Component Event?
Component events are used to do communication between child and parent. They use bubbling and capture same as used in DOM events. A change in a child component can be communicated to the parent component via component event.
Application events are used to communicate any change in the component to a broader audience. Any component who has registered for this event will get a notified.
To use Component Event API we use the below syntax
What are component events?
Component events allow you to make a communication channel within same hierarchy. A component event is fired from an instance of a component. A component event can be handled by the component that fired the event or by a component in the containment hierarchy that receives the event.
A component event cannot be handled by any component which is below in the component hierarchy or out of the hierarchy.
  
Events fired from c:component2 cannot be handled by c:Component3 since it is out of component hierarchy. It cannot be handled by c:Component4 as well, since it is below c:Component2 in component hierarchy.


How can you handle the component event?
Component events can be handled either by aura:handler or directly from child component declaration tag. For example, if c:Component2 fires a component event named “onBack” than you can handle that directly from c:Component1 like below:
<c:Component2 onBack=“{!c.handleBack}” />

4 comments:

  1. Salesforce is a revolutionary platform that shows how customer service should be operated effectively.

    Salesforce Sales Cloud

    ReplyDelete
  2. I’m not sure where you're getting your information, but good topic. I needs to spend some time learning more or understanding more. Thanks for excellent information I was looking for this info for my mission.Cloud phone system experts Australia

    ReplyDelete