Pattern?

Posts   
 
    
mikeg22
User
Posts: 411
Joined: 30-Jun-2005
# Posted on: 20-Jun-2006 01:06:21   

I am looking for a pattern that can be used to notify different parts of my program when an entity is updated/inserted. For example, I have a grid of Employee data that was created by a call to a SP. When the user updates an Employee's from a seperate form, I want the fact that an update of employee data happened to reach the object holding the grid, so the grid can be refreshed.

I can think of ways to do this with delegates/subscribing to update events, etc. However, I would like to use a well defined pattern to avoid any future architectural problems that I may introduce by using my own pattern.

Any suggestions?

sami
User
Posts: 93
Joined: 28-Oct-2005
# Posted on: 22-Jun-2006 14:37:24   

Have you taken look to CAB

http://www.gotdotnet.com/codegallery/codegallery.aspx?id=22f72167-af95-44ce-a6ca-f2eafbf2653c

That framework has a publish/subscription mechanism for 1-1, 1-m, m-1 and m-m messaging. Atleast check out that part of the block - although the whole block is quite neat, me thinks simple_smile