Header Ads Widget

topmost common salesforce lightning interview questions and answers 2018


Salesforce lightning Interview Question and Answers


What is Salesforce Lightning?

  1. Lightning is the umbrella term for the collection of tools and technologies e.g. Lightning component framework, lightning experience, lightning app builder etc.
  2. Lightning  became available in October 2015 with the release of Winter ‘16



What are Lightning components?

  1. Components are the self contained source and reusable units of an app.
  2. UI Framework - Built on Open Aura Framework.
  3. It is used for developing web apps - For mobile and desktop devices.
  4. It is a client server framework.
  5. It helps to accelerate the development.
  6. It helps to improve application peformance. It has stateful client and stateless server.
  7. It has several reusable out of the box components.
  8. A Component can contain other components, JS, HTML and CSS.
  9. Encapsulated, configured through attributes and communicate through events.
  10. LC are device aware and have cross browser compatibility.



What is Aura? What is the relation of Aura with Salesforce Lightning?

  1. It is a UI Framework for developing dynamic web apps for mobile and desktop devices.
  2. It is totally independent of Salesforce.
  3. It has several out of the box components like button,checkbox,datagrid etc.
  4. It is available at https://github.com/forcedotcom/aura
  5. The aura namespace contains components to simplify your app logic, and the ui namespace contains components for user interface elements like buttons and input fields.
  6. The Lightning Component framework is built on the open source Aura framework.





What is Lightning Experience

  1. Lightning Experience is the new, modern user experience and interface for using Salesforce.
  2. It has a modern and responsive design. It is optimized for users so that they can work very fast and easily on records so that they are more productive.
  3. Not every feature of Salesforce is supported in Lightning Experience yet. Because of this, Salesforce Classic – is still available, and users can switch between Lightning Experience and Salesforce Classic with ease.
  4. It is not necessary for the entire org to move to Lightning Experience at the same time. Certain users can enable Lightning Experience, while others can continue using Salesforce Classic.
  5. Admins can enable Lightning Experience access at the user, profile, and organization level.



What are Lightning Apps?



Lightning Apps are made of Lightning components.

  1. Lightning App  is a special top-level component whose markup is in a .app resource.
  2. You can Access app using url of this pattern https://.lightning.force.com//.app
  3. Mark up starts with
  4. Types

o   Standalone – can be hosted outside SF1 and LE, like lightning out and VF pages

o   Lightning Experience and SF1 – Can take advantage of record create and edit pages, among other benefits



What is pre-requisite for learning Lightning component development?

  1. Learn JavaScript. You must have intermediate level of JavaScript knowledge.
  2. Learn concept of web components like google polymer, react,etc
  3. Learn Single page app concept.
  4. CSS3 Knowledge.
  5. JavaScript debugging.
  6. Apex knowledge for server side logic coding.



What is a Lightning Component Bundle? OR What is a Lightning component made up of?



A component bundle contains a component or an app and all its related resources.

  1. CSS Styles
  2. Controller
  3. Design
  4. Documentation
  5. Renderer
  6. Helper
  7. SVG File



What are the types of events in Lightning?

  1. Component events are handled by the 
    • component itself or 
    • a component that instantiates or contains the component.
  2. Application events are handled by 
    • all components that are listening to the event. These events are essentially a traditional publish-subscribe model.



What is @AuraEnabled annotation used for?

  1. The @AuraEnabled annotation enables client side access to an Apex controller method.
  2. Providing this annotation makes your methods available to your Lightning components.
  3. Only methods with this annotation are exposed. 



What is Lightning Design System (SLDS)?

  1. The Salesforce Lightning Design System includes the resources to create user interfaces consistent with the Salesforce Lightning principles, design language, and best practices. 
  2. It helps to create an intuitive UI with less number of clicks which is modern and beautiful.



What is the use of access=“global”?

  • Mark your resources, such as a component, with access="global" to make the resource usable outside of your own org. For example, if you want a component to be usable in an installed package or by a Lightning App Builder user or a Community Builder user in another org.



What are Component Attributes?

  1. Component attributes are like member variables on a class in Apex.
  2. They are typed fields that are set on a specific instance of a component, and can be referenced from within the component's markup using an expression syntax. 
  3. Attributes enable you to make components more dynamic.
  4. Use the tag to add an attribute to the component or app.
  5. All attributes have a name and a type.
  6. Attributes may be marked as required by specifying required="true", and may also specify a default value.

  

What is Lightning Data Services?

  1. It is data Layer for Lightning
  2. Can be equated to Standard Controllers in Visualforce
  3. Use Lightning Data Service to load, create, edit, or delete a record in your component without requiring Apex code.
  4. No SOQL required.
  5. Lightning Data Service handles sharing rules and field-level security automatically.
  6. Declarative CRUD operations
  7. Auto notify on record changes
  8. Offline Access for Salesforce1
  9. Lightning Data Service improves performance and user interface consistency.



What is Salesforce Lightning CLI?

  1. It is part of  Salesforce DX CLI Command that lets you scan your code for general JavaScript coding issues and Lightning-specific issues.
  2. Useful for preparing your Lightning components code for LockerService enablement.
  3. Based on ESLint project.



Is Namespace required for lightning component creation?

  • If you’re not creating managed packages for distribution then registering a namespace prefix isn’t required, but it’s a best practice for all but the smallest organisations.





What are Local and Global ids with respect to lightning component?

  1. A component has two types of IDs: a local ID and a global ID. 
  2. You can retrieve a component using its local ID in your JavaScript code. 
  3. A global ID can be useful to differentiate between multiple instances of a component or for debugging purposes.
  4. Local ID is created by using the aura:id attribute.
  5. example
  6. To find the local ID for a component in JavaScript, use cmp.getLocalId()
  7. Every component has a unique globalId, which is the generated runtime-unique ID of the component instance.
  8. A global ID  is not guaranteed to be the same beyond the lifetime of a component, so it should never be relied on.



What is the requirement for a component to be used in a custom tab in lightning experience or Salesforce1?



  1. Add the force:appHostable interface to a Lightning component to allow it to be used as a custom tab in Lightning Experience or Salesforce1.
  2. Components that implement this interface can be used to create tabs in both Lightning Experience and Salesforce1.



What is FlexiPage?

  1. FlexiPage Represents the metadata associated with a Lightning page. 
  2. A Lightning page represents a customizable screen made up of regions containing Lightning components.


Post a Comment

0 Comments