Choosing LWC, Aura or Visualforce
How to pick the UI technology from the requirement: Lightning web components by default, an Aura wrapper for global actions, list view actions and standard action overrides, the one-way Aura-to-LWC containment rule, Visualforce for PDF output, and Lightning Data Service versus Apex for the component's data.
Given a set of requirements, select the appropriate LWC, Aura Component, or Visualforce solution and identify its benefits.
~7 min read · 7 practice questions ·
What the exam expects
- Recommend Lightning Web Components for new UI and name the benefits Salesforce cites over Aura and Visualforce.
- Identify the tools that don't support Lightning web components directly and wrap the component in Aura for them, including standard action overrides.
- Apply the containment rule: Aura can contain Lightning web components, never the reverse.
- Keep Visualforce where it is still the right tool, such as PDF output, and decide when to rebuild a Visualforce page instead.
- Choose Lightning Data Service or Apex for the component's data.
Key terms: Aura wrapper (a thin Aura component that gives a Lightning web component access to an unsupported experience or interface), lightning:actionOverride (the Aura interface that lets a component override a standard action), interoperability layer (what lets Aura and LWC work together in one app), PDF rendering service (Visualforce's renderAs="pdf"), Lightning Data Service (the managed client cache behind base record components and lightning/ui*Api adapters).
The PD I basics (targets, quick actions, Visualforce controllers) are in the Platform Developer guide's Placing Lightning components, flows and Visualforce; this unit adds the PD II trade-offs.
Key facts
- Detail
- LWC unless a needed feature isn't supported
- Detail
- Chatter extensions, global actions, list view and related list view actions, standard action overrides
- Detail
- Includes utility bars, flows, quick actions in Lightning Experience, custom tabs
- Detail
- Aura component implements
lightning:actionOverride
- Detail
- Aura can contain LWC; LWC can't contain Aura
- Detail
- Responsive UX, latest WCAG, form factors, performance
- Detail
- Visualforce
renderAs="pdf";getContentAsPDF()in Apex
- Detail
- Page can't then render as PDF
- Detail
- Not supported by UI API; use Apex
Sources for this section (8)
- How to Choose LWC or Auradeveloper.salesforce.com (opens in a new tab)
- Supported Targets and Toolsdeveloper.salesforce.com (opens in a new tab)
- Override Standard Actions with Auradeveloper.salesforce.com (opens in a new tab)
- LWC and Aura Working Togetherdeveloper.salesforce.com (opens in a new tab)
- Why LWC instead of Visualforcedeveloper.salesforce.com (opens in a new tab)
- Render as PDFdeveloper.salesforce.com (opens in a new tab)
- Lightning Components in Visualforcedeveloper.salesforce.com (opens in a new tab)
- Data Guidelinesdeveloper.salesforce.com (opens in a new tab)
- Why can't a new LWC display an existing Aura component inside its template?
- When does a Lightning web component need an Aura wrapper?
- Why is PDF output a reason to keep Visualforce?
- Which benefits does Salesforce cite for rebuilding Visualforce as LWC?
The questions are free to read. Answers with their sources and self-grading are included with the pack.
Keep reading with the Platform Developer II pack
- Core concepts
- Exam traps
- Worked scenario
The pack includes:
- All 28 lessons of the Platform Developer II guide, with reading progress
- Interactive decision walks and step-by-step sequence steppers
- Inline practice questions and one-click topic practice (7 questions for this lesson)
- An official source cited for every claim
- An AI tutor that answers from the guide
- Unlimited timed practice exams