Yes it makes sense sometimes to have an observer also be observed.
Ask yourself why you want to apply the pattern, however. Observing just to give updates might be more complicated to debug, compared to just updating directly, e.g., the child calls his parent when he updates.
Generally, Observable
s don't want to know the details about their Observer
s (decoupling, information hiding) so that you can make virtually any class an Observer
. If that is what you need, then the pattern is good for you. If not, then adding this may result in needless complexity (harder to understand and debug the code).
Edit (I had this backwards): Do your child (Observable) items already know all the details about their parents (Observer)? If they do, then using Observer
might be over-design. If children don't want to know the details of their parent, then Observer
could be useful.
When making observers be observable, watch out for cycles https://stackoverflow.com/a/964820/1168342