TechBookReport logo



Keywords: Object oriented programming, interfaces, design patterns

Title: Interface-Oriented Design

Author: Ken Pugh

Publisher: Pragmatic Bookshelf

ISBN: 0976694050

Media: Book

Verdict: Not recommended.

 

Inheritance is one of the key benefits of object oriented programming. It's a powerful technique but it's not the panacea that many beginners assume that it is. Object inheritance can lead to brittle object hierarchies, tightly coupled code and can compromise encapsulation. Programming to interfaces, on the hand, negates many of the disadvantages and is at the heart of the best practices that are design patterns, component-based development and service oriented architectures. So a book devoted to Interface-Oriented Design ought to be a winner.

However, despite the promise of the title and the importance of the topic, ultimately Ken Pugh (author of Prefactoring), does not deliver the goods. He does a good job of articulating the benefits of interface-oriented design, and uses some simple but effective examples to illustrate the point. He discusses the idea of design by contract and offers some good practices (the three laws of interfaces, for example), but after that the book begins to look unfocused.

The first section of the book looks at different facets of interfaces - stateless versus stateful, cohesion, data versus service interfaces and so on. This ought to be the heart of the book but it feels very light. This is followed by a chapter devoted to development processes - interesting in itself but not strictly relevant to the subject at hand.

The final section of the book looks at three longer examples of interface-oriented design: a URL link checker, a web conglomerator and a service registry. These are coded in Java, though the code is easy enough to follow that it should be intelligible to developers in other object oriented languages.

As should be clear by now, this is a disappointing read. The Pragmatic Bookshelf imprint is usually a guarantee of an interesting and thought-provoking read. Pugh's previous effort, Prefactoring, was precisely that. But in this case the book lacks the solid technical content that the subject surely demands. Programming .NET Components or Design Patterns Explained both do a better job of high-lighting the advantages of interface-based design along with some meatier technical content.


Hit the 'back' key in your browser to return to subject index page

Return to home page

Contents © TechBookReport 2006. Published November 6 2006