in reply to Bundling unrelated classes
A typical approach is to adopt a layered architecture, where the lower-level objects don't know much about the higher-level ones.
For example, perhaps instead of having references to all of the other objects, the connection object can get by with just converting the incoming message into a standard format and passing it to a callback function? That way, some object from a higher layer could create the connection, pass it the relevant configuration information, and register the callback to be invoked when a message is received.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Bundling unrelated classes
by redlemon (Hermit) on Dec 18, 2004 at 20:45 UTC |