DataReader is alleen nuttig in 2-tier stateful applicaties of binnen de datatier zelf. Een DataReader ( wat een open dataverbinding is!) buiten de data-tier brengen levert problemen op, want je helpt voordelen van n-tier development om zeep. Je moet imho dus de keuze maken: OF n-tier development, en dus tiers als black boxes met een disconnected behaviour, OF een alles-in-een tier zonder black boxed layers.
Hieronder een rijtje uit mn artikel over n-tier development in de LLBLGen documentatie. Deze punten haal je niet met een open database verbinding die tussen tiers heen en weer wordt gesjoeld:
• Functionality separation. Because each layer has a well defined role in the total application, the system designers plus developers know where which functionality should be implemented or is located.
• Functionality reuse. Because each tier provides a service to the layer(s) on top of it, different layers or tiers or even complete other systems, can use that particular layer to provide some services for them. This is the basis for the Webservices idea.
• Functionality abstraction. By defining parts of an application's logic as tiers, you can hide how that tier provides its services for the rest of the application. This is particular useful when the application has to grow in functionality. By keeping the interface of the tiers consistent (or at least backwards compatible) the users of those interfaces, other tiers, will keep working when the tier's inner logic itself is updated and even totally rewritten.
• Functionality scalability. Because the tiers are separate units, you can decide to run each tier in an application on different machines, to keep the system scalable when the load on the application grows. When an application consists of one big executable, it's hard to chop it up into separate blocks and run each of them on different servers or even clusters of servers.
• Functionality maintainability. Because the functionality can be reused, it can also be centralized, so instead of storing all the logic in one big client and installing that on hundreds of machines, you can now store all the logic in one tier on a central server and make the clients connect to that tier on that machine to consume its services. This way a single place of functionality has to be controlled and maintained. The extra bonus of this is that the databases behind that centralized tier are also shared among those clients, which means that database-redundancy and the unavoidable inconsistency between these redundant databases are history. This is the main goal for Webservices.
IMHO zijn datareaders een vrij overbodig component, temeer omdat in pure n-tier applicaties je geen datareaders gebruiken KUNT, gewoonweg omdat tiers dan functioneel samensmelten omdat je de abstractie die je creeert door juist alles in een afgeschermde tier te plaatsen, weghaalt.