Practical Object Oriented Design In Ruby
Publisher: Addison-Wesley Professional
Published: 2012
Language: eng
Number of pages: 247
ISBN-13: 9780321721334
Table of contents: title: Foreword
pagenum: xv; title: Introduction
pagenum: xvii; title: Acknowledgments
pagenum: xxi; title: About the Author
pagenum: xxiii; label: 1
title: Object-Oriented Design
pagenum: 1; title: In Praise of Design
pagenum: 2; title: The Problem Design Solves
pagenum: 2; title: Why Change Is Hard
pagenum: 3; title: A Practical Definition of Design
pagenum: 4; title: The Tools of Design
pagenum: 4; title: Design Principles
pagenum: 5; title: Design Patterns
pagenum: 6; title: The Act of Design
pagenum: 7; title: How Design Fails
pagenum: 7; title: When to Design
pagenum: 8; title: Judging Design
pagenum: 10; title: A Brief Introduction to Object-Oriented Programming
pagenum: 11; title: Procedural Languages
pagenum: 12; title: Object-Oriented Languages
pagenum: 12; title: Summary
pagenum: 14; label: 2
title: Designing Classes with a Single Responsibility
pagenum: 15; title: Deciding What Belongs in a Class
pagenum: 16; title: Grouping Methods into Classes
pagenum: 16; title: Organizing Code to Allow for Easy Changes
pagenum: 16; title: Creating Classes That Have a Single Responsibility
pagenum: 17; title: An Example Application: Bicycles and Gears
pagenum: 17; title: Why Single Responsibility Matters
pagenum: 20; title: Determining If a Class Has a Single Responsibility
pagenum: 22; title: Determining When to Make Design Decisions
pagenum: 22; title: Writing Code That Embraces Change
pagenum: 24; title: Depend on Behavior, Not Data
pagenum: 24; title: Enforce Single Responsibility Everywhere
pagenum: 29; title: Finally, the Real Wheel
pagenum: 33; title: Summary
pagenum: 34; label: 3
title: Managing Dependencies
pagenum: 35; title: Understanding Dependencies
pagenum: 36; title: Recognizing Dependencies
pagenum: 37; title: Coupling Between Objects (CBO)
pagenum: 37; title: Other Dependencies
pagenum: 38; title: Writing Loosely Coupled Code
pagenum: 39; title: Inject Dependencies
pagenum: 39; title: Isolate Dependencies
pagenum: 42; title: Remove Argument-Order Dependencies
pagenum: 46; title: Managing Dependency Direction
pagenum: 51; title: Reversing Dependencies
pagenum: 51; title: Choosing Dependency Direction
pagenum: 53; title: Summary
pagenum: 57; label: 4
title: Creating Flexible Interfaces
pagenum: 59; title: Understanding Interfaces
pagenum: 59; title: Defining Interfaces
pagenum: 61; title: Public Interfaces
pagenum: 62; title: Private Interfaces
pagenum: 62; title: Responsibilities, Dependencies, and Interfaces
pagenum: 62; title: Finding the Public Interface
pagenum: 63; title: An Example Application: Bicycle Touring Company
pagenum: 63; title: Constructing an Intention
pagenum: 64; title: Using Sequence Diagrams
pagenum: 65; title: Asking for "What" Instead of Telling "How"
pagenum: 69; title: Seeking Context Independence
pagenum: 71; title: Trusting Other Objects
pagenum: 73; title: Using Messages to Discover Objects
pagenum: 74; title: Creating a Message-Based Application
pagenum: 76; title: Writing Code That Puts Its Best (Inter)Face Forward
pagenum: 76; title: Create Explicit Interfaces
pagenum: 76; title: Honor the Public Interfaces of Others
pagenum: 78; title: Exercise Caution When Depending on Private Interfaces
pagenum: 79; title: Minimize Context
pagenum: 79; title: The Law of Demeter
pagenum: 80; title: Defining Demeter
pagenum: 80; title: Consequences of Violations
pagenum: 80; title: Avoiding Violations
pagenum: 82; title: Listening to Demeter
pagenum: 82; title: Summary
pagenum: 83; label: 5
title: Reducing Costs with Duck Typing
pagenum: 85; title: Understanding Duck Typing
pagenum: 85; title: Overlooking the Duck
pagenum: 87; title: Compounding the Problem
pagenum: 87; title: Finding the Duck
pagenum: 90; title: Consequences of Duck Typing
pagenum: 94; title: Writing Code That Relies on Ducks
pagenum: 95; title: Recognizing Hidden Ducks
pagenum: 96; title: Placing Trust in Your Ducks
pagenum: 98; title: Documenting Duck Types
pagenum: 98; title: Sharing Code Between Ducks
pagenum: 99; title: Choosing Your Ducks Wisely
pagenum: 99; title: Conquering a Fear of Duck Typing
pagenum: 100; title: Subverting Duck Types with Static Typing
pagenum: 100; title: Static versus Dynamic Typing
pagenum: 101; title: Embracing Dynamic Typing
pagenum: 102; title: Summary
pagenum: 104; label: 6
title: Acquiring Behavior Through Inheritance
pagenum: 105; title: Understanding Classical Inheritance
pagenum: 105; title: Recognizing Where to Use Inheritance
pagenum: 106; title: Starting with a Concrete Class
pagenum: 106; title: Embedding Multiple Types
pagenum: 109; title: Finding the Embedded Types
pagenum: 111; title: Choosing Inheritance
pagenum: 112; title: Drawing Inheritance Relationships
pagenum: 114; title: Misapplying Inheritance
pagenum: 114; title: Finding the Abstraction
pagenum: 116; title: Creating an Abstract Superclass
pagenum: 117; title: Promoting Abstract Behavior
pagenum: 120; title: Separating Abstract from Concrete
pagenum: 123; title: Using the Template Method Pattern
pagenum: 125; title: Implementing Every Template Method
pagenum: 127; title: Managing Coupling Between Superclasses and Subclasses
pagenum: 129; title: Understanding Coupling
pagenum: 129; title: Decoupling Subclasses Using Hook Messages
pagenum: 134; title: Summary
pagenum: 139; label: 7
title: Sharing Role Behavior with Modules
pagenum: 141; title: Understanding Roles
pagenum: 142; title: Finding Roles
pagenum: 142; title: Organizing Responsibilities
pagenum: 143; title: Removing Unnecessary Dependencies
pagenum: 145; title: Writing the Concrete Code
pagenum: 147; title: Extracting the Abstraction
pagenum: 150; title: Looking Up Methods
pagenum: 154; title: Inheriting Role Behavior
pagenum: 158; title: Writing Inheritable Code
pagenum: 158; title: Recognize the Antipatterns
pagenum: 158; title: Insist on the Abstraction
pagenum: 159; title: Honor the Contract
pagenum: 159; title: Use the Template Method Pattern
pagenum: 160; title: Preemptively Decouple Classes
pagenum: 161; title: Create Shallow Hierarchies
pagenum: 161; title: Summary
pagenum: 162; label: 8
title: Combining Objects with Composition
pagenum: 163; title: Composing a Bicycle of Parts
pagenum: 164; title: Updating the Bicycle Class
pagenum: 164; title: Creating a Parts Hierarchy
pagenum: 165; title: Composing the Parts Object
pagenum: 168; title: Creating a Part
pagenum: 169; title: Making the Parts Object More Like an Array
pagenum: 172; title: Manufacturing Parts
pagenum: 176; title: Creating the PartsFactory
pagenum: 177; title: Leveraging the PartsFactory
pagenum: 178; title: The Composed Bicycle
pagenum: 180; title: Deciding Between Inheritance and Composition
pagenum: 184; title: Accepting the Consequences of Inheritance
pagenum: 184; title: Accepting the Consequences of Composition
pagenum: 187; title: Choosing Relationships
pagenum: 188; title: Summary
pagenum: 190; label: 9
title: Designing Cost-Effective Tests
pagenum: 191; title: Intentional Testing
pagenum: 192; title: Knowing Your Intentions
pagenum: 193; title: Knowing What to Test
pagenum: 194; title: Knowing When to Test
pagenum: 197; title: Knowing How to Test
pagenum: 198; title: Testing Incoming Messages
pagenum: 200; title: Deleting Unused Interfaces
pagenum: 202; title: Proving the Public Interface
pagenum: 203; title: Isolating the Object Under Test
pagenum: 205; title: Injecting Dependencies Using Classes
pagenum: 207; title: Injecting Dependencies as Roles
pagenum: 208; title: Testing Private Methods
pagenum: 213; title: Ignoring Private Methods During Tests
pagenum: 213; title: Removing Private Methods from the Class Under Test
pagenum: 214; title: Choosing to Test a Private Method
pagenum: 214; title: Testing Outgoing Messages
pagenum: 215; title: Ignoring Query Messages
pagenum: 215; title: Proving Command Messages
pagenum: 216; title: Testing Duck Types
pagenum: 219; title: Testing Roles
pagenum: 219; title: Using Role Tests to Validate Doubles
pagenum: 224; title: Testing Inherited Code
pagenum: 229; title: Specifying the Inherited Interface
pagenum: 229; title: Specifying Subclass Responsibilities
pagenum: 233; title: Testing Unique Behavior
pagenum: 236; title: Summary
pagenum: 240; title: Afterword
pagenum: 241; title: Index
pagenum: 243