Author: Okash Khawaja | Posted on: 7/2/2008 7:38:15 PM | Views : 815

Hi!

� 

I am new to software design and first time using GoF design patterns.

� 

I have a situation where the� Factory Method� design pattern seems a suitable solution.

� 

There are 15 different message formats (there can be more in future)� and each has different number of fields and a different pasing algorithm. So an IMessage interface is will be parent to 15 concrete Message classes (1 for each message format). A Creator class will contain IMessage and create concrete Message objects by parsing the message string.

� 

The problem to me is having 15 different classes! This is a big number of classes (or is it?) Please tell me whether this is a good solution, or I better use a single Creator class with 15 different parsing methods. Or if there is any other design pattern more suitable but without that many classes ...

Go to the complete details ...