User Interface20% of the exam

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.

Official exam objective
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

Default choice
Detail
LWC unless a needed feature isn't supported
Needs an Aura wrapper
Detail
Chatter extensions, global actions, list view and related list view actions, standard action overrides
Supported directly
Detail
Includes utility bars, flows, quick actions in Lightning Experience, custom tabs
Override interface
Detail
Aura component implements lightning:actionOverride
Containment
Detail
Aura can contain LWC; LWC can't contain Aura
Rebuild benefits
Detail
Responsive UX, latest WCAG, form factors, performance
PDF output
Detail
Visualforce renderAs="pdf"; getContentAsPDF() in Apex
Aura in Visualforce
Detail
Page can't then render as PDF
Task and Event
Detail
Not supported by UI API; use Apex
Sources for this section (8)
  • 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

Practice for the Platform Developer II exam