Back to daily archive
Development/

Adoption is architecture: Apex service layers

JSBC Labs retrospective note4 min read

Why this deserves attention

A service layer gives business operations a stable home outside triggers, controllers and transport-specific code. A sound design makes this explicit before implementation begins.

When logic is scattered across entry points, behaviour diverges and testing becomes needlessly expensive. On 7 January 2026, this archive entry records the principle as a practical design concern rather than a product announcement.

Design the human system

Look at apex service layers through how the user experience and operating model determine whether the capability is used. The objective is not to introduce more process; it is to expose the few decisions that determine reliability, ownership and future change.

Organise code around business capabilities, keep transaction coordination explicit and make dependencies replaceable in tests. Record the decision close to the solution so that delivery, support and future architecture reviews work from the same intent.

What good looks like

The same operation behaves consistently whether invoked by UI, API, Flow or scheduled processing. The team can describe the expected behaviour, the owner, the evidence of success and the response when reality differs from the design.

A useful next step is to review one live implementation against this principle, identify the largest unowned assumption and turn it into a bounded improvement with a measurable outcome.