Winforms MDI application

Posts   
 
    
Rbautista
User
Posts: 1
Joined: 03-May-2006
# Posted on: 03-May-2006 18:12:35   

Hi. I am evaluating llblgenpro and i have a question about the some best practices for my particular scenario.

As MDI application the user can have many mdi child windows "live", and in them have references to collections of the same type, for combo boxes (for example), such is the case for two windows needing the "Customers" collection.

The user too can open another mdi window with the "Customers" and add, modify or delete any customers, then the customer collections in the another mdi windows can stay out of sync from customers.

Can you suggest to me how to keep in sync all customers collectios.

thanks in advanced.

jeffreygg
User
Posts: 805
Joined: 26-Oct-2003
# Posted on: 03-May-2006 23:01:23   

You'll want to be very careful here and make sure you're appropriately handling the inherently unsafe nature of caching, threading, and multi-user problems, but...

You can share the same collections between forms if the forms need the exact same set of data. If not, you can use the Observer pattern to manage updates between screens such any changes to one screen are transmitted to the other. Either will work, but you'll need to be sure you know what you're doing, especially in multi-user or multi-threaded environments.

Hope that helps.

Jeff...