+ 1
Doubt on observer design pattern
Hi Consider below two scenarios : 1. Family head say for example grand father gets notified if any of the family member go out of the house. 2. Smallest designation employee of organization takes a day leave on emergency and notifies spoc (single point of contact ) person of each department (account , finance , admin etc..) Let me know which one of the above two is considered observer pattern case ? And remaining one is scenario of which pattern ?
1 Resposta
+ 1
Observer design pattern can be used in both of these scenarios
1) family head is the observer and all the family members are subjects ( in this case, one might wanna update the notification event to uniquely identify seperate subjects )
2) This looks like a classical case of observer design pattern, where the employee is the subject and spoc of each department are observers.