Top 25 Salesforce Lightning Interview Questions You Must Prepare 23.Jul.2024

Q1. Can We Make A Lightning Component That Shows Up In Both The Mobile And The Desktop User Interfaces ?

We can use Lightning Components directly in Lightning Experience, the Salesforce1 Mobile app, template-based communities, and custom standalone apps. Additionally, we can include Lightning components in a Visualforce page, that allowing us to use them in Salesforce Classic, Console, and Visualforce-based communities.

Q2. What Is Lightning Experience?

Lightning Experience is the name for the all new Salesforce desktop app, with over 25 new features, built with a modern user interface and optimized for speed.

Q3. Is Lightning An Mvc Framework ?

No, it’s a component-based framework.

Q4. What Are The Advantages Of Lightning ?

The benefits include an out-of-the-box set of components, event-driven architecture, and a framework optimized for performance.

Out-of-the-Box Component Set -: Comes with an out-of-the-box set of components to kick start building apps. You don’t have to spend your time optimizing your apps for different devices as the components take care of that for you.

 Rich component ecosystem-: Create business-ready components and make them available in Salesforce1, Lightning Experience, and Communities.

Performance – :Uses a stateful client and stateless server architecture that relies on JavaScript on the client side to manage UI, It intelligently utilizes your server, browser, devices, and network so you can focus on the logic and interactions of your apps.

Event-driven architecture -: event-driven architecture for better decoupling between components

Faster development – : Empowers teams to work faster with out-of-the-box components that function seamlessly with desktop and mobile devices.

Device-aware and cross browser compatibility – : responsive design,supports the latest in browser technology such as HTML5, CSS3, and touch events.

Q5. Do We Need A Namespace To Develop Lightning Components ?

No. Lightning Components used to require a namespace, but that is no longer a requirement.

Q6. What Is Aura? Why Do We Use 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.

Q7. Is There Any Limit On How Many Component To Have In One Application ?

there is no limit.

Q8. Does Lightning Work With Visualforce ?

yes Lightning work with Visualforce.

Q9. 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.

Q10. Which Parts Of Lightning Components Are Server-side And Which Are Client-side ?

Lightning Components are use JavaScript on the client side and Apex on the server side.

Q11. Are Lightning Components Intended Only For Mobile Apps ?

Components have been built to be mobile first, but with responsive design in mind. With Lightning we can build responsive apps fast for desktop, mobile and tablets.

Q12. 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 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.

Q13. Do I Always Create An App Bundle First When Develop Lightning Component ?

Not necessarily, We can start with a Component bundle.

Q14. Is Lightning Components Replacing Visualforce ?


Q15. Can We Integrate Lightning Components With Another Framework, Such As Angular?

Yes. we can include the working 3rd party code inside a Visualforce Page, embed the Visualforce Page inside a Lightning Component. This Lightning Component can be used as any other Lightning Component in various environments.

Q16. What Is The Use Of The Aura:method Tag In Lightning ?

we can Use < aura:method > to define a method as part of a component’s API. This enables us to directly call a method in a component’s client-side controller instead of firing and handling a component event. Using simplifies the code needed for a parent component to call a method on a child component that it contains.

Q17. 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.

Template-based community: we can display component in template-based (e.g. Napili) community using the Community Builder.

Standalone Lightning app: By create a standalone Lightning app (e.g. and include component in this app. Access Lightning app by URL.

Q18. What Happens With Existing Visualforce Pages In Lightning Experience ?

They’ll continue to be supported in the current UI and Lightning Experience.

Q19. 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.

Lightning Component Framework: A JavaScript framework and set of standard components that allow you to build reusable components to customize the Lightning Experience, Salesforce1 Mobile app and template-based communities and build your own standalone apps.

Visual Building Tools: Drag-and-drop technologies for fast and easy app building & customization’s. 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 jump-start 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.

Q20. How Can We Deploy Components To Production Org ?

we can deploy component by using managed packages, IDE, Migration Tool or Change Sets.

Q21. Can We Make One Component Inherit Styles/css From A Parent Component, Or Must We Always Define It In The Component ?

Yes, we can inherit styles from parent. there is no need to always defined in the component.

Q22. Can We Include One Component To Another ?

Yes, we can Include one lightning component to another lightning component

Q23. How Can We Use Lightning Components With The Salesforce1 Mobile App ?

By Create a custom Lightning tab that points to our component and include that tab in our Salesforce1 Mobile navigation.

Q24. Can We Include External Javascript/css Libraries In Components ?

Yes ! we can use multiple libraries in our lightning component like JQuery, Bootstrap, custom CSS and custom Javascript libraries from a local resource (static resource).

Q25. Are There Any Css (styles) Provided By As Part Of The Supported Lightning Components ?

Yes. Salesforce Lightning Design System.