SOLID design principles
October 7th, 2009 by Benjamin Wagaman.Categorized as Ruby on Rails, programming.
I’m electronifying my notes from conferences and such. Here’s my notes from Jim Weirich’s SOLID design principles in Ruby talk from eRubyCon 2009.
1.) Single Responsibility Principle
a class should have 1 reason to exist
describe the purpose of your class in a single sentence (you shouldn’t need and/or)
2.) Open/Closed Principle
you should be able to extend a class’ behavior without modifying it
3.) Liskov Substitution Priniciple
require no more, promise no less
4.) Interface Segregation Principle
5.) Dependency Inversion Principle
depend on abstractions, not concrete-tions
** Note that my notes are a little bit shotty, because the days prior to the conference I was totally totally strapped at work and thus rest-deprived.
RSS Feed