SOLID Ruby
summary
Argues that SOLID still matters for Ruby but maps to code to protocols rather than interfaces, demonstrates SRP by splitting rake’s application and task manager, shows an XML::Builder example that uses the shovel protocol, reproduces the thermostat/furnace design to teach dependency inversion, uses sqrt implementations to explain Liskov substitution, warns against monkey‑patch clobbering of a logger and prefers subclassing, and shows a working Arduino Pomodoro flag project as a concrete build.
AI-written summary · about
chapters (16)
- 0:00Start
- 2:21Great Fire of London
- 8:56Cars depend on Engines
- 9:38Car depends on Vehicle
- 12:37Single Responsiblity Principle
- 14:55Open/Closed Principle
- 28:06Liskov Substitution Principle
- 30:38Two Questions • What does the method require? • What does the method promise?
- 32:01Client Software
- 33:33Worse Promise - FAIL
- 35:16Complex Math Contract
- 35:29Less Restrictive Requirement - OK
- 37:03More Restrictive Requirement - FAIL
- 38:34Wildcard Keyboard/Display
- 40:05ISP with Protocols?
- 41:13For Discussion
related talks
29mSOLID Design Principles in Ruby
27mSOLID principles through tests
32mruby best practice patterns
39mFunctional Architecture for the Practical Rubyist
28mRuby for your two internal programmers
30mRuby Techniques by Example
39mFunctional Architecture for the Practical Rubyist
41m"Tackling complex architecture in Ruby"
