Design patterns: exposing notifications using a protocol <p>I have got several types of a logic controller class that handle the communication with a remote resource. To do so each class uses an instance of a network controller class that deals with the connection details: connects to a resource, sends data, receives data. The logic controller classes are notified of data changes from the network controller class using notifications. So in my current solution <strong>each logic controller class registers for the notifications and implements specific functions to deal with them differently</strong>.</p> <p>However, if I want to do proper code engineering, I wonder whether it would be <strong>more robust</strong> to use <strong>protocols</strong> and <strong>delegation</strong>.</p> <p>I wonder if I could define which methods the logical controller classes need to implement in order to receive the notification. However I am not sure if this makes sense and is correct because <strong>I do not want inheritance here</strong>. </p> <p>Any suggestion?</p>