• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

NX: contractor question

 
Ranch Hand
Posts: 172
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
ranger
Posts: 17347
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 555
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic