samedi 25 mars 2023

Best practice for displaying large number of fields in GUI

I have a class with about 300 fields - and firstly, no this cannot be changed as it is based on an external requirement.

I need to display these in a GUI, specifically a TableView.

Currently I am considering two approaches and am wondering which is most appropriate and/or are there any better solutions?

  • The first approach is using reflection to grab the field names and query values of instances of the class. The main benefit is if fields in the class change, this won't need to be updated. The main drawback is that reflection, especially showing field names to the user, seems bad practice to me.
  • The second approach is individually listing field names and fields, the main benefit and drawback being the opposites of reflection.

TIA





Aucun commentaire:

Enregistrer un commentaire