I'm writing essentially a client based SQL interface(although the client
accesses it indirectly).
In the database there will be several different types of tables. Initially
I was only going to use one table structure but I felt that it would be more
productive to have it arbitrary.
Now I want to generate an gui for access each table. The issue here is that
each is structured differently.
So maybe I have one table that has {Name, ID, Info} and another {Hash, ID}
and I want to automatically generate a gui for this. I was thinking that I
could make an xml file that basically copies this structure and generate the
interface(Which is essentially just lables and text boxes) for the user to
interact with. But I was thinking this is unnecessary? Can't I just get
the table structure directly from SQL and generate the xml files? (or bypass
that all together... although I wouldn't want to query the database every
time when the structure will rarely change except when adding new tables).
e.g., I could create a new windows form interface for each table when I add
it. This would require me to design and rebuild the application every time a
table is changed. I could use XML that "mimic" the table structure and then
write the generic code in the app but this would require me to write the XML
code each type(which isn't so bad and doesn't require recompliation but has
sync/versioning issues). But I could get the table structure directly from
the database and generate the interface "on the fly" and it would work
arbitrarily for any table. The main issue here is that I would be wasting a
lot of processing power and bandwidth for doing the same task over and over.
So I suppose I could cache the table structure info or something like that.
Anyways, Is there any better way to handle this?
Thanks,
Jon