When I read Observer Design Pattern,I understood is that whenever there is update to an object that has one to many relationship,we can send update message to other objects by using Observer Design Pattern.But I think is that we can use Database transaction to update table that has one to many relationships and its related tables whenever we need to update that table.So Why we need to use Observer Design Pattern if we can use DataBase.If my question is stupid enough,Please pardon me.
I will wait your explanation eagerly.Have a nice day!
Aucun commentaire:
Enregistrer un commentaire