Lightning FAQs

What is Lightning?
Lightning is the collection of tools and technologies behind a significant upgrade to the Salesforce platform. Lightning includes:

  1. Experience: A set of modern user interfaces optimized for speed. This includes the Lightning Experience, Salesforce1 Mobile app and template-based communities.
  2. 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.
  3. 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.
  4. Lightning Exchange: A section of the AppExchange where you can find 70+ partner components to jumpstart your development.
  5. 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 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.
Where can a component be displayed?
After you create a component, you will want to display it somewhere. There are a number of possibilities.

  • Lightning Experience: Display your component in the Lightning Experience using the App Builder. You can edit the home page, edit a record detail page or create/edit a new app page to include it. Alternatively, you can create a custom Lightning tab that references your component and add that tab to your Lightning navigation.
  • Salesforce1 Mobile app: Display your component in the Salesforce1 Mobile app by creating a custom Lightning tab that references it and adding that tab in your mobile navigation.
  • Template-based community: Display your component in your template-based (e.g. Napili) community using the Community Builder.
  • Standalone Lightning app: Create a standalone Lightning app (e.g. myapp.app) and include your component in this app. Access your Lightning app by URL.
What is the difference between Visualforce & Lightning Components?
  • Lightning components are client-side focused, making them more dynamic and mobile friendly. where as Visualforce components are page-centric and rely heavily on server calls.
  • Lightning components use Apex on the server side, organizations that can’t use Apex code can’t create Lightning components, but they can use Visualforce
Is Lightning an MVC framework?
No, it’s a component-based framework.



Now that Lightning Components are generally available, when would it still be appropriate to use Visualforce?
Visualforce provides the facility for delivering template-driven web pages and email messages. In addition, developers wishing to simply utilize a basic container and maintain more control over the lifecycle of the request may choose Visualforce pages. Finally, organizations that can’t use Apex code can’t use Lightning Components, but they can use Visualforce.
How do I use Lightning Components with the Salesforce1 Mobile App?
Create a custom Lightning tab that points to your component and include that tab in your Salesforce1 Mobile navigation.
Do we need to create Lightning App to create a Lightning Component?
No, we can create Lightning Components directly.
Which parts of Lightning Components are server-side and which are client-side?
Lightning Components can use JavaScript on the client side and Apex on the server side.
Can I make one component inherit styles/CSS from a parent component, or must I always define it in the component?
Yes, you can inherit styles.



Can I make a Lightning Component that shows up in both the mobile and the desktop user interfaces?
You can use Lightning Components directly in Lightning Experience, the Salesforce1 Mobile app, template-based communities, and custom standalone apps. Additionally, you can include Lightning components in a Visualforce page, allowing you to use them in Salesforce Classic, Console, and Visualforce-based communities.
How do I deploy components to my production org?
You can develop Lightning Components in a sandbox or Developer Edition org and then deploy them to any organization that supports Apex using managed packages, Force.com IDE, Force.com Migration Tool or Change Sets.
How is Lightning aware of what record you are on if you embed it in Salesforce1? (i.e. how do you get the ID of the record you are on like in a standard controller)?
Your component just needs to implement the force:hasRecordId interface and the record and recordId will be automatically injected when your component is wired into record home.
Are Lightning Components intended only for mobile apps?
Components have been built to be mobile first, but with responsive design in mind. With Lightning you can build responsive apps fast for desktop, mobile and tablets.
I already have a Developer Edition I use for a package I uploaded to the AppExchange. Should I use this namespaced org to create my Lightning Components or get a new one?
If Lightning Components are useful for your current app, you may want to use them in your existing org. If you’re creating a separate app, you might want to consider using a new namespace for it. This best practice isn’t particularly specific to Lightning Components.



Are there any CSS (styles) provided by salesforce.com as part of the supported Lightning Components?
How much Javascript do I need to know to develop Lightning Components?
Yes. You need at least intermediate-level JavaScript knowledge.
Are Lightning Components supported in all Salesforce Organizations?
No, Organizations that can’t use Apex code can’t use Lightning Components, but they can use Visualforce.
Visualforce already has components. How are Lightning Component different and why would I want to use them?
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.
Does Lightning work with Visualforce?



Will Lightning Components be replacing Visualforce and how to decide which one to use?
Nope. Both have their pros and cons and their use depends on the requirement.
More info here.
How to create custom pages for Lightning Experience?
We can use the Lightning App Builder to create custom pages for Lightning Experience.
What is the Lightning App Builder?
The Lightning App Builder provides an easy to use graphical interface for creating custom Lightning Pages for Salesforce1 and Lightning Experience. Lightning Pages are built using Lightning components—compact, configurable, and reusable elements that you can drag and drop into regions of the page in the Lightning App Builder.
What & how many types of custom pages can be created using The Lightning App Builder?
Using The Lightning App Builder we can create 3 types of pages namely,

  1. App Page – Build a one-page app for Lightning Experience and Salesforce1 using standard and custom Lightning Components.
  2. Home Page – Used to customize the Lightning Experience Home pages.
  3. Record Page – Used to customize Lightning Experience Record pages.
What is LockerService in Lightning?
LockerService is a powerful security architecture for Lightning components. LockerService enhances security by isolating individual Lightning components in their own namespace. LockerService 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.



What Does LockerService affect?
LockerService enforces security in:

  • Lightning Experience
  • Salesforce1
  • Template-based Communities
  • Standalone apps that you create (for example, myApp.app)
Does LockerService affect Salesforce Classic?
LockerService doesn’t affect Salesforce Classic, Visualforce-based communities, Sales Console, or Service Console, except for usage of Lightning components in Visualforce in these contexts.
What is 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), in a hybrid app built with the Mobile SDK, or even elsewhere in the App Cloud like on Heroku.

Content Credit(Partly): Salesforce Docs



Stay update with our latest posts by subscribing to our newsletter. It is free!




The Blog Of Minerva.