What is Salesforce Lightning?
Salesforce Lightning is a component based frame work for apps development. It is the latest version launched by the salesforce company with a robust set of tools and many other capabilities.
It has the following components:
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: It is 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.
Lightning Exchange: A section of the AppExchange where you can find 70+ partner components to jumpstart your development.
Lightning Design System: It is a 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.
Visual Building Tools: This is 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.
Can you explain Lightning Experience?
Lightning Experience: it refers to the new User Interface, which is developed by the Salesforce team and is built on a component-based framework and architecture driven by events that provide a highly dynamic and responsive experience to the user. This framework is so designed to give optimum performance by the Client side and the stateless Server architecture. Lightning Experience uses the open-source Aura framework. However, it has a completely re-designed framework that creates a modern user interface.
What are ethe lighting components? Where we can use Lightning Components?
Lighting components are the building blocks that make up salesforce itself. It is a UI Framework for building high performance desktop, web and mobile applications.
We can use Lightning Components in the following places:
- Drag-and-drop Components in the Lightning App Builder and Community Builder.
- Launch a Lightning Component as a Quick Action
- Override Standard Actions with Lightning Components
- Create Stand-Alone Apps
- Add Lightning Components to Lightning Pages.
- Add Lightning Components to Lightning Experience Record Pages.
How can you build Lightning Components?
For Building Components using two programming models: the Lightning Web Components model, and the original Aura Components model.
What is Lightning App Builder?
The Lightning App Builder is a point-and-click tool. Lightning app builder is used to create lightning pages for Salesforce Lightning experience and mobile apps. Lightning Pages are built using Lightning components which are compact, configurable, and reusable elements that you can drag and drop into regions of the page in the Lightning App Builder.
How to create Lightning Record Pages in Salesforce?
Using Lightning App Builder for creating Lightning Record Pages, to create the following three types of pages:
- Home Page
- Record Page
- App Page
How to open Lightning App Builder?
From Setup, enter App Builder in the Quick Find box, then select Lightning App Builder.
Click New, and select Page type you want to create.
Is Lightning as MVC framework?
No. It is Component based framework.
Can you explain, how can a Lightning component be used in a Visualforce page?
A Lightning Component can be embedded in any kind of webpage by a highly powerful and flexible feature called the Lightning out. In Visualforce, some level of complexity comes down. Lightning Component can be used in the Visualforce page in three steps:
- Add the Lightning Components for Visualforce JavaScript library for the targeted page of Visualforce using the tag.
- Next, a Lightning app has to be created and referred to in component dependencies.
- Finally, a JavaScript Function needs to be written which will ultimately create the component on the page by making use of $Lightning.createComponentt()
What options are there for Lightning Record Page assignment?
“Lightning Pages” can be assigned at three different levels:
- The org defaults
- App default – this overrides the assignment done at the org level
- App, record type, profile – this overrides the assignment done at org level and at the App level.
What is lightning:navigation in Salesforce Lightning component?
Lightning:navigation is used to navigate to a given pageReference.
Following are the supported type where we can navigate,
- Lightning Component
- Knowledge Article
- Named Page
- Navigation Item Page
- Object Page
- Record Page
- Record Relationship Page
- Web Page
What is Aura?
Aura is a one of the open source UI Frameworks. It is used in the development of dynamic web apps for both mobile and desktop devices. Aura gives scalable long-lived lifecycle support to the building of apps which are engineered for growth. Aura backs the partitioned multi-tier component development which bridges the client and the server. JavaScript is used on the client-side while Java is used on the server-side.
Can you explain aura: attribute?
They are like member variables in apex classes, are typed fields and instance of a component. All attributes have been assigned a name and a type that can be marked required by specifying ‘required=true’ and also has a default value. It has a naming rule.
- It should begin with a letter and an underscore.
- Mostly they contain only alphanumeric or underscore characters.
Where we can use 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.
What are attributes? What are their required parameters?
Attributes are variables which are used to store values. We specify the Name, Type, Default, Description, Access in the attribute definition. Only Name and Type are required parameters in the attribute definition, for example:
<aura:attribute name=”firstName” type=”String”/>
Which interface is used to get the id of the record from the record Detail page?
By Using, force:hasRecordId interface. Use this as opposed to the {!v.recordId} in controller we can get the id of the current record.
Which interface is used to be available for all pages?
By Using, flexipage:availableForAllPageTypes interface.
Which interface is used to override a standard action?
By Using, Lightning:actionOverride interface.
Which interface is used to be available only on the record home page?
By using, flexipage:availableForRecordHome interface.
Which interface is used to a tab?
Bu using, force:appHostable interface.
Which interface is used to a quick action?
By using, force:lightningQuickAction interface.
How can you access a value from an attribute?
Use “Value Provide” which is denoted with the symbol “v”, for example:
1<aura:attribute name=”firstName” type=”String”/>
What are component events?
Component events are events which are fired by child components and handled by the parent component. We can make use of this event when we need to pass a value from a child component to parent component.
What are application events?
It can be fired from any component and can be handled by any component. They do not require any kind of relationship between the components, but these components must be a part of a single application.
How can you define field level security in Lightning Components?
You will need to use Lightning:recordForm, Lightning:recordEditForm, Lightning:recordViewForm, force:recordData.
What is Lightning Out?
Lightning Out is one of features that lightning apps. If you want to use your component on an external site, you will need to use Lightning Out. The best advantage of Lightning Out is you can use the Lightning Component inside a Visualforce page and vice versa.
What are the phases in component events propagation?
There are two phases in component event propagation.
- Bubble Phase
- Capture Phase
What are the differences 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.
What is force:recordData, and what are its advantages?
force:recordData is a standard controller of a Lightning Component. We can perform an operation such as creating a record, editing a record,deleting a record using force:recordData. If we are using force:recordData, it identifies and eliminates the duplicate request going to the server if they are requesting for the same record data (which in turn improves performance).
What are all component bundles we deal with while working with Lightning Component?
Following are the component bundles we deal with while working with Lightning Component.
- Component: contains markup.
- Controller: handles the client side events.
- Helper: write the common logic inside helper which can be used by different controller methods, avoiding repetition.
- Style: contains the style for the component.
- Documentation: used to record the component’s use.
- Renderer: contains the default rendering behaviour of a component.
- SVG: the icon which gets displayed before the component name in the Lightning App Builder.
- Design: control which attribute we can expose to tools like the Lightning App Builder. It helps with component re-usability.
What are the phases in application events propagation?
- Bubble Phase
- Capture Phase
- Default Phase
How do the bubble phase and the capture phase propagate?
- Bubble phase: propagates from Bottom to Top.
- Capture phase: propagates from Top to Bottom.
What are the different types of attributes that we can use to store values?
- String
- Array
- Integer
- Boolean
- Date
- Datetime
- Double
- Decimal
- Long
- List
- Map
- set
- Standard object attribute – example: <aura:attribute name=”contactObj” type=”Contact”
- Custom object attribute – example A: aura:attribute name=”customObjectList” type=”customObject__c”/> OR example B: <aura:attribute name=”customObject” type=”customObject__c”/>
What are the uses of component events and application events?
Component events can be handled only by the components which are above them in the hierarchy of containment. Thus, the usage is limited to the components which need to know them.
Application events are best used when something is handled at the application level, like navigating to a particular record. Application events permit any communication between the components which are in separate parts of the application and have no direct containment relationship.
What are the different Lightning components Tools?
Lightning Connect
Lightning Schema Builder
Lightning Process Builder
Lightning App Builder
Lightning Component Framework