Exploring ObjectSpace

By James Dabbs, Ruby Instructor

I recently had a very interesting conversation with Chris Hoffman atDCRUG, talking about how to explore the object graph of a highly complex Rails app. I’ve been mulling over some of his ideas and found myself with a few hours to kill on a flight from Austin, so I dug in and did the following rather enjoyable bit of spelunking.

Here’s what I want –

  • A view of the ancestry lattice of each class
  • A view of the (has|belongs_to)_(many|one) relationships of reach class
  • A (summary) view of the message flow between instances of each class

preferably with some option for filtering down to only classes “of interest” (i.e. defined in this particular app, or not defined in Rails or something).

Ultimately, I’d love to produce a gem from this which mounts as a Rails engine exposing a rich D3 visualization of all those graphs. But it’s a short flight, so let’s start by proving the concept and make sure we have access to the data we need.

Read the rest on James’ blog

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

About theironyard

The Iron Yard exists to create exceptional growth and mentorship for people, their companies and their ideas through code education and startup accelerators.