Designing N-Tiered Data Access Layer Using Datasets
Posted on 2008-01-11 14:16 青松阳光 阅读(217) 评论(0) 收藏 举报- 
    Datasets have a good structure for handling collections of data well (as compared to the alternative of using collections or array lists). The data tables and data rows are well suited to processing data in memory. 
- 
    The class wrappers generated for the data tables and rows provide strong typing, Intellisense in the code editor, and compile time error catching. The data entity structure is modeled well and highly functional. 
- 
    Methods are generated to handle the infrastructure needed for initialization, serialization, creating, deleting, relating, finding, strong typing, and changing data. 
- 
    The table adapters abstract and wrap all of the ADO.NET provider specific code to persist the data to the database. 
The Bad:
- 
    Some developers criticize datasets as being heavy weight, generating properties and methods that may never be used. 
- 
    The class wrappers do not include wrappers for the data access logic to preserve the tier separation. 
- 
    Table adapters do not allow runtime customization of the SQL queries. 
- 
    Entity structure and table adapter methods are generated into the same file, restricting the capability of physically separating the tiers into separate projects (but they are separated by namespace.) 
 
 
                     
                    
                 
                    
                 
 
         
                
            
         浙公网安备 33010602011771号
浙公网安备 33010602011771号