UI & Lightning Experience Development Flashcards

1
Q

Q. What is Lightning Experience in Salesforce?

A

A. Lightning Experience is Salesforce’s modern UI, providing enhanced user experience, performance, and functionality compared to Classic.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Q. What are the key benefits of Lightning Experience?

A

. - Modern and responsive UI
- Enhanced performance
- Dynamic components
- Drag-and-drop customization
- Mobile compatibility

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Q. What is the difference between Salesforce Classic and Lightning Experience?

A

A. Lightning Experience has a more modern UI, supports Lightning Web Components (LWC), and provides enhanced customization features.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Q. What is Lightning App Builder?

A

A. A drag-and-drop tool to create custom pages using Lightning components.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Q. What are the different types of pages you can create in Lightning App Builder?

A
  • Home Pages
  • Record Pages
  • App Pages
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Q. What are Lightning Record Pages?

A

A. Customizable record layouts that allow users to arrange Lightning components dynamically.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Q. What are Dynamic Forms?

A

A. A feature that allows field visibility rules and layouts to be controlled dynamically.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Q. What is a Lightning Web Component (LWC)?

A

A. LWC is a modern UI framework built on Web Standards (JavaScript, HTML, and CSS) to create reusable UI components in Salesforce.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Q. How do LWC and Aura components differ?

A

A. LWC is optimized for performance and built on modern web standards, whereas Aura is an older framework with more overhead.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Q. What are the key benefits of LWC?

A
  • Faster performance
  • Uses standard web technologies
  • More secure and efficient
  • Reusable and modular
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Q. What are the key files in an LWC component?

A
  • .html (template)
  • .js (JavaScript logic)
  • .css (styling)
  • .xml (metadata configuration)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Q. What is an example of a simple LWC component?

A

// helloWorld.js
import { LightningElement } from ‘lwc’;
export default class HelloWorld extends LightningElement {
message = ‘Hello, Salesforce!’;
}

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Q. What is an example of a simple LWC component?

A

<!-- helloWorld.html -->

<template>
<p>{message}</p>
</template>

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Q. What is the purpose of the .xml configuration file in LWC?

A

A. It defines component properties, visibility, and where the component can be used.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Q. What is an Aura Component?

A

A. A UI framework for building dynamic web applications in Salesforce, older than LWC.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Q. What are the key files in an Aura component?

A
  • .cmp (component markup)
  • .js (controller logic)
  • .css (styling)
  • .xml (metadata)
17
Q

Q. What is an example of a simple Aura component?

A

<!-- HelloWorld.cmp -->

<aura:component>
<p>Hello, Salesforce!</p>
</aura:component>

18
Q

Q. Should new development be done using Aura or LWC?

A

A. LWC should be used for new development due to better performance and maintainability.

19
Q

Q. How do LWC components communicate with each other?

A
  • Parent-to-Child: Pass properties using @api
  • Child-to-Parent: Use custom events
  • Sibling Communication: Use Lightning
  • Message Service (LMS)
20
Q

Q. How do you expose a public property in LWC?

A

Use the API decorator

import { LightningElement, api } from ‘lwc’;
export default class MyComponent extends LightningElement {
@api myProperty;
}

21
Q

Q. How do you send a custom event from a child to a parent component in LWC?

A

// ChildComponent.js
this.dispatchEvent(new CustomEvent(‘myevent’, { detail: ‘Data from Child’ }));

<!-- ParentComponent.html -->

<template>
<c-child-component onmyevent={handleEvent}></c-child-component>
</template>

// ParentComponent.js
handleEvent(event) {
console.log(event.detail);
}

22
Q

Q. What is the Lightning Message Service (LMS)?

A

A. A publish-subscribe model that allows communication between components across different DOM trees.

23
Q

Q. What is Salesforce Lightning Design System (SLDS)?

A

A. A CSS framework provided by Salesforce to ensure consistent UI/UX.

24
Q

Q. How do you use SLDS in an LWC component?

A

A. SLDS classes are used directly in HTML elements.

<template>
<div>Hello, Salesforce!</div>
</template>

25
Q

Q. What are Quick Actions in Salesforce?

A

A. Custom actions added to records or pages to execute common tasks.

26
Q

Q. What are the types of Quick Actions?

A
  • Object-Specific Actions (for a specific object)
  • Global Actions (available across Salesforce)
27
Q

Q. How do you navigate to a record in LWC?

A

A. Use the NavigationMixin from lightning/navigation.

import { LightningElement } from ‘lwc’;
import { NavigationMixin } from ‘lightning/navigation’;

export default class NavigateToRecord extends NavigationMixin(LightningElement) {
navigateToRecord() {
this[NavigationMixin.Navigate]({
type: ‘standard__recordPage’,
attributes: {
recordId: ‘001XXXXXXXXXXXXXXX’,
actionName: ‘view’
}
});
}
}

28
Q

Q. What is lightning-record-form?

A

A. A component that provides an out-of-the-box UI for creating and editing records.

29
Q

Q. What is lightning-record-edit-form?

A

A. A customizable form component that allows more control over record editing.

30
Q

Q. How do you retrieve record data using lightning-record-form?

A

<lightning-record-form
record-id=”001XXXXXXXXXXXXXXX”
object-api-name=”Account”
fields={fields}>
</lightning-record-form>

31
Q

Q. What are best practices for improving LWC performance?

A
  • Use wire adapters for reactive data retrieval
  • Minimize DOM reflows
  • Use lazy loading
  • Reduce client-side computations
  • Avoid SOQL inside loops
32
Q

Q. How does Salesforce enforce security in LWC?

A
  • Uses Lightning Locker Service for security
  • Enforces CRUD and FLS checks
  • Implements CSP (Content Security Policy)