Thursday 15th March, 2012
1:30pm to 2:00pm
We've all seen monolithic Rails models: pages and pages of methods all dumped into one class. Inevitably, someone starts moving things around just to feel better about the line count, but this doesn't make any real difference to the overall structure of the code. How can we reify actions on an object and simplify our classes?
In this talk I'll speak about using the concept of "middleware" (in the way Rack uses "middleware") as a general purpose abstraction for improving the organization, testability, and maintainability of complex pieces of code. I'll talk about my first hand experience of using middleware to power Vagrant (http://vagrantup.com), and we'll use these ideas to simplify an existing application.
Founder of @HashiCorp. Creator of Vagrant, Packer, Serf, Consul, Terraform, Vault, Nomad, and Otto. Lover of open source. Automation-obsessed developer. bio from Twitter
Sign in to add slides, notes or videos to this session