SIDEBAR
»
S
I
D
E
B
A
R
«
Design patterns => confusion
May 28th, 2005 by sleepikatkat

I am sitting in the last day of the design patterns class. In merely four classes, we have learned 19-23 object oriented design patterns.

The textbook is a classic, many say. But it is definitely as dry as an over-toasted bread. It contains a lot of concepts that are difficult to be associated with real life examples if we do not happen to use them at work. And some of them simply invoke my reaction of “that is a design pattern?!!”

For example, we already have Iterator interface in Java, but I would never have thought that it was derived from a design pattern. I guess it is true, C++ didn’t have it.

Interpreter is basically a way to parse formal grammar. It is difficult to find any real life example besides pattern matching or for developing compilers. What else do we need to use it for?

Proxy is a well-known solution. It is also a design pattern? And object pools is widely used today as the basis for connection pooling. I never knew that connetion pooling is also an implementation of singleton, where all requests to connections go through a single point of entrance.

Some of the design patterns are driving me nuts; my mind is like a swirling sundae. Bridge and adapter. Bridge and visitor. State and strategy. God. They look like twins to me! If I just look at the class diagrams, they look very very VERY similar! Yet they are designed to solve different problems? What is the next higher level up of abstraction? Can’t we have another abstract solution for all these similar problems?

Leave me alone, please. After this class, I shall stop thinking like the nerds here in class for a while. Then I need to pick up the book again to review everything, re-do all homework to refresh memory, and redraw all class diagrams to help me understand the similarities and differences of all of them. Probably then I will blog about each design pattern to drive my readers nuts, like me right now. =) You will know what I mean by “my mind is like a sundae” then.

  • Share/Bookmark
»  Substance:WordPress   »  Style:Ahren Ahimsa