I was wondering what the correct solution would be to this simple problem.
I am receiving requests, all of base class 'clsRequest'. Each request is simply a data holder of sorts, with zero logic. However, each class needs to be handled differently. In order to keep the separation of data and logic, I would need to create a handler class corresponding with each type of request. Further, I don't know how I would call the handlers without creating a hashtable linking each request to its correct handler. All this could be avoided if I simply put the handler logic inside the request class itself - voiding it of the data/logic separation. I'm assuming it is a simple solution that I am missing.
thank you for your help,
Phil
I am receiving requests, all of base class 'clsRequest'. Each request is simply a data holder of sorts, with zero logic. However, each class needs to be handled differently. In order to keep the separation of data and logic, I would need to create a handler class corresponding with each type of request. Further, I don't know how I would call the handlers without creating a hashtable linking each request to its correct handler. All this could be avoided if I simply put the handler logic inside the request class itself - voiding it of the data/logic separation. I'm assuming it is a simple solution that I am missing.
thank you for your help,
Phil