Saturday, December 22, 2007

[Arch] Book Review: Kent Beck "Implementation Patterns"

As promised 10th Dec here is the second book review. Recently we discussed beautiful code, and now we have: Kent Beck, "Implementation Patterns", Addison-Wesley, ISBN-13: 978-0321413093

Of course Kent Beck is well known in the software-engineering and development space. He wrote books about
  • Better Smalltalk
  • Patterns
  • Eclipse
  • JUnit Pocket Guide
  • Refactoring
  • Test Driven Development,
and of course he might be best known for XP and his XP books.

Thus it's more then important to listen if he brings out a new book. And in fact this book is a wonderful and easy reading - in contrast to beautiful code - and a good reference for every ambitious developer.

Let's first have a look at the books chapters:
2 - Patterns
3 - A Theory of Programming
4 - Motivation
5 - Class
6 - State
7 - Behavior
8 - Methods
9 - Collections
10 - Evolving Frameworks
App A - Performance Measurement

So the first impression is, that something like state or behaviors sounds like the classic pattern categorization. But it is more from a different perspective: The developers perspective. For example the last three chapters - and even more performance measurement - can rarely be found in developer books. Unfortunately such important chapters like performance is just a small appendix. Most examples are written in Java which is especially important for the collection chapter that also shows lots of performance comparisons.

The interesting surprise in this book is that Beck writes about issues like "Classes" from scratch. Many of us might think they know everything about classes and can not be surprised. But Becks writing always forces you to look from another perspective. And this is the books strength. When Beck writes of Code "Communication" and e.g. naming Classes or Variables he pulls you up from a developer to an advanced developer in the complete context.

In fact Becks book is a great reference book that cover lots of issues. Some examples: Classes, Superclasses, Interfaces, Abstract Classes, Versioned Classes, Value Objects, Specialization, Subclasses, Implementors, Conditionals, Delegation, Pluggable Selector, (Anonymous) InnerClasses, all kind of Access Strategies, Variables & Fields, Parameters, Constants, Names initialization Modes, and so an on the Behavior and Methods Chapter.

So what might be criticized?

In fact some things can be found elsewhere in other books like Bruce Tates "Better, Faster, Lighter Java" or Bruce Eckels "Thinking in Java". And Kent Beck even reuses parts from his older books. Sections as the "Pluggable Selector" can be found in his TDD book and in Implementation Patterns even if Kent has invented complete new code examples for this pattern. And rarely some examples are a little elusive (e.g. when missing code symmetry looks more like missing intentional/implementation definitions from the start). But don't get me wrong: it's super worth reading and should lay next to nearly every developer!

To summarize

If you are an advanced developer guru who has reflected for years about your own code you will not find the book a complete new revelation. But for developers who still love to reflect about code and like to have a developers reference at hand, this book is a wonderful meta-best-practices extract with lots of issues that TatesEckels* are missing.

Need a post Christmas Gift?
Happy Chistmas!

1 comment:

Unknown said...

Dear Team,

I also like the book very much.

It accumulates a lot of experience and presents it in a nice to read prose pattern format. Experienced developers can reflect on their own "implementation pattern language" and others can learn some of the most important aspects of object oriented programming (in Java) from the book.

I hope that there will be a pattern community forming around the implementation patterns to support the widespead use of the communicative, simple and flexible style of writing code.

Unfortunately it has some shortcomings which could have been prevented by an open review process (much like the one Martin Fowler uses not for his DSL book). I covered some of them in my blog entry on the book.

Kent has invited everyone interested to join the discussion at the Yahoo ImplementationPatterns Group

There was also an introductory discussion with Kent last week on the book at JavaRanch.

Merry Christmas

Michael