Keeping application backend and UI synchronised
Posted
by
Deanna
on Programmers
See other posts from Programmers
or by Deanna
Published on 2011-03-02T11:59:46Z
Indexed on
2011/03/02
15:32 UTC
Read the original article
Hit count: 165
Hi all.
I have an app that works with a list of objects so has one central keyed list. The main window has a tree containing these object with some information, which is easy enough to populate as a one off event after loading.
Now, the complicated part, any part of the application can add, remove, and more importantly change the details of those objects at any time (all in the same process) and I'd like the tree to update to suit.
I have a few options including passing events back down from the object to the list to the form which seems to be the most flexible way. I can also do it lazily and repopulate the tree each time or periodically (very hackish).
Does anyone have any better thoughts on how to structure this?
This is being done in C# 2.0 but the concepts apply to any environment.
Thanks
© Programmers or respective owner