Skip to content

Page logic conventions

Greg Bowler edited this page May 9, 2026 · 2 revisions
  • Capture the naming and structural rules for page logic files.

Naming conventions

  • File names.
  • Function names.
  • Action naming for do_*.

Structural conventions

  • Keep page logic thin.
  • Separate orchestration from business rules.
  • Bind output late in the request flow.
  • How to optionally wrap page logic in its own class.

Hypermedia

  • Hypermedia is HTML over HTTP - incredibly simple and well understood by developers and web browsers.
  • Use explicit actions.
  • Use redirects deliberately.
  • Keep side effects easy to trace.
  • Once functional, add fluid user experience without changing behavioural flow.

Move on to the view and binding reference page next.

Clone this wiki locally