~/talk

Design Patterns Workshop

Talkat SunshinePHP 2014 · 2014-02-06..02-08· [frontend-architecture]
slides:none on file

Covers SOLID then walks through eight common Gang of Four patterns with live PHP coding and concrete examples: a cache interface with APC and Memcached, decorator vs traits implementations, mediator used as a Gateway for value objects, abstract Factory vs Builder for object creation, chain of responsibility, strategy, observer, and why the Singleton is an anti-pattern (hard to test). Workshop format runs through code, diagrams and Q&A so the payoff is runnable patterns and caveats not theory.

AI-written summary · about

  1. 0:00Start
  2. 0:13Design patterns are often expressed in diagrams, not code.
  3. 1:52Developing a SOLID understanding
  4. 9:50Meyer's open/closed principle
  5. 18:04Program to an interface, not an implementation.
  6. 19:33Design by contract is a philosophy which states that designers should define formal, precise and verifiable interface specifications for software components.
  7. 21:24ALL instances of Cache should be substitutable for one another!
  8. 27:23The smaller your interface, the better your application.
  9. 34:09Type hinting
  10. 34:51By relying on abstractions, we free our application from dependency hell.
  11. 37:38The decorator pattern Composition over inheritance.
  12. 38:05PHP doesn't support multiple inheritance!
  13. 43:46Traits introduced in PHP 5.4
  14. 47:21Magic methods are not "part of the interface."
  15. 58:51The Mediator Pattern is great for loose coupling, because it discourages modules from talking to one another.
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 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
?
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.