-
Chapter One Introduction to Prefactoring
-
What Is Prefactoring?
-
The Three Extremes
-
The Guidelines Explored
-
The Context for This Book
-
-
Chapter Two The System in So Many Words
-
Meet Sam
-
Reinvention Avoidance
-
What's in a Name?
-
Splitters Versus Lumpers
-
Clumping
-
Abstracting
-
Prototypes Are Worth a Thousand Words
-
-
Chapter Three General Development Issues
-
Start with the Big Picture
-
Interface Contracts
-
Validation
-
Code Communicates
-
Consistency Is Simplicity
-
A Prefactoring Attitude
-
Don't Repeat Yourself
-
Documentation of Assumptions and Decisions
-
Dealing with Deviations and Errors
-
Speeding
-
The Spreadsheet Conundrum
-
Tools Are Tools—Use Them Wisely
-
-
Chapter Four Getting the Big Picture
-
The Rest of the Story
-
Process
-
The Initial Design
-
Global Planning, Local Designing
-
Testing Functionality
-
Testing Quality
-
Security
-
-
Chapter Five Got Class?
-
Categories and Classes
-
Declaration Versus Execution
-
Appropriate Inheritance
-
Communicate with Text
-
More Than One
-
-
Chapter Six A Few Words on Classes
-
Honor the Class Maxims
-
Three Laws of Objects
-
Need Determines Class
-
Polymorphism
-
One Little Job
-
Policy Versus Implementation
-
Extreme Naming
-
Overloading Functions
-
-
Chapter Seven Getting There
-
Where We Are
-
Separating Concerns
-
Migrating to the New System
-
-
Chapter Eight The First Release
-
The Proof Is in the Pudding
-
Retrospective Time
-
The System as It Stands Now
-
Operations Interface
-
Abstract Data Types
-
Configuration
-
Testing
-
Dealing with Deviations and Errors
-
A Little Prefactoring
-
The First Released Iteration
-
Sometimes Practice Does Not Match Theory
-
The Rest of the Classes
-
-
Chapter Nine Associations and States
-
Sam's New Requirement
-
Who's in Charge?
-
The State of an Object
-
-
Chapter Ten Interfaces and Adaptation
-
The Catalog Search Use Case
-
Designing the Interface
-
Interface Development
-
Interface Testing
-
Interface Splitting
-
Something Working
-
-
Chapter Eleven Zip Codes and Interfaces
-
Adaptation
-
Pass the Buck
-
Unwritten Code
-
Indirection
-
Logging
-
Paradigm Mismatch
-
-
Chapter Twelve More Reports
-
Fancy Reports
-
Change Happens
-
Exports
-
-
Chapter Thirteen Invoices, Credit Cards, and Discounts
-
The Next Step
-
The Language of the Client
-
Security and Privacy
-
-
Chapter Fourteen Sam Is Expanding
-
The Second Store
-
A New Development
-
The Third Store
-
Goodbye Sam
-
Generality
-
-
Chapter Fifteen A Printserver Example
-
Introduction
-
The System
-
The Message
-
Testing
-
Logging
-
Still More Separation
-
Epilogue
-
-
Chapter Sixteen Antispam Example
-
The Context
-
Spam Checking
-
The ReceivingMailServer
-
ReceivedMailExaminer
-
The Full Flow
-
-
Chapter Seventeen Epilogue
-
Appendix A Guidelines and Principles
-
Guidelines
-
Guidelines in Alphabetical Order
-
Software Design Principles
-
-
Appendix B Source Code
-
com.samscdrental.configuration Package
-
com.samscdrental.controller Package
-
com.samscdrental.dataaccess Package
-
com.samscdrental.display.adt Package
-
com.samscdrental.display Package
-
com.samscdrental.failures Package
-
com.samscdrental.helper Package
-
com.samscdrental.importexport Package
-
com.samscdrental.migration Package
-
com.samscdrental.model.adt Package
-
com.samscdrental.model.dto Package
-
com.samscdrental.model Package
-
com.samscdrental.reports Package
-
com.samscdrental.tests Package
-
-
Colophon
- Title:
- Prefactoring
- By:
- Ken Pugh
- Publisher:
- O'Reilly Media
- Formats:
-
- Ebook
- Safari Books Online
- Print Release:
- September 2005
- Ebook Release:
- June 2009
- Pages:
- 240
- Print ISBN:
- 978-0-596-00874-1
- | ISBN 10:
- 0-596-00874-0
- Ebook ISBN:
- 978-0-596-55676-1
- | ISBN 10:
- 0-596-55676-4
About the author Ken Pugh has extensive experience in the area of software analysis and design. He has worked on systems ranging from goat serum process control to financial analysis to noise recording to satellite tracking. His previous books were on C and Unix, and he is a former columnist for the C/C++ Users Journal. He has taught programming courses for Wellesley College and the University of Hawaii, as well as numerous corporate courses, and he frequently presents at national conferences. As an independent consultant for over 20 years, he has served clients from London to Sydney. As an expert witness, he has provided testimony in both civil suits and criminal cases. When not computing, he enjoys snowboarding, windsurfing, biking, and hiking the Appalachian Trail.
Colophon Our look is the result of reader comments, our own experimentation, and feedback from distribution channels. Distinctive covers complement our distinctive approach to technical topics, breathing personality and life into potentially dry subjects. Sarah Sherman was the production editor and proofreader, and Audrey Doyle was the copyeditor for Prefactoring . Mary Anne Weeks Mayo and Claire Cloutier provided quality control. Lydia Onofrei provided production assistance. Johnna VanHoose Dinse wrote the index. MendeDesign designed and created the cover artwork of this book. Karen Montgomery produced the cover layout with Adobe InDesign CS using the Akzidenz Grotesk and Orator fonts. Marcia Friedman designed the interior layout. Melanie Wang designed the template; Phyllis McKee adapted the template. The book was converted by Keith Fahlgren to FrameMaker 5.5.6 with a format conversion tool created by Erik Ray, Jason McIntosh, Neil Walls, and Mike Sierra that uses Perl and XML technologies. The text font is Adobe's Meridien; the heading font is ITC Bailey. The illustrations that appear in the book were produced by Robert Romano, Jessamyn Read, and Lesley Borash using Macromedia FreeHand MX and Adobe Photoshop CS.
