posted 20 years ago
I have a question about how generalized the project should be.(for the record fields) For example, after I read the db file, I will know the names of each field, then I can use this infomation to design my data class, GUI and search algorithm. The other approach is that I design the data class with general names ( field1, field2,...) Then at runtime, after the project read the db file, it will assign the fieldNames to data clas and all GUI staff.
The first approach is obvious easier and cleaner, however it needs previous knowledge of the data structure. The second approach is all runtime decided, more generalized project, it may even work for other db format. I wonder which one is the better choice, is the second one necessary?