One of my apps stores some configuration information in an XML file on the local disk.
On startup, a proxy reads in the XML via a delegate and sets it's data property equal to a new configuration dto.
Should it then send a notification with the XML/Dto as the body for a command to load the DTO from the XML, or should the proxy load the dto from the xml as a private method?
What is the best way to go vise versa?
The user is ready to save their information and the proxy is notified that it needs to save the configuration. Should the proxy load the XML from the Dto and have the delegate save it to the local disk, or should there be a command that is passed the Dto/Delegate and the command invokes the save method on the delegate after doing the Dto to XML conversion?
I like the idea of some generic commands with generic Dtos and Generic delegates that are then extended for more specific use cases, and that way the proxies truly are just a way to persist the data and fire commands without really knowing much about the data. Am I on the right track?