The business problem is this: I'm loading a bunch of data into a database via the .bcp mechanism. The data is loaded into a "raw" table, and from there I sql over the raw table and insert into a more 'refined' version of the table.
To represent this, I have a RawTable class, whose attributes are the columns of the corresponding raw table. Every time I add / remove a column, I have to change the class definition of the RawTable ( too tightly coupled ). If the class builds its definition from the raw table schema, then I never have to change the RawTable class; it picks up the changes automatically.
Thus, if the schema changes (ie remove/add a column), exactly the _reverse_ happens to what you described above: I have to change _no_ code.
Thus in this case, I don't have to worry about the schema and application being too closely coupled; this close coupling is actually a Good Thing.
Granted, for larger problems, all of your points above are quite valid.
In reply to Re: Re: constructing dynamic class definitions at compile time (from schema definition)
by sozinsky
in thread constructing dynamic class definitions at compile time (from schema definition)
by sozinsky
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |