One of the advantages of the observer template is that if you have a large number of events that are usually signed by the interested party, then transferring one object to the event subscription method is much easier than subscribing to each event individually. With the lack of C # specifications of interfaces and methods for anonymous classes, how can this be done with Java , the implementation of the observer pattern becomes a little more time-consuming, so most options for using events in any case.
Another advantage of the traditional observer pattern is that it copes better when you need to interrogate a subscriber for some reason. I came across this need with objects that cross the border of a web service where there are problems with delegates, while the observer pattern is just a link to another object, so it works fine as long as your serialization maintains the integrity of the links inside the object like the NetDataContractSerializer. In these cases, it is possible to distinguish subscribers who must be deleted before making the service boundary, based on whether the reference subscriber is included in the same object graph.
source share