Implementation Patterns

Implementation Patterns

By: Kent Beck (author)Paperback

Up to 2 WeeksUsually despatched within 2 weeks

Description

"Kent is a master at creating code that communicates well, is easy to understand, and is a pleasure to read. Every chapter of this book contains excellent explanations and insights into the smaller but important decisions we continuously have to make when creating quality code and classes."-Erich Gamma, IBM Distinguished Engineer "Many teams have a master developer who makes a rapid stream of good decisions all day long. Their code is easy to understand, quick to modify, and feels safe and comfortable to work with. If you ask how they thought to write something the way they did, they always have a good reason. This book will help you become the master developer on your team. The breadth and depth of topics will engage veteran programmers, who will pick up new tricks and improve on old habits, while the clarity makes it accessible to even novice developers."-Russ Rufer, Silicon Valley Patterns Group "Many people don't realize how readable code can be and how valuable that readability is. Kent has taught me so much, I'm glad this book gives everyone the chance to learn from him."-Martin Fowler, chief scientist, ThoughtWorks "Code should be worth reading, not just by the compiler, but by humans. Kent Beck distilled his experience into a cohesive collection of implementation patterns. These nuggets of advice will make your code truly worth reading."-Gregor Hohpe, author of Enterprise Integration Patterns "In this book Kent Beck shows how writing clear and readable code follows from the application of simple principles. Implementation Patterns will help developers write intention revealing code that is both easy to understand and flexible towards future extensions. A must read for developers who are serious about their code."-Sven Gorts "Implementation Patterns bridges the gap between design and coding. Beck introduces a new way of thinking about programming by basing his discussion on values and principles."-Diomidis Spinellis, author of Code Reading and Code Quality Software Expert Kent Beck Presents a Catalog of Patterns Infinitely Useful for Everyday Programming Great code doesn't just function: it clearly and consistently communicates your intentions, allowing other programmers to understand your code, rely on it, and modify it with confidence. But great code doesn't just happen. It is the outcome of hundreds of small but critical decisions programmers make every single day. Now, legendary software innovator Kent Beck-known worldwide for creating Extreme Programming and pioneering software patterns and test-driven development-focuses on these critical decisions, unearthing powerful "implementation patterns" for writing programs that are simpler, clearer, better organized, and more cost effective. Beck collects 77 patterns for handling everyday programming tasks and writing more readable code. This new collection of patterns addresses many aspects of development, including class, state, behavior, method, collections, frameworks, and more. He uses diagrams, stories, examples, and essays to engage the reader as he illuminates the patterns. You'll find proven solutions for handling everything from naming variables to checking exceptions. This book coversThe value of communicating through code and the philosophy behind patterns How and when to create classes, and how classes encode logic Best practices for storing and retrieving state Behavior: patterns for representing logic, including alternative paths Writing, naming, and decomposing methods Choosing and using collections Implementation pattern variations for use in building frameworksImplementation Patterns will help programmers at all experience levels, especially those who have benefited from software patterns or agile methods. It will also be an indispensable resource for development teams seeking to work together more efficiently and build more maintainable software. No other programming book will touch your day-to-day work more often.

About Author

Kent Beck, one of the software industry's most creative and acclaimed leaders, consistently challenges software engineering dogma and promotes ideas like patterns, test-driven development, and Extreme Programming. Currently affiliated with Three Rivers Institute and Agitar Software, he is the author of many Addison-Wesley titles, including Test-Driven Development (2003) and, with Cynthia Andres, Extreme Programming Explained, Second Edition (2005).

Contents

Preface xvChapter 1: Introduction 1Tour Guide 3And Now... 4Chapter 2: Patterns 5Chapter 3: A Theory of Programming 9Values 10Principles 13Conclusion 18Chapter 4: Motivation 19Chapter 5: Class 21Class 22Simple Superclass Name 23Qualified Subclass Name 24Abstract Interface 24Interface 26Abstract Class 26Versioned Interface 27Value Object 28Specialization 31Subclass 32Implementor 34Inner Class 34Instance-Specific Behavior 36Conditional 36Delegation 38Pluggable Selector 40Anonymous Inner Class 41Library Class 41Conclusion 42Chapter 6: State 43State 44Access 45Direct Access 46Indirect Access 47Common State 47Variable State 48Extrinsic State 50Variable 50Local Variable 51Field 52Parameter 53Collecting Parameter 55Optional Parameter 56Var Args 56Parameter Object 57Constant 58Role-Suggesting Name 58Declared Type 60Initialization 61Eager Initialization 61Lazy Initialization 62Conclusion 62Chapter 7: Behavior 63Control Flow 64Main Flow 64Message 65Choosing Message 65Double Dispatch 66Decomposing (Sequencing) Message 67Reversing Message 67Inviting Message 68Explaining Message 69Exceptional Flow 70Guard Clause 70Exception 72Checked Exceptions 72Exception Propagation 73Conclusion 73Chapter 8: Methods 75Composed Method 77Intention-Revealing Name 79Method Visibility 80Method Object 82Overridden Method 83Overloaded Method 83Method Return Type 84Method Comment 85Helper Method 85Debug Print Method 86Conversion 87Conversion Method 87Conversion Constructor 88Creation 88Complete Constructor 89Factory Method 90Internal Factory 91Collection Accessor Method 91Boolean Setting Method 93Query Method 93Equality Method 94Getting Method 95Setting Method 96Safe Copy 97Conclusion 98Chapter 9: Collections 99Metaphors 100Issues 101Interfaces 103Implementations 107Collections 110Extending Collections 114Conclusion 115Chapter 10: Evolving Frameworks 117Changing Frameworks without Changing Applications 117Incompatible Upgrades 118Encouraging Compatible Change 120Conclusion 129Appendix A: Performance Measurement 131Example 131API 132Implementation 133MethodTimer 134Canceling Overhead 136Tests 136Conclusion 142Bibliography 145General Programming 145Philosophy 147Java 148Index 149

Product Details

  • ISBN13: 9780321413093
  • Format: Paperback
  • Number Of Pages: 176
  • ID: 9780321413093
  • weight: 348
  • ISBN10: 0321413091

Delivery Information

  • Saver Delivery: Yes
  • 1st Class Delivery: Yes
  • Courier Delivery: Yes
  • Store Delivery: Yes

Prices are for internet purchases only. Prices and availability in WHSmith Stores may vary significantly

Close