in reply to Thorny design problem
This would make me go with something akin to:
DataCollector DataCollector::Mechanized DataCollector::Mechanized::WalMart DataCollector::Mechanized::GeneralElectric DataCollector::RDBMS DataCollector::RDBMS::ExxonMobil DataCollector::FTP DataCollector::FTP::GeneralMotors DataCollector::Scrape DataCollector::Scrape::FordMotorCompany DataCollector::Scrape::CiscoSystemsInc . . . etc.
Your driver program would then, unfortunately, need to know all of the DataCollector leaf classes or devise a method to dynamically load and run them. But for each of these classes, you could call the above mentioned methods. Those methods would make private method calls on down until you get to the ugly details in the individual implementation classes. These implementation classes would only need to know where it's going for data and how to pull the real data from raw data source. Up one level would be how to talk to the data source type, based on information in the implementation classes. Up in the top level is the detail of how to write out the data.
I hope this makes sense, isn't too vague, etc. Good luck.
|
|---|