I often write software for systems that are responsible for testing manufactured products. For every product that gets tested, we have to generate a report for the test-results. The way that we do it now is that we create a
.txt file with the test-results and write that file into some folder on our network drive. Ultimately, I am looking to move toward a database solution such as SQL.
Since I know that we will eventually be moving towards some kind of database solution, I would like to segregate the current functionality (writing the
.txt file to the network drive) by an interface. Eventually I will be able to write a library to control the logging of the test-results to some database. When that happens I would like to simply implement the same interface that the current test-result logging solution will use.
As for the interface, I was thinking to have some simple methods that I know I'll need such as:
LogResults(string operator, string product, string serialNumber, string Results) Connect(string pathToDriveLocation)
The only thing is, I've never done a database before and I'm not sure if I can adapt the two different ways of performing the logging to the same interface.
Am I thinking about this correctly? Does this seem like a sound approach, or does it need some work?