Salesforce Lightning Interview Questions
In this post I am going to share Salesforce Lightning Interview Questions
What is Lightning?
Lightning is the collection of tools and technologies behind a significant upgrade to the Salesforce platform. Lightning includes:
- Experience: A set of modern user interfaces optimized for speed. This includes the Lightning Experience, Salesforce1 Mobile app and template-based communities.
- Visual Building Tools: Drag-and-drop technologies for fast and easy app building & customizations. Use the Lightning App Builder to customize the Lightning Experience and Salesforce1 Mobile app. Use the Community Builder to customize template-based communities.
- Lightning Exchange: A section of the AppExchange where you can find 70+ partner components to jumpstart your development.
- Lightning Design System: Style guides and modern enterprise UX best practices to build pixel perfect apps that match the look and feel of the Lightning Experience and Salesforce1 Mobile app.
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.
What is Aura? Why do I see the aura: namespace in the code?
Aura is the open source technology that powers Lightning Components. The aura: namespace contains all of the basic building blocks for defining components and applications.
Is Lightning an MVC framework?
No, it’s a component-based framework.
What is difference between Visualforce Components and Lightning Components?
Visualforce components are page-centric and most of the work is done on the server. Lightning is designed from the component up, rather than having the concept of a page as its fundamental unit. Lightning Components are client-side centric, which makes them more dynamic and mobile-friendly.
Where we can display lightning component?
There are a number of possibilities for display lightning component..
- Lightning Experience: We can display component in the Lightning Experience using the App Builder. We can edit the home page, edit a record detail page or create/edit a new app page to include it.
- Salesforce1 Mobile app: We can display component in the Salesforce1 Mobile app by creating a custom Lightning tab that references it and adding that tab in mobile navigation.
- Standalone Lightning app: By create a standalone Lightning app (e.g. myapp.app) and include component in this app. Access Lightning app by URL.
- Add Apps to the Lightning Experience App Launcher: Your Lightning Components apps and custom tabs are available from the App Launcher.
- Add Apps to Lightning Experience and Salesforce App Navigation: You can add Lightning components tabs to an app and they display as items in the app’s navigation bar.
- Lightning App Builder and Community Builder : We can display component in template-based (e.g. Napili) community using the Community Builder. Build custom user interfaces using your own Lightning components, or those you install from AppExchange, for desktop and mobile devices.
- Add Lightning Components to Lightning Pages: A Lightning Page is a custom layout that lets you design pages for use in the Salesforce mobile app or in Lightning Experience. You can use a Lightning Page to create an app home page and add your favorite Lightning component, such as the Expenses app we’ll be creating in this module, to it.
- Add Lightning Components to Lightning Experience Record Pages: You can customize Lightning Experience record pages by adding a Lightning Component.
- Launch a Lightning Component as a Quick Action: Create actions using a Lightning component, and then add the action to an object’s page layout to make it instantly accessible from a record page.
- Create Stand-Alone Apps: A standalone app comprises components that use your Salesforce data and can be used independently from the standard Salesforce environment.
- Run Lightning Components Apps Inside Visualforce Pages: Add Lightning components to your Visualforce pages to combine features you’ve built using both solutions. Implement new functionality using Lightning components and then use it with existing Visualforce pages.
- Run Lightning Components Apps on Other Platforms with Lightning Out: Lightning Out is a feature that extends Lightning apps. It acts as a bridge to surface Lightning components in any remote web container. This means you can use your Lightning components inside of an external site (for example, Sharepoint or SAP), or even elsewhere on the platform such as on Heroku.
- Customize Flow Screens: Create a flow to guide your users through a business process. By default, you can add simple fields like inputs or radio buttons to a flow screen. But with a custom Lightning component, you can fully customize the look-and-feel and functionality of your screen.
What are the different Lightning component bundles?
- Component :UI for lightning component
- Controller: Contains client-side controller methods to handle events in the component.
- Style: Contains styles for the component.
- Document: A description, sample code, and one or multiple references to example components
- Design: File required for components used in Lightning App Builder, Lightning pages, or Community Builder.
- SVG: Custom icon resource for components used in the Lightning App Builder or Community Builder.
- Renderer: Client-side renderer to override default rendering for a component.
Click Here for official Salesforce documentation.
What is Lightning Experience?
Lightning Experience is the name for the all new Salesforce desktop app, with new features, built with a modern user interface and optimized for speed.
What is Lightning Design System?
Style guides and modern enterprise UX best practices to build pixel perfect apps that match the look and feel of the Lightning Experience and Salesforce1 Mobile app. Click Here for official link.
What happens to my existing Visualforce Pages?
They’ll continue to be supported in the current UI and Lightning Experience. See the Trailhead module on this topic.
What are the type of events into Salesforce Lightning component?
- Application Event – Scope of this event is throughout the lightning App and any component which has registered for this event would get a notification.
- 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.
- System Event- these are the events fired by Salesforce’s system during the lifecycle of the lightning app.
What is the basic difference 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.
Which 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.
Can we Include One Lightning component to another ?
Yes we can include one Lightning component inside another Lightning component
How can we use Lightning Components with the Salesforce1 Mobile App ?
We can create a custom Lightning tab that points to our component and include that tab in our Salesforce1 Mobile navigation.
How can we use a lightning component in a VisaulForce Page?
A Lightning component can be embed in any webpage using a very powerful and flexible feature, Lighting out. When used with Visualforce some complexity becomes simpler.
Lightning component can be added to Visualforce page in three steps:
2. Next we have to create and refer a Lightning app which is used to the component dependencies.
How to ensure FLS while working with Lightning Component?
FLS and CRUD are not automatically enforced in the lightning component whenever any object is referenced in the Apex Controller and the component will display the fields and records for which the users do not have access. Therefore we should manually enforce the FLS and CRUD in the Apex Controller. Also when we use Lightning Data service it takes care of FLS and CRUD for us.
Please refer to below links for more detail about lightning:
I will keep adding more questions to Salesforce Lightning Interview Questions.