Skip to Content.
Sympa Menu

patterns-discussion - RE: [patterns-discussion] Which patterns are more frequently used?

patterns-discussion AT lists.siebelschool.illinois.edu

Subject: General talk about software patterns

List archive

RE: [patterns-discussion] Which patterns are more frequently used?


Chronological Thread 
  • From: Ekárt László <Ekart.Laszlo AT evosoft.hu>
  • To: <patterns-discussion AT cs.uiuc.edu>
  • Subject: RE: [patterns-discussion] Which patterns are more frequently used?
  • Date: Wed, 6 Jul 2005 16:35:28 +0200
  • List-archive: <http://mail.cs.uiuc.edu/pipermail/patterns-discussion>
  • List-id: General talk about software patterns <patterns-discussion.cs.uiuc.edu>


Hi, there

This is my first mail to this forum.

I personally think that the worst pattern is the singleton pattern. The
distinguishing mark of a beginner programmer/designer that he uses lots of
singletons. The singleton for object oriented design might be worst than goto
for structured programming.
The beginner programmer can not find easily the responsibilities and
relationships between classes and objects so he divides the functionality in
function and data modules. These modules will become singletons and linked
together in messy spaghetti or Gordian knot. (Violating extremely heavily the
Demeter Law)
When I write a program I do not have singletons. I have one global object,
the application. The logging object is a member of the application.
But I think that the singleton is used and abused very heavily. He is the
most popular unfortunately.

A second abused pattern might be the template method pattern. If this is used
heavily than it might be possible that the inheritance was used a lot and we
have an explosion at class numbers.

The two most usable patterns are observer and strategy. The bridge can be
used instead of the strategy when the problem gets too complicated. And you
always have to have a factory.

There are some minor remarks about the observer and strategy.
Once I started experimenting with patterns and stuff. I implemented the
observer as it was presented in the GOF. Later I have discovered that by
implementing a signal/slot mechanism would give much more flexibility and it
was bad to implement as described in the book.

Later on I discovered that using signal/slot (event/delegate) I can implement
much more flexible observer, strategy and other pattern functionality. I use
now signal/slot mechanism a lot.

Other pattern that I use extremely often is the decorator. This is because I
tend to work in a bottom up XP style sometimes. If you work in top to bottom
way you shall have strategy patterns instead.

That is all.

Best regards,
Ekart Laszlo





Archive powered by MHonArc 2.6.16.

Top of Page