Skip to content

Design Patterns in Ruby

Best in textbook rentals since 2012!

ISBN-10: 0321490452

ISBN-13: 9780321490452

Edition: 2008

Authors: Russ Olsen

List price: $56.99
Blue ribbon 30 day, 100% satisfaction guarantee!
what's this?
Rush Rewards U
Members Receive:
Carrot Coin icon
XP icon
You have reached 400 XP and carrot coins. That is the daily max!

Description:

Praise forDesign Patterns in Ruby "Design Patterns in Rubydocuments smart ways to resolve many problems that Ruby developers commonly encounter. Russ Olsen has done a great job of selecting classic patterns and augmenting these with newer patterns that have special relevance for Ruby. He clearly explains each idea, making a wealth of experience available to Ruby developers for their own daily work." -Steve Metsker, Managing Consultant with Dominion Digital, Inc. "This book provides a great demonstration of the key Gang of Four design patterns without resorting to overly technical explanations. Written in a precise, yet almost informal style, this book covers enough ground that even those…    
Customers also bought

Book details

List price: $56.99
Copyright year: 2008
Publisher: Addison Wesley Professional
Publication date: 12/10/2007
Binding: Hardcover
Pages: 384
Size: 7.32" wide x 9.21" long x 1.02" tall
Weight: 2.002

Foreword
Preface
Acknowledgments
About the Author
Patterns and Ruby
Building Better Programs with Patterns
The Gang of Four
Patterns for Patterns
Separate Out the Things That Change from Those That Stay the Same
Program to an Interface, Not an Implementation
Prefer Composition over Inheritance
Delegate, Delegate, Delegate
You Ain't Gonna Need It
Fourteen Out of Twenty-Thre
Patterns in Ruby?
Getting Started with Ruby
Interactive Ruby
Saying Hello World
Variables
Fixnums and Bignums
Floats
There Are No Primitives Here
But Sometimes There Is No Object
Truth, Lies, and nil
Decisions, Decisions
Loops
More about Strings
Symbols
Arrays
Hashes
Regular Expressions
A Class of Your Own
Getting at the Instance Variables
An Object Asks: Who Am I?
Inheritance, Subclasses, and Superclasses
Argument Options
Modules
Exceptions
Threads
Managing Separate Source Files
Wrapping Up
Patterns in Ruby
Varying the Algorithm with the Template Method
Keeping Up with What Life Throws at You
Separate the Things That Stay the Same
Discovering the Template Method Pattern
Hook Methods
But Where Are All the Declarations?
Types, Safety, and Flexibility
Unit Tests Are Not Optional
Using and Abusing the Template Method Pattern
Templates in the Wild
Wrapping Up
Replacing the Algorithm with the Strategy
Delegate, Delegate, and Delegate Again
Sharing Data between the Context and the Strategy
Duck Typing Yet Again
Procs and Blocks
Quick-and-Dirty Strategies
Using and Abusing the Strategy Pattern
The Strategy Pattern in the Wild
Wrapping Up
Keeping Up with the Times with the Observer
Staying Informed
A Better Way to Stay Informed
Factoring Out the Observable Support
Code Blocks as Observers
Variations on the Observer Pattern
Using and Abusing the Observer Pattern
Observers in the Wild
Wrapping Up
Assembling the Whole from the Parts with the Composite
The Whole and the Parts
Creating Composites
Sprucing Up the Composite with Operators
An Array as a Composite?
An Inconvenient Difference
Pointers This Way and That
Using and Abusing the Composite Pattern
Composites in the Wild
Wrapping Up
Reaching into a Collection with the Iterator
External Iterators
Internal Iterators
Internal Iterators versus External Iterators
The Inimitable Enumerable
Using and Abusing the Iterator Pattern
Iterators in the Wild
Wrapping Up
Getting Things Done with Commands
An Explosion of Subclasses
An Easier Way
Code Blocks as Commands
Commands That Record
Being Undone by a Command
Queuing Up Commands
Using and Abusing the Command Pattern
The Command Pattern in the Wild
ActiveRecord Migrations
Madeleine
Wrapping Up
Filling in the Gaps with the Adapter
Software Adapters
The Near Misses
An Adaptive Alternative?
Modifying a Single Instance
Adapt or Modify?
Using and Abusing the Adapter Pattern
Adapters in the Wild
Wrapping Up
Getting in Front of Your Object with a Proxy
Proxies to the Rescue
The Protecti