PDI practice question 11 of 30

In terms of the MVC paradigm, what are two advantages of implementing the view layer of a Salesforce application using Lightning Web Component-based development over Visualforce? Choose 2 answers

Full set: 201 questions
Answer options
A: Rich component ecosystem Correct answer
B: Leg capturing via the Debug Logs Setup page
C: Built-in standard and custom set controllers
D: Self-contained and reusable units of an application Correct answer
Correct Answer:
A. Rich component ecosystem; D. Self-contained and reusable units of an application
Explanation

In the Model-View-Controller (MVC) paradigm, the view layer is the user interface. Lightning Web Components (LWC) offer significant advantages over Visualforce for building this layer. LWC is built on a modern, component-based architecture. This allows developers to create self-contained and reusable units of an application (D), which encapsulates their HTML, JavaScript, and CSS. This modularity improves maintainability and development speed. Furthermore, this component-based model fosters a rich component ecosystem (A), including a library of standard base components and numerous components available on the AppExchange, enabling developers to assemble complex UIs more efficiently than with Visualforce's more monolithic, page-centric approach.

Why Incorrect

B. Leg capturing via the Debug Logs Setup page: Debug logs are a platform-wide feature for troubleshooting server-side Apex code and transactions, not a specific advantage of the LWC view layer technology.
C. Built-in standard and custom set controllers: This is a defining feature of Visualforce, which uses standardController and standardSetController attributes to automatically handle data operations. LWC uses a different model based on wire services and imperative Apex calls.

References

1. Lightning Web Components Developer Guide, "What Is the Lightning Component Framework?": This section introduces the component-based architecture. It states, "This structure makes components self-contained. You can reuse a component on an application page, or in another component." This directly supports option D. The guide also highlights the "Component Library" and the ecosystem of pre-built components, supporting option A.

2. Lightning Web Components Developer Guide, "Compare Lightning Web Components and Aura Components": While comparing LWC to Aura, this section reinforces the benefits of a modern, standards-based component model over older frameworks, which by extension applies to the comparison with Visualforce. It emphasizes performance and adherence to web standards, which enable the creation of more robust, self-contained units (D).

3. Visualforce Developer Guide, "Standard Controllers" and "Standard List Controllers": These sections detail the standardController and standardSetController attributes, confirming that this feature is specific to the Visualforce framework, making option C incorrect as an advantage for LWC.

Scroll to Top