Rhys666
Programmer
- May 20, 2003
- 1,106
OK, not a very specific question but one I've gotta ask.
I'm currently working on an ASP.net project at a place that has a plan - and that plan is Component classes (with encapsulated typed datasets, SqlConnections, SqlCommands etc). For example, the app will have four admin pages, and each admin page will instantiate the component class from which it'll populate the page controls, perform updates etc. Drop Downs are bound to datatables, which are stored in the viewstate.
Most places I've been haven't really used Component classes and I have been of the belief that for small apps, datasets and datatable can be very heavyweight, especially if you don't use the Dispose method to clean up resources etc when you're done. So, usually I've used straight classes with dynamic datasets/datatables where it felt necasary and I've utilised datareaders to populate dropdowns.
In your experience, what are the pro's and con's of utilising Component classes over a standard Class, (and vice-versa)?
Rhys
""Vampireware /n/, a project, capable of sucking the lifeblood out of anyone unfortunate enough to be assigned to it, which never actually sees the light of day, but nonetheless refuses to die."
My Home
I'm currently working on an ASP.net project at a place that has a plan - and that plan is Component classes (with encapsulated typed datasets, SqlConnections, SqlCommands etc). For example, the app will have four admin pages, and each admin page will instantiate the component class from which it'll populate the page controls, perform updates etc. Drop Downs are bound to datatables, which are stored in the viewstate.
Most places I've been haven't really used Component classes and I have been of the belief that for small apps, datasets and datatable can be very heavyweight, especially if you don't use the Dispose method to clean up resources etc when you're done. So, usually I've used straight classes with dynamic datasets/datatables where it felt necasary and I've utilised datareaders to populate dropdowns.
In your experience, what are the pro's and con's of utilising Component classes over a standard Class, (and vice-versa)?
Rhys
""Vampireware /n/, a project, capable of sucking the lifeblood out of anyone unfortunate enough to be assigned to it, which never actually sees the light of day, but nonetheless refuses to die."
My Home