~/talk

Design Patterns through Practical Examples

Talkat WordCamp Porto 2018 · 2018-05-18..05-19· [php, software-architecture]
slides:none on file

Practical walkthrough of a real WordPress plugin that applies concrete patterns and working code: Decorator adds caching by wrapping the data fetcher so consumers and producers don’t change, a Template uses PHP output buffering with pluggable relative paths and nested subviews, Strategy replaces big switch statements with comparator objects, Null Object returns a neutral view instead of false to avoid fatal errors, and Value Objects enforce Email validation and use DateTimeImmutable; examples run in PHP and show the patterns integrated with a DI container and even Amazon SES for sending mail.

AI-written summary · about

  1. 0:00Start
  2. 10:22Simple Factory Example
  3. 13:03Abstract Factory Example
  4. 17:04Template Method Example
  5. 23:07Decorator Example
  6. 30:31Strategy Example
  7. 40:26Value Object Example
  8. 42:35Mutable Value Object can cause Aliasing Bugs
  9. 43:55Prefer Immutable Value Objects instead
  10. 47:38Proxy Example
~/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.