~/talk

Ruby Mediator

Talkat RubyConf India 2024 · 2024-11-29..11-30· [ruby]
slides:none on file

Shows a concrete Ruby implementation: a Mediator class that registers devices and exposes lock_device / unlock_device methods which Tenant and Landlord call instead of calling Device directly. Example classes are Device, Tenant, Landlord with the mediator forwarding calls and invoking tenant/landlord notification methods. Demonstrates that renaming internal Device methods only requires changing the mediator (no other files), cuts testing surface and release time, and warns the mediator can become a God object if it grows too large.

AI-written summary · about

  1. 0:00Introduction and speaker
  2. 0:51What are design patterns
  3. 3:11Problem with tight coupling
  4. 3:33Mediator design pattern explained
  5. 6:31Core components of mediator
  6. 8:43Benefits of mediator pattern
  7. 10:17Demo tight coupling issue
  8. 13:11Implementing mediator in Ruby
  9. 15:40Testing changes with mediator
  10. 16:47Potential drawbacks
  11. 17:09Recap and key takeaways
~/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.