Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

NX: contractor question

 
Yuan Ye
Ranch Hand
Posts: 172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well you want the Data class to be generalized, and the application/gui side can be and shouldbe more specific. You are given the data structure of the data in your instructions.html.
Think about creating classes that can be "helper" classes representing a record, and/or a data field.
Mark
 
Vlad Rabkin
Ranch Hand
Posts: 555
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Peter,
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.

Sounds good.
Best,
Vlad
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic