~/talk

Components Reconsidered

Talkat CakeFest 2021 · 2021-10-07..10-08· [php, developer-experience]
name:Sho Ito
links:none on file
slides:none on file

CakePHP offers three concrete reuse choices: Components for controller-scoped bundles that expose lifecycle hooks and shared state (easy to drop into controllers but can become stateful and hard to unit test); Traits for tiny, compile-time code reuse of methods (simple and zero-config but not replaceable and harder to mock); and Dependency Injection (CakePHP 4.2+) for swapping concrete services and improving testability. Choose Components for controller behaviors, Traits for trivial helpers, and DI when you need replaceable, mockable services and clear boundaries.

AI-written summary · about

  1. 0:00Introduction and background
  2. 3:54What are components?
  3. 7:30Component testing basics
  4. 11:50Use cases and examples
  5. 17:57Component design principles
  6. 23:36Summary and takeaways
~/search
type to search 8,222 conferences, 162,397 speakers and 219,688 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
← →
on a talk: 5 seconds back / forward
0–9
on a talk: jump to 0%–90% of the recording
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.