问题
I'm using Visual Studio 2008 to interface with several data sources, mostly SQL Server 2008 Express and Visual Foxpro.
Should I use the Data Source Configuration Wizard or should I build my own Connection, DataAdapter, DataSet, Command, and DataTable using code? What factors should influence my decision?
I usually go the code route if it gives me more power or control. However, I know from experience that there are certain products (like SBS 2008 or SonicWall) where using using the built-in wizards is not only preferred but almost mandatory.
回答1:
Developers spend much more time maintaining the application as compared to writing them. So, the decision should be based on readability and maintainability.
The wizards generate code which has to be understood at some point in time; either when complexity increases or when version changes.
I would advise using hand written, clean code as much as possible. Unless the tool/library makes the overall code much smaller.
来源:https://stackoverflow.com/questions/5052064/should-i-use-the-data-wizard-in-visual-studio