Tuesday, December 06, 2011

Software Design Trilogy - Part I: Responsibility Driven Design for Rubyists


Today, I gave a talk at Groupon's weekly GeekFest event titled Responsibility Driven Design for Rubyists - An Outside-In OO Design Approach.

It is Part I of the Software Design Trilogy, with Part II and III following in January and February.

Here is the abstract of the talk:

Ever encountered an ActiveRecord model that has become so large you had to split it into other objects, but was unsure how? Ever wondered what principles might encourage splitting presentation logic into a presenter for a particular situation? Ever pondered whether to put a piece of logic on the controller, the model, or somewhere else in an application?

This talk will help address these questions by introducing you to Responsibility-Driven Design, a technique that provides the underpinnings for object oriented design and underlying principles for patterns such as MVC that we follow in day-to-day user-facing application development.

Rebecca Wirfs-Brock came up with Responsibility-Driven Design in 1989 as a reaction to Data-Driven Design's breaking of encapsulation that increased coupling and decreased maintainability. Responsibility-Driven Design helped divide and conquer complexity in code by thinking of its work as responsibilities that can be assigned to highly cohesive objects, hiding algorithmic details in abstractions that make it easier to reason about the behavior of an application at a high level.

Alistair Cockburn came up with Responsibility Based Modeling in 1999, which is a way of getting to Responsibility-Driven Design from business high level requirements in the form use cases.

Craig Larman identified a set of general responsibility assignment software patterns (GRASP patterns) in 2004 that help developers balance trade-offs among alternative designs to ensure they reach the object oriented structure that best fits their needs.

This talk will cover all three approaches, providing a consolidated process for object oriented design in Ruby that begins with a business use case and ends with objects. The goal is to help developers get more comfortable with practical object oriented design in business application development, paying attention to all the variables that need to be balanced to achieve the necessary maintainability and flexibility.

And here are the slides:


If you have any questions, please let me know in the comments section. Thanks to everyone who attended and stay tuned for Part II (Design Patterns for Rubyists) and III (Domain Driven Design for RoR Apps).

No comments: