Sunteți pe pagina 1din 6

6/22/2019

Home (https://sfdcfacts.com/) Interview Questions – Lightning


About Me (https://sfdcfacts.com/about-me/) Framework – Part 8Guides
Blog (https://sfdcfacts.com/blog/) – Lightning Locker, Aura Methods
(https://sfdcfacts.com/guides/) – SFDCFacts
Videos (https://sfdcfacts.com/video/)
(https://sfdcfacts.com/)
 (https://twitter.com/manish_sfdc)
Subscribe  (https://www.facebook.com/sfdcfacts)  (https://www.linkedin.com/in/manish-choudhary/)  (https://github.com/choudharymanish8585)
(https://sfdcfacts.com/subscribe/)
(https://www.youtube.com/sfdcfacts)
Write Me (mailto:sfdcfacts@gmail.com)  (mailto:sfdcfacts@gmail.com)
HOME (HTTPS://SFDCFACTS.COM/) BLOG (HTTPS://SFDCFACTS.COM/BLOG/) LIGHTNING  (HTTPS://SFDCFACTS.COM/CATEGORY/LIGHTNING/)

APEX  (HTTPS://SFDCFACTS.COM/CATEGORY/APEX/) INTERVIEW QUESTIONS  (HTTPS://SFDCFACTS.COM/CATEGORY/INTERVIEW-QUESTIONS/)

BEST PRACTICES  (HTTPS://SFDCFACTS.COM/CATEGORY/BEST-PRACTICES/) CERTIFICATION  (HTTPS://SFDCFACTS.COM/CATEGORY/CERTIFICATION/) 

Interview Questions – Lightning Framework


Search

– Part 8 – Lightning Locker, Aura Methods OUR SPONSORS

 Manish Choudhari (https://sfdcfacts.com/author/admin/) -  May 12, 2019 -


 Interview Questions (https://sfdcfacts.com/category/interview-questions/) / Lightning (https://sfdcfacts.com/category/lightning/) - (http://clrinfotech.com/)
 0 Comments (https://sfdcfacts.com/lightning/interview-questions-lightning-framework-part-8/#respond)

Sponsor My Blog Here (/sponsor)

POPULAR POSTS

(https://sfdcfacts.com/lightning/
editable-lightningdatatable-
summer18-feature/) Editable
lightning:dataTable – Summer18
feature
(https://sfdcfacts.com/lightning/editable-
lightningdatatable-summer18-feature/)
CHECKOUT EARLIER POSTS (HTTPS://SFDCFACTS.COM/LIGHTNING/INTERVIEW-QUESTIONS- 68 comments | posted on June 15, 2018

LIGHTNING-FRAMEWORK-PART-1/) IN INTERVIEW QUESTION SERIES TO READ PREVIOUS (https://sfdcfacts.com/lightning/l


ightning-pagination-with-page-
QUESTIONS.
number-navigation-using-client-
side-controller/) Lightning

62. What are aura:methods, why we use those? Pagination with page number navigation –
Using Client Side Controller

Use  to de ne a method as part of a component’s API. This enables you to directly call a method in a (https://sfdcfacts.com/lightning/lightning-
pagination-with-page-number-navigation-
component’s client-side controller instead of ring and handling a component event. Using  simpli es
using-client-side-controller/)
the code needed for a parent component to call a method on a child component that it contains. 18 comments | posted on June 28, 2018

(https://sfdcfacts.com/lightning/l
Use aura:method to communicate down the containment hierarchy. For example, a parent ightningrecordform-powerful-
component calls an aura:method on a child component that it contains. component-for-viewing-and-
editing-record-in-lightning/)
lightning:recordForm – Powerful component
<aura:method name="sampleMethod" action=“{!c.controllerAction}” for viewing and editing record in lightning

description="Sample method with parameters"> (https://sfdcfacts.com/lightning/lightningrecord


form-powerful-component-for-viewing-and-
<aura:attribute name="param1" type="String" default="parameter 1"/>
editing-record-in-lightning/)
</aura:method> 16 comments | posted on June 12, 2018

(https://sfdcfacts.com/certi catio
n/how-i-cleared-my-platform-
63. Can aura method return a value? developer-2-exam/) How I
Cleared my Platform Developer
Yes, aura method can return values similar to any other JavaScript method. Use return statement in 2 Exam?
controller action of aura method to return a value. (https://sfdcfacts.com/certi cation/how-i-
cleared-my-platform-developer-2-exam/)
13 comments | posted on March 19, 2018
64. What are di erent ways to communicate between components?
(https://sfdcfacts.com/lightning/l
ightning-map-create-destroy-
If component hierarchy is same
component-dynamically-
Parent to Child Communication-
winter19/) lightning:map
Attributes can be used to create a binding between parent and child. #Winter19 – An Easy Solution To Generate
Aura methods can be used if parent component wants to access a function in child Google Map
component (https://sfdcfacts.com/lightning/lightning-map-

Application events can be used but not preferred.*
https://sfdcfacts.com/lightning/interview-questions-lightning-framework-part-8/ 1/6
6/22/2019 Child to Parent Communication- create-destroy-component-dynamically-
Interview Questions – Lightning Framework – Part 8 – Lightning Locker, Aura Methods – SFDCFacts
(https://sfdcfacts.com/)
Attributes can be used to create a binding between parent and child. winter19/)
13 comments | posted on September 19, 2018
Component event can be used to perform functionality in parent component based on an
HOME (HTTPS://SFDCFACTS.COM/) BLOG (HTTPS://SFDCFACTS.COM/BLOG/) LIGHTNING  (HTTPS://SFDCFACTS.COM/CATEGORY/LIGHTNING/)
event in child component.
LATEST FROM YOUTUBE
Application events can be used but not preferred.*
APEX  (HTTPS://SFDCFACTS.COM/CATEGORY/APEX/) INTERVIEW QUESTIONS  (HTTPS://SFDCFACTS.COM/CATEGORY/INTERVIEW-QUESTIONS/)
If components are in di erent hierarchy-
BEST PRACTICES  (HTTPS://SFDCFACTS.COM/CATEGORY/BEST-PRACTICES/)
Application CERTIFICATION  (HTTPS://SFDCFACTS.COM/CATEGORY/CERTIFICATION/)
events is the best solution for this type of communication. 
Shared javascript resources can be used. SFDCFacts - Learn Sh…
Sh…

65. What is Lightning Locker?

Lightning Locker is a powerful security architecture for Lightning components. Lightning Locker


enhances security by isolating Lightning components that belong to one namespace from
components in a di erent namespace. Lightning Locker also promotes best practices that improve the
supportability of your code by only allowing access to supported APIs and eliminating access to non-
published framework internals.
SFDCFacts - L… SFAB Day #17…
Also Read: Lightning Locker Explained with example
This video does not #SFAB
(https://sfdcfacts.com/lightning/lightning-locker-explained-with-example-lightning-
contain any #Journey2Salesforc
locker-services-part-2/)

66. What is DOM Access containment in Lightning Locker?

A component can only traverse the DOM and access elements created by a component in the same SFAB Day #16… SFAB Day #15…
namespace. This behavior prevents the anti-pattern of reaching into DOM elements owned by
#SFAB #SFAB
components in another namespace. #Journey2Salesforc #Journey2Salesforc

67. What are proxy objects?


More Videos Here..
(https://www.youtube.com/sfdcfacts?
Lightning Locker uses the standard JavaScript Proxy object to lter a component’s access to
sub_con rmation=1)
underlying JavaScript objects. The Proxy object ensures that a component only sees DOM elements
created by a component in the same namespace.
FOLLOW US

When a component creates a JavaScript object, Lightning Locker returns the raw JavaScript object.
When Lightning Locker lters the object, it returns a Proxy object. Some scenarios where Lightning
Locker lters an object and returns a Proxyobject are:

Passing an object to a component in a di erent namespace.


Passing an object from a component on API version less than 40.0 to the method of a component
on API version greater than or equal to 40.0.
Calling cmp.get() to retrieve an attribute value that you set with the value of a native JavaScript
object or array. The object or array isn’t ltered when it’s originally created

When you access these objects, Lightning Locker returns a Proxy object.

68. What are secure wrappers?

For security, Lightning Locker restricts the use of global objects by hiding an object or by wrapping it
in a secure version of the object. For example, the secure version of window is SecureWindow. Locker
intercepts calls to window and uses SecureWindow instead. Some methods and properties have
di erent behavior or aren’t available on the secure objects.

Lightning Locker also replaces instances of other objects, such as components and events, with
secure wrapped versions like SecureAura, SecureComponent, SecureComponentRef,
SecureDocument, SecureElement, SecureObject, SecureWindow.

69. Does lightning locker a ects Salesforce classic as well?

Lightning Locker enforces security and best practices for custom Lightning components you use in: 
https://sfdcfacts.com/lightning/interview-questions-lightning-framework-part-8/ 2/6
6/22/2019
Lightning Experience Interview Questions – Lightning Framework – Part 8 – Lightning Locker, Aura Methods – SFDCFacts
(https://sfdcfacts.com/) 
Salesforce app
Lightning Communities
HOME (HTTPS://SFDCFACTS.COM/) BLOG (HTTPS://SFDCFACTS.COM/BLOG/) LIGHTNING  (HTTPS://SFDCFACTS.COM/CATEGORY/LIGHTNING/)
Flows
(https://

Standalone apps that you create (for example, myApp.app)


APEX  (HTTPS://SFDCFACTS.COM/CATEGORY/APEX/) INTERVIEW QUESTIONS  (HTTPS://SFDCFACTS.COM/CATEGORY/INTERVIEW-QUESTIONS/)
Any other app where you can add a custom Lightning component, such as Salesforce Console in  www.li

BEST PRACTICES
Lightning (HTTPS://SFDCFACTS.COM/CATEGORY/BEST-PRACTICES/)
 Experience CERTIFICATION  (HTTPS://SFDCFACTS.COM/CATEGORY/CERTIFICATION/) 
Lightning Out   (https:// nkedin.

Lightning Locker doesn’t a ect the following except for usage of Lightning components in Visualforce (https:// (https:// www.in com/in/
in these contexts:

twitter. www.fa stagra manish


Salesforce Classic
Visualforce-based communities
com/ma cebook. m.com/ -
Any apps for Salesforce Classic, such as Salesforce Console in Salesforce Classic

70. How can one disable Lightning Locker for an Aura Component? nish_sf com/sfd mann8 choudh

You can disable Lightning Locker for a component by setting API version 39.0 or lower for the
dc) cfacts) 585/) ary/)
component. If a component is set to at least API version 40.0, Lightning Locker is enabled.

Read Also:

(https://
Interview Questions – Lightning Framework – Part 7 – Global Value Providers, Controller
Function (https://sfdcfacts.com/lightning/interview-questions-lightning-framework-part-
 www.yo
7/)
Interview Questions – Lightning Framework – Part 9 – Lightning Data Service
(https:// utube.c
(https://sfdcfacts.com/lightning/interview-questions-lightning-framework-part-9/)
Why there is a need for Lightning Locker? (https://sfdcfacts.com/lightning/why-there-is-a-
github.c om/sfdc
need-for-lightning-locker-lightning-locker-services-part-1/)
Share Code Between Lightning Components Using JS Library
om/cho facts?
(https://sfdcfacts.com/lightning/share-code-between-lightning-components-using-js-
library/)
udhary sub_con

TAGS: AURA INTERVIEW QUESTIONS (HTTPS://SFDCFACTS.COM/TAG/AURA-INTERVIEW-QUESTIONS/), GLOBAL VALUE PROVIDERS manish rmatio
(HTTPS://SFDCFACTS.COM/TAG/GLOBAL-VALUE-PROVIDERS/), LIGHTNING INTERVIEW (HTTPS://SFDCFACTS.COM/TAG/LIGHTNING-INTERVIEW/),
LIGHTNING INTERVIEW QUESTIONS (HTTPS://SFDCFACTS.COM/TAG/LIGHTNING-INTERVIEW-QUESTIONS/), LIGHTNING QUESTIONS
(HTTPS://SFDCFACTS.COM/TAG/LIGHTNING-QUESTIONS/), SALESFORCE INTERVIEW QUESTIONS (HTTPS://SFDCFACTS.COM/TAG/SALESFORCE- 8585/) n=1)
INTERVIEW-QUESTIONS/)

RECENT POSTS

POWER IS GAINED BY SHARING KNOWLEDGE, NOT HOARDING IT

(https://twitter.com/share?
Getting started with Salesforce CPQ
Twitter text=Interview%20Questions%20%E2%80%93%20Lightning%20Framework%20%E2%80%93%20Part%208%20%E2%80%93%20Lightning%20Locker%2C%2
(https://sfdc
questions-lightning-framework-part-8%2F&via=manish sfdc)
(https://sfdcfacts.com/platform/cpq/getting-
facts.com/pl
(https://www.facebook.com/sharer.php? started-with-salesforce-cpq/)
Facebook u=https%3A%2F%2Fsfdcfacts.com%2Flightning%2Finterview- atform/cpq/
JUNE 8, 2019 /
questions-lightning-framework-part-8%2F) getting- 0 COMMENTS
(HTTPS://SFDCFACTS.COM/PLATFORM/CPQ/GETTING-
(whatsapp://send? started- STARTED-WITH-SALESFORCE-CPQ/#RESPOND)
WhatsApp text=https%3A%2F%2Fsfdcfacts.com%2Flightning%2Finterview- with-
questions-lightning-framework-part-8%2F)
salesforce-
(https://plus.google.com/share? cpq/)
Google+ url=https%3A%2F%2Fsfdcfacts.com%2Flightning%2Finterview-
questions-lightning-framework-part-8%2F)
(https://www.pinterest.com/pin/create/button/?url=https%
Pinterest content/uploads/2019/05/interview8.png&description=Checkout%C2%A0earlier+posts%C2%A0in+interview+question+series+to+read+previous+questions.

LinkedIn 8%2F&title=Interview%20Questions%20%E2%80%93%20Lightning%20Framework%20%E2%80%93%20Part%208%20%E2%80%93%20Lightning%20Lock
(https://sfdc Navigate to an Aura Component from
facts.com/li another Aura Component
ghtning/nav (https://sfdcfacts.com/lightning/navigate-
igate-to-an- to-an-aura-component-from-another-
aura- aura-component/)
 Previous Post Next Post  MAY 15, 2019 /
component-
0 COMMENTS
from- 
(HTTPS://SFDCFACTS.COM/LIGHTNING/NAVIGATE-TO-
AN-AURA-COMPONENT-FROM-ANOTHER-AURA-
https://sfdcfacts.com/lightning/interview-questions-lightning-framework-part-8/ another- COMPONENT/#RESPOND) 3/6
6/22/2019 Interview Questions
Interview Questions – Lightning Framework – – Lightning Framework
Interview Questions ––Part 8 – Lightning
Lightning Locker,
Framework aura-Methods – SFDCFacts
– Aura
(https://sfdcfacts.com/) component/
Part 7 – Global Value Providers, Controller Part 9 – Lightning Data Service )
Function
HOME (HTTPS://SFDCFACTS.COM/) (https://sfdcfacts.com/lightning/interview-questions-
BLOG (HTTPS://SFDCFACTS.COM/BLOG/) LIGHTNING  (HTTPS://SFDCFACTS.COM/CATEGORY/LIGHTNING/)
(https://sfdcfacts.com/lightning/interview-questions- lightning-framework-part-9/)
APEXlightning-framework-part-7/)
 (HTTPS://SFDCFACTS.COM/CATEGORY/APEX/) INTERVIEW QUESTIONS  (HTTPS://SFDCFACTS.COM/CATEGORY/INTERVIEW-QUESTIONS/)
Interview Questions – Lightning
Framework – Part 11 – Lifecycle,
(https://sfdc Interfaces
BEST PRACTICES  (HTTPS://SFDCFACTS.COM/CATEGORY/BEST-PRACTICES/) CERTIFICATION  (HTTPS://SFDCFACTS.COM/CATEGORY/CERTIFICATION/) 
facts.com/li (https://sfdcfacts.com/lightning/interview-
Manish Choudhari (Https://Sfdcfacts.Com/Author/Admin/) ghtning/int questions-lightning-framework-part-11/)
erview- MAY 14, 2019 /
I am a certi ed Salesforce Application & System Architect and Developer working on Salesforce questions- 0 COMMENTS
(HTTPS://SFDCFACTS.COM/LIGHTNING/INTERVIEW-
lightning- QUESTIONS-LIGHTNING-FRAMEWORK-PART-
Technology since 2014. Currently, I have 14 Salesforce certi cations along with OCPJP (Oracle 11/#RESPOND)
(https://sfdc framework-
Certi ed Profession JavaSE6 Programmer) working in Salesforce.com Hyderabad as a Technical part-11/)
facts.com/a
Engineer. Writing technical blogs, learning new technologies and frameworks and sharing
uthor/admin
knowledge is my hobby.
MY TRAILMIXES
/)
Sales Cloud Consultant Certi cation
(https://trailhead.salesforce.com/users/005500
00006csgWAAQ/trailmixes/sales-cloud-
 YOU MIGHT ALSO LIKE
consultant-certi cation)

Service Cloud Consultant Certi cation


(https://trailhead.salesforce.com/users/005500
(https://sfdcfacts.com/lightning/int (https://sfdcfacts.com/best- (https://sfdcfacts.com/visualforce/s 00006csgWAAQ/trailmixes/service-cloud-
erview-questions-lightning- practices/3-things-you-need-to- hare-data-between-lightning-
consultant-certi cation)

framework-part-10/) create-a-most-reusable-lightning- component-visualforce-page/)


component/) MY CERTIFICATIONS
Interview Questions – Share Data Between
Lightning Framework – Lightning Component &
3 things you need to
Part 10 – Apex Controller Visualforce Page
create a “Most Reusable
(https://sfdcfacts.com/ligh (https://sfdcfacts.com/vis
Lightning Component”
tning/interview-questions- ualforce/share-data-
(https://sfdcfacts.com/bes
lightning-framework-part- between-lightning-
t-practices/3-things-you-
10/) component-visualforce-
need-to-create-a-most-
 May 14, 2019
reusable-lightning- page/)
component/)  September 14, 2018

 January 12, 2019

(http://certi cation.salesforce.com/certi cation-


Leave a Reply detail-print?conId=003G000002gRrrEIAS)

Your Comment Here...


FOLLOW US ON FACEBOOK

Name (required) Email (required) Website

POST COMMENT


https://sfdcfacts.com/lightning/interview-questions-lightning-framework-part-8/ 4/6
6/22/2019 Interview Questions – Lightning Framework – Part 8 – Lightning Locker, Aura Methods –SFDCFacts
SFDCFacts
(https://sfdcfacts.com/) SFDCFacts
1,051 likes

HOME (HTTPS://SFDCFACTS.COM/) BLOG (HTTPS://SFDCFACTS.COM/BLOG/) LIGHTNING  (HTTPS://SFDCFACTS.COM/CATEGORY/LIGHTNING/)

Like Page Watch Video


APEX  (HTTPS://SFDCFACTS.COM/CATEGORY/APEX/) INTERVIEW QUESTIONS  (HTTPS://SFDCFACTS.COM/CATEGORY/INTERVIEW-QUESTIONS/)
1 friend likes this
BEST PRACTICES  (HTTPS://SFDCFACTS.COM/CATEGORY/BEST-PRACTICES/) CERTIFICATION  (HTTPS://SFDCFACTS.COM/CATEGORY/CERTIFICATION/) 

SFDCFacts
about 2 weeks ago

Getting started with Salesforce


CPQ
https://sfdcfacts.com/…/getting-
started-with-salesforce-cpq/
This article will give you an
overview of different CPQ tools

INTERESTED IN SPONSORING MY BLOG? GET IN TOUCH (/SPONSOR)

THANK YOU FOR VISITING MY WEBSITE


Want to request a solution for your Business Case or have an amazing idea for an article?

CONTACT M E (/POST-AN-IDEA)

Home (Https://Sfdcfacts.Com/) About Me (Https://Sfdcfacts.Com/About-Me/) Blog (Https://Sfdcfacts.Com/Blog/)

Guides (Https://Sfdcfacts.Com/Guides/) Videos (Https://Sfdcfacts.Com/Video/) Subscribe (Https://Sfdcfacts.Com/Subscribe/)

 
(https://www.youtube.com/sfdcfacts) (https://twitter.com/manish_sfdc)
 
(https://www.facebook.com/sfdcfacts/) (https://www.linkedin.com/in/manish-choudhary/)

Worth your attention!!

 Become An Author(/become-an-author)
 Sponsor My Blog(/sponsor)
 Request For A Solution(/post-an-idea)
 Join my Mailing List(/subscribe)

Video Gallary

 Free Salesforce Admin Sessions(https://www.youtube.com/watch?v=AyOpbZtk0Uw&list=PLQXsHnNZgiNftAdsvhbVu0YV01mqc0zDl)


 Lightning Component Development Sessions(https://www.youtube.com/watch?v=FrnmcH0Lrkw&list=PLQXsHnNZgiNe35JsuHAb-PsDmD4kwEIsg)
 Advance Lightning Tutorials(https://www.youtube.com/watch?v=-HaECYSIX20&list=PLQXsHnNZgiNfBykysLpKUSLyrNpTsx5mA)
 Subscribe SFDCFacts YouTube Channel(https://www.youtube.com/sfdcfacts) 
https://sfdcfacts.com/lightning/interview-questions-lightning-framework-part-8/ 5/6
6/22/2019 Interview Questions – Lightning Framework – Part 8 – Lightning Locker, Aura Methods – SFDCFacts
(https://sfdcfacts.com/)

(https://sfdcfacts.com/)
HOME (HTTPS://SFDCFACTS.COM/) BLOG (HTTPS://SFDCFACTS.COM/BLOG/) LIGHTNING  (HTTPS://SFDCFACTS.COM/CATEGORY/LIGHTNING/)

APEX  (HTTPS://SFDCFACTS.COM/CATEGORY/APEX/) INTERVIEW QUESTIONS  (HTTPS://SFDCFACTS.COM/CATEGORY/INTERVIEW-QUESTIONS/)

BEST PRACTICES  (HTTPS://SFDCFACTS.COM/CATEGORY/BEST-PRACTICES/) CERTIFICATION  (HTTPS://SFDCFACTS.COM/CATEGORY/CERTIFICATION/) 

COPYRIGHT 2019 - SFDCFACTS BY MANISH CHOUDHARI


https://sfdcfacts.com/lightning/interview-questions-lightning-framework-part-8/ 6/6

S-ar putea să vă placă și