Value Objects

In this episode, Ben and Joe discuss value objects. You can learn more about value objects in Ruby Science, or on Martin Fowler's blog. You might also want to try you hand at our Extract Value Object exercise.
This is a companion discussion topic for the original entry at

hey guys, love the videos but unfortunately I don’t think this one did a great job of explaining value objects. The colour (I’m british ;)) example was pretty confusing, especially without seeing any code examples. The really good bit of value objects (how two instances are equal) doesn’t get talked about until ~7mins or something. This could have been explained with some decent examples such as:

Color.new_from_rgb(255, 0, 0) == Color.new_from_hex('#ff0000') # explicit static methods to show instances are created

Describing how integers could be value objects was quite confusing too (you’re right, they could be) but there are plenty of better things that could have been used as an example to describe a value object: email address, currency, temperature, weight, etc.

keep up the good work! I look forward to fridays to see the latest video from you both :+1:


An applied example would’ve been nice. I’m left kinda clueless as to how I’m going to implement what was said here!


After watching this episode, still have no clue about how to implement value object. I’d could use some code examples as well. I found some examples on this link: Maybe helpful to other people too.

1 Like

@wiserfirst thanks for sharing this link that’s what I was looking for. I would also recommend the Value Objects chapter in The Rails 5 Way.

This video needs some kind of code examples to be of any practical help!

When I try to access the exercise’s link, it redirects me to and I get an ERR_NAME_NOT_RESOLVED

Hi @duduribeiro, sorry for the trouble there. It should be linking to I’ve updated the show notes as well to prevent further confusion.

1 Like

Thanks so much @christoomey. It is working now.