Advanced 25 min read

Capstone Requirements and Architecture Planning

By the end of this lesson, you'll be able to:

  • Gather and structure a feature's requirements before writing any code
  • Plan a Controller/Service/Selector Apex architecture and component tree up front
  • Identify security, performance, and mobile constraints as explicit requirements, not afterthoughts

Prerequisites: Module 19: "Project: Configurable Enterprise Dashboard"

The Scenario

A stakeholder request: "Build a Customer Success Command Center for support reps to manage open Cases and see the related Account and Opportunity context in one place, usable from both desktop and the Salesforce Mobile App."

This single scenario drives all four lessons in this module — planning here, a real Apex data layer next, real components after that, then tests and deployment to close the loop.

Functional Requirements

  1. View and filter open Cases.
  2. Update a Case's status inline, without leaving the workspace.
  3. View a summary of the related Account, including its open Opportunities.
  4. Create a new Case directly from the workspace.
  5. Work correctly on both desktop and the Salesforce Mobile App.

Non-Functional Requirements

Requirement (5) alone, and the reality of who uses this feature and how, drives several explicit non-functional requirements — each tracing directly back to a specific module in this course:

  • Security — every operation must respect CRUD/FLS/sharing via AccessLevel.USER_MODE (Module 12), not system-mode defaults.
  • Performance — avoid redundant server calls; reuse LDS caching and normalized wire parameters where possible (Module 13).
  • Mobile support — declare supportedFormFactors and use a responsive SLDS layout from the start (Module 18).
  • Testability — both Jest and Apex test coverage for anything shipped (Module 14).

Planning the Architecture Before Writing Code

Apex layers (Module 16): CaseSelector/AccountSelector for query isolation, a CommandCenterService for the actual business logic, and a thin CommandCenterController as the LWC-facing contract.

Component tree (Module 5's composition, Module 9's structure): a parent commandCenter component orchestrating two children — caseList (a datatable, Module 10) and accountSummary (an LDS-backed view, Module 6) — plus a "New Case" modal (Module 9).

Sketching this out before writing any code is deliberate — it's what lets Lessons 2 and 3 implement each piece with a clear, agreed shape to build toward, rather than improvising the architecture as code is written.

Exercise

Given the functional requirements above, write, as a comment, which single non-functional requirement most directly explains why AccessLevel.USER_MODE must be used throughout the Apex layer.

Show hint

Which of the four non-functional requirements is this?

APEX

Exercise

Challenge: explain, as a comment, why the component tree (commandCenter → caseList/accountSummary) is sketched out before any component code is written.

Show hint

Think about what problem this avoids during implementation.

JAVASCRIPT

Capstone Requirements and Architecture Planning Quiz

1. What functional requirement drives the mobile-related non-functional requirement?

2. What enforces the security non-functional requirement in Apex?

3. What are the three planned Apex layers for this capstone?

4. What is the parent component in the planned component tree?

5. Why is architecture planned before any code is written?

Log in to submit the quiz and save your score.

My Notes

Log in to keep private notes on this lesson.

Questions about this lesson

No questions yet — be the first to ask.

Log in to ask a question about this lesson.

Summary

The capstone begins the way a real feature should — with a clear scenario, explicit functional and non-functional requirements, and a planned architecture, all decided before a single line of code is written.