About
Hi! I'm Avdi Grimm, and this is my software development blog. More...
Books and Screencasts
Objects on Rails
A developer notebook on applying classic Object-Oriented principles to Ruby on Rails projects.
-
Subscribe
-
Recent Posts
Archives
Categories
Meta
Tag Archives: oop
Decoration is best, except when it isn’t
I think by now we all know to prefer composition over inheritance. But in a language with a lot of options, what’s the best kind of composition to use? Composing an adventure Consider an adventure game, with objects representing player … Continue reading
End your OOP Confusion with the Design Pattern Classifier
The Ruby community has seen a renaissance of interest in classic Object-Oriented thinking lately. We’re talking about Presenters, and DCI, and Data Objects. But with these new discussions come new problems. Namely: the dreaded pattern terminology debate. He says it’s a Decorator. … Continue reading
Object Oriented Programming Books
A few people have asked for recommendations of good foundational Object Oriented Programming texts. The truth is I’m kind of behind on my formal OOP reading, and some of the early texts I read I wouldn’t recommend. My first proper OOP book was … Continue reading
Early access beta of “Objects on Rails” Now Available
UPDATE: Objects on Rails is now complete and freely available online. Often, at conferences and users group meetings, I find myself discussing the intersection of Ruby on Rails, Object-Oriented development, and Test-Driven Development, and I’ll mention something like “I prefer to develop my … Continue reading
You Can’t Subclass Integers in Ruby
This post is mainly just an excuse to test a Gist plugin for WordPress. Occasionally, you might think it would be handy to subclass Numeric types such as Integer. For instance, you might want to create a constrained integer which … Continue reading
Demeter: It’s not just a good idea. It’s the law.
Is #try really so bad? In response to my recent post about #try being a code smell, a lot of people made the reasonable objection that the example I used—of using #try on a a Hash—was a pathological case. A … Continue reading
Posted in Ruby
Tagged bdd, coupling, demeter, design, law of demeter, objects, oo, oop, ruby, Ruby on Rails, structural coupling, tdd, testing
72 Comments




