Page 1 of 1

Server response strategy

Posted: Fri Aug 07, 2009 11:16 am
by ConvertFromOldNGs
by Bob >> Sun, 21 Nov 1999 0:47:12 GMT

I have been working on a server that can serve many types of requests. The response mechanism is designed using the Strategy Pattern. The upper level request handler chooses which response strategy is appropriate.

Within the strategy is a 3 layer class hierarchy. There is information in the request object that the leaf objects must know. I don't want to have to pass down the information, as the information may not be appropriate for the parent class. Instead I plan a per connection response repository which each object in the tree can peruse. This solution produces a tight coupling between the response repository and the individual response objects. Does this seem like a realistic solution? Does anyone know of a good pattern to better solve this problem?

Cheers,
-Bob
==============================================================