Book Review - Interface-Oriented Design by Ken Pugh
When doing object-oriented programming, it's normal to dive right in to classes, methods, and properties. In Interface-Oriented Design by Ken Pugh, the reader is presented with the premise that the interface should drive the design. This book will make you pay a bit more attention to that area if you've overlooked it in the past...
Part 1 - All About Interfaces: Introduction to Interfaces; Interface Contracts; Interface Ingredients; What Should Be in an Interface?; Inheritance and Interfaces; Remote Interfaces
Part 2 - Developing with Interfaces: A Little Process
Part 3 - Interfaces in the Real World: Link Checker; Web Conglomerator; Service Registry; Patterns
If you're building discrete chunks of code that can be combined with other objects to build applications, it makes a lot of sense to focus on the interface that you present to the world for your object. With Service Oriented Architecture becoming the next buzzword, interfaces take on even more importance. Pugh uses a "pizza ordering" example throughout the book to show how the interface to that service would be designed to take into account all the contracts that interfaces should abide by. In fact, I think the Interface Contracts chapter was the most useful for me, as the rules are logical and appropriate for designing solid objects. I also found the Inheritance and Interfaces chapter very useful, as it compared and contrasted the use of inheritance in your class vs. the use of interfaces. It's common to see inheritance examples in books, but the interface examples are not as widely covered, and that's too bad. After reading this chapter, I understood why interfaces offer so much flexibility to programming.
Some of the detailed code areas of the book are a little hard to follow, and as such it was one of those books I had to put down and come back to a few times before I worked my way through it all. Still, there's more than enough material here to twist your thought processes around to a new way of looking at your design skills.
If you liked this review and found it helpful, please click on the Amazon book link in the review and click the Yes (Was This Review Helpful To You?) button at the bottom of my review. Thanks!