I'm developing an application that needs to be very easily maintained. Currently, the program calls a boolean function, which determines if a given set of criteria are met, and then if true... increments a counter. Afterwards, it moves on to the next function, until all 9 funcitons have been called and the counter now set anywhere between 0-8.
I would like to put each function in a class file, within a subfolder. IE: Main Application -> Service1.asmx -> DataCriteria (folder) -> OverLimit, UnitExpired, AddressUnavailable, etc. etc. etc.
Then, have a method (using reflection or whatever means possible) that will loop through each .vb (class) file in the DataCriteria folder, and run its Main function to get the boolean. This would mean that the calling application does not care how many classes exist in that folder, it checks each class. And if new criteria needs to be added, i just create a new class and plop it into that folder, without having to edit any code files.
Of course, each class within the DataCriteria folder would need to implement an interface, to verify that they each have the same method type...
any ideas / suggestions?
View Complete Post