RubyConf 2010 - Putting On Your Birthday Suit by: Glenn Vanderburg
Channel: Confreaks
Date: 07/04/2015

At first glance, Ruby seems like a natural fit for a â€œnaked objectsâ€ system. Existing frameworks for naked objectsâ€”primarily Java-basedâ€”are high in ceremony, and tend to intrude into the domain object declarations. Ruby's open nature (and especially its easy reflection) suggest that naked objects might be more successful in Ruby than they have been in other languages. Hirsute is a naked objects framework and interface for Ruby, begun as a Whyday project. The process of building Hirsute has taught me some interesting lessons about the requirements for naked objects. In particular, a truly â€œnakedâ€ object, even one with the adornments provided by ActiveRecord and ActiveModel, provides insufficient information to allow us to automatically build even a passable user interface for it. Most interestingly, the additional declarations required would also be very useful even outside a naked objects interface. My hypothesis is that the weaknesses exposed by trying to build an effective naked objects system in Ruby can show us how to build richer, more reflective, and more useful domain models for Ruby programs of all kinds. This talk provides an overview of naked objects and the Hirsute framework, and concludes with a discussion of some insights into domain modeling in Ruby.