vendredi 4 mai 2018

The best way to have multiple observer lists in observer pattern

I'm using observer pattern to write a simple group chat program.

Group1: A, B, and C Group2: A and C

A is a sender/subject with two lists, one for Group1 and one for Group2.

Is having two lists in subject class a good way to do this?

Is this violating observer pattern's feature?

Aucun commentaire:

Enregistrer un commentaire