Practical Object-Oriented Design in Ruby An Agile Primer

ISBN-10: 0321721330

ISBN-13: 9780321721334

Edition: 2013 (Revised)

Authors: Sandi Metz

Buy it from $31.36
eBook available
This item qualifies for FREE shipping

*A minimum purchase of $35 is required. Shipping is provided via FedEx SmartPost® and FedEx Express Saver®. Average delivery time is 1 – 5 business days, but is not guaranteed in that timeframe. Also allow 1 - 2 days for processing. Free shipping is eligible only in the continental United States and excludes Hawaii, Alaska and Puerto Rico. FedEx service marks used by permission."Marketplace" orders are not eligible for free or discounted shipping.

30 day, 100% satisfaction guarantee

If an item you ordered from TextbookRush does not meet your expectations due to an error on our part, simply fill out a return request and then return it by mail within 30 days of ordering it for a full refund of item cost.

Learn more about our returns policy

Description:

Years after the initial release of Ruby on Rails, the chickens are coming home to roost. Suddenly, anyone could write a web application -- and it seems like everyone did. The web is now awash in Ruby applications that were easy to write but are now virtually impossible to change, extend, or grow. This book solves that problem by teaching developers real-world object oriented design techniques specifically focused on Ruby. Writing for more than 1,000,000 Ruby developers at all levels of experience, Sandi Metz shares knowledge and concrete solutions for creating more extensible, more maintainable applications - and for fixing many of the poorly designed applications they must now manage. The first book to focus squarely on object-oriented Ruby application design,Practical Object Oriented Design in Rubywill guide developers to superior outcomes, even if their previous experience has been strictly limited to "procedural" techniques. Metz distills a lifetime of conversations about object-oriented design and many years of whiteboard drawings into a set of specific Ruby practices and patterns that lead to more manageable and pleasing code. Novice Ruby programmers will find specific "rules to live by"; intermediate Ruby programmers will find valuable principles they can flexibly interpret and apply; and advanced Ruby programmers will find a common language they can use to lead development and guide their colleagues.
New Starting from $40.76
eBooks Starting from $35.99
Buy eBooks
what's this?
Rush Rewards U
Members Receive:
coins
coins
You have reached 400 XP and carrot coins. That is the daily max!
Study Briefs

Limited time offer: Get the first one free! (?)

All the information you need in one place! Each Study Brief is a summary of one specific subject; facts, figures, and explanations to help you learn faster.

Add to cart
Study Briefs
Italian Grammar Online content $4.95 $1.99
Add to cart
Study Briefs
Portuguese Grammar Online content $4.95 $1.99
Add to cart
Study Briefs
Spanish Grammar Online content $4.95 $1.99
Add to cart
Study Briefs
German Grammar Online content $4.95 $1.99
Customers also bought
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading

Book details

Copyright year: 2013
Publisher: Pearson Education, Limited
Publication date: 9/5/2012
Binding: Paperback
Pages: 272
Size: 7.00" wide x 9.00" long x 0.80" tall
Weight: 1.276
Language: English

Foreword
Introduction
Acknowledgments
About the Author
Object-Oriented Design
In Praise of Design
The Problems Design Solves
Why Change is Hard
A Practical Definition of Design
The Tools of Design
Design Principles
Design Patterns
The Act of Design
How Design Fails
When to Design
Judging Design
A Brief Introduction to Object-Oriented Programming
Procedural Languages
Object-Oriented Languages
Summary
Designing Classes with a Single Responsibility
Deciding What Belongs in a Class
Grouping Methods into Classes
Organizing Code to Allow for Easy Changes
Creating Classes that have a Single Responsibility
An Example Application: Bicycles and Gears
Why Single Responsibility Matters
Determining if a Class has a Single Responsibility
Determining When to Make Design Decisions
Writing Code that Embraces Change
Depend on Behavior, Not Data
Enforce Single Responsibility Everywhere
Finally, the Real Wheel
Summary
Managing Dependencies
Understanding Dependencies
Recognizing Dependencies
Coupling Between Objects (CBO)
Other Dependencies
Writing Loosely Coupled Code
Inject Dependencies
Isolare Dependencies
Remove Argument-Order Dependencies
Managing Dependency Direction
Reversing Dependencies
Choosing Dependency Direction
Summary
Creating Flexible Interfaces
Understanding Interfaces
Defining Interfaces
Public Interfaces
Private Interfaces
Responsibilities, Dependencies, and Interfaces
Finding the Public Interface
An Example Application: Bicycle Touring Company
Constructing an Intention
Using Sequence Diagrams
Asking for "What" Instead of Telling "How"
Seeking Context Independence
Trusting Other Objects
Using Messages to Discover Objects
Creating a Message-Based Application
Writing Code that puts its best (Inter)Face Forward
Create Explicit Interfaces
Honor the Public Interfaces of Others
Exercise Caution When Depending on Private Interfaces
Minimize Context
The Law of Demeter
Defining Demeter
Consequences of Violations
Avoiding Violations
Listening to Demeter
Summary
Reducing Costs with Duck Typing
Understanding Duck Typing
Overlooking the Duck
Compounding the Problem
Finding the Duck
Consequences of Duck Typing
Writing Code that Relies on Ducks
Recognizing Hidden Ducks
Placing Trust in your Ducks
Documenting Duck Types
Sharing Code Between Ducks
Choosing your Ducks Wisely
Conquering a Fear of Duck Typing
Subverting Duck Types with Static Typing
Static versus Dynamic Typing
Embracing Dynamic Typing
Summary
Acquiring Behavior Through Inheritance
Understanding Classical Inheritance
Recognizing Where to use Inheritance
Starting with a Concrete Class
Embedding Multiple Types
Finding the Embedded Types
Choosing Inheritance
Drawing Inheritance Relationships
Misapplying Inheritance
Finding the Abstraction
Creating an Abstract Superclass
Promoting Abstract Behavior
Separating Abstract from Concrete
Using the Template Method Pattern
Implementing every Template Method
Managing Coupling Between Superclasses and Subclasses
Understanding Coupling
Decoupling Subclasses Using Hook Messages
Summary
Sharing Role Behavior with Modules
Understanding Roles
Finding Roles
Organizing Responsibilities
Removing Unnecessary Dependencies
Writing the Concrete Code
Extracting the Abstraction
Looking up Methods
Inheriting Role Behavior
Writing Inheritable Code
Recognize the Antipatterns
Insist on the Abstraction
Honor the Contract
Use the Template Method Pattern
Preemptively Decouple Classes
Create Shallow Hierarchies
Summary
Combining Objects with Composition
Composing a Bicycle of Parts
Updating the Bicycle Class
Creating a Parts Hierarchy
Composing the Parts Objects
Creating a Part
Making the Parts Object More Like an Array
Manufacturing Parts
Creating the PartsFactory
Leveraging the PartsFactory
The Composed Bicycle
Deciding Between Inheritance and Composition
Accepting the Consequences of Inheritance
Accepting the Consequences of Composition
Choosing Relationships
Summary
Designing Cost-Effective Tests
Intentional Testing
Knowing your Intentions
Knowing What to Test
Knowing When to Test
Knowing How to Test
Testing Incoming Messages
Deleting Unused Interfaces
Proving the Public Interface
Isolating the Object Under Test
Injecting Dependencies Using Classes
Injecting Dependencies as Roles
Testing Private Methods
Ignoring Private Methods During Tests
Removing Private Methods from the Class Under Test
Choosing to Test a Private Method
Testing Outgoing Messages
Ignoring Query Messages
Proving Command Messages
Testing Duck Types
Testing Roles
Using Role Tests to Validate Doubles
Testing Inherited Code
Specifying the Inherited Interface
Specifying Subclass Responsibilities
Testing Unique Behavior
Summary
Afterword
Index
×
Free shipping on orders over $35*

*A minimum purchase of $35 is required. Shipping is provided via FedEx SmartPost® and FedEx Express Saver®. Average delivery time is 1 – 5 business days, but is not guaranteed in that timeframe. Also allow 1 - 2 days for processing. Free shipping is eligible only in the continental United States and excludes Hawaii, Alaska and Puerto Rico. FedEx service marks used by permission."Marketplace" orders are not eligible for free or discounted shipping.

Learn more about the TextbookRush Marketplace.

×