I am looking to add this pattern to a db table. I looked at the code but i noticed an observer.php in the codebase, which is basically the same as the event.php but it has some differences. My question is which one is correct? which is will be better to implement. Personally i like the observer.php one more.
Well, if you want to save the information, then you need it... event.php doesn't have any code for saving data whereas observer.php does have it. Since you're talking about db... I assume that you want to keep the information in your database that is, save it
I have read the book but haven't had the time to go through it properly but that's the main difference I see between both.
Before asking, do a search... if you don't find the answer, then ask The purpose of this forum is to help others in the community, that's why it's called Sitepoint and not Linkpoint. SP Guidelines - No fluff.