Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
OOP Design
Message
General information
Forum:
Visual FoxPro
Category:
Object Oriented Programming
Title:
Miscellaneous
Thread ID:
00198504
Message ID:
00198667
Views:
17
I have a mediator that calls a class called Updator. Updator updates a given field. The problem is that I have *multiple updates* to do. The exact number and process of the updates will vary depending on the specific situation.
>
>How do I structure the mediator and Updator so that the 'Updator' process gets called the proper number of times?

Hi Ellen,
A couple of questions:
1.) Which objects in your system know what fields need to be updated?
2.) Have you looked at the Iterator and Visitor patterns?
If there are objects(call them 'process objects') that know which fields need to be updated in a given situation, then you could iterate through them and either:
a.) Pass a reference to your visitor into the process object and have it call the appropriate methods to update the data
- Isolates knowlege of fields to update to the process objects
b.) Pass a reference to your process object to the update object and have it iterrogate the process object to determine which fields need to be stored, what their values are and update the data
- Requires a more complicated update object then option a.)

HTH,
Ned
Ned

Reality is.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform