Updates

Latest Tweet



What's New?

Check out for latest innovation, a computer based training video collection


Like this Page

Holub on Patterns: Learning Design Patterns by Looking at Code Review by Prashanth Pillutla

Design Patterns explained in a very unique and simplified manner

After reading the first chapter of this book, I felt that Mr. Holub had a very unique way of explaining things which kept me going on. Sure enough, at the end I can say that this was the most interesting and informative book on design patterns that I have ever read !!! He often seems opinionated about how things are implemented in the OO world but he justifies them with relevant real world examples. The design patterns are explained with an example implementation along with a reference of the pattern in the Java API. This makes a lot of impact since most of the readers are familiar with the API and helps in correlating and remembering the patterns easier.

Some of the golden rules suggested in the book that I will always keep in mind from now on:

1) Dont ask for information from an object, rather give the object the information it needs and ask it do the work for you.
2) Getters and Setters are evil because they compromise encapsulation.
3) 'extends' is evil as it can cause fragile base classes.

My only complaint about the book is the example of 'Game of Life' (Chapter 3) that was chosen. If you are one of those that havent heard of the game earlier, you would find it a little difficult to follow the code. It would have been better if the author had chosen any other real world application similar to the SQL Interpreter application that was explained in Chapter 4.

The Appendix section is a great ending with concise descriptions about each one of the patterns. I am sure I will refer to this book for a long time and it definitely deserves a space on every serious Java developer's book shelf.

Happy reading....