~/talk

Designing Classes with Controlled Cross-Context Dependencies Using a Preview Feature

TalkinJapaneseat PHP Conference Japan 2023 · on Sunday, 2023-10-08· [software-architecture, php]
links:none on file
slides:none on file

Shows how to obtain context-specific behavior by swapping concrete dependency bindings: admin preview routes use a ProductPreviewRepository that merges DB product rows with key-value preview drafts, while public pages use the normal repository. Uses Slim and PHP-DI (RDI-style modules) and Graphviz to visualize object graphs, demonstrates making dependencies one-directional (admin depends on public logic), reuses price-calculation classes so preview price recalculations work without changing preview code, and outlines routing or entry-point switching as deployment options.

AI-written summary · about

  1. 0:00Introduction
  2. 1:05Talk overview
  3. 3:15Web app contexts
  4. 5:28Dependency design principles
  5. 6:55User context implementation
  6. 8:30Admin preview implementation
  7. 10:35Dependency comparison
  8. 12:20Sale feature extension
  9. 14:22Startup configuration
  10. 16:51Flexible routing
  11. 19:19Documenting object graphs
  12. 20:45Best practices
  13. 22:30Q&A
~/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.