- Inspiration for This Series of Articles
- What I Mean by "Data Containers"
- Best Practice for Data Containers
- .NET Options
- The DataReader: Background
- The Tests
- And the Testbed
- Result of the Tests
- Conclusion
What I Mean by "Data Containers"
Before we get started, it's important to explain what I mean by the term "data containers."
I think of data containers as both carriers of data and an important part of the programming model. That's still pretty abstract, right? Let's get down to earth. By "carrier," I mean that you need a way of transporting data between tiers in distributed applications. As an example, you use Windows Forms at a client, and you fetch a list of customers from a service running on an application server.
The other part of my explanation involves the phrase "part of the programming model." By that, I mean that when you need to cache data, run calculations, do validations, and so on, you need to keep your data disconnected from the database. The choice of programming model, for example, affects how to find a specific row, how to inspect columns, and so on. What is the most suitable way of representing the data, then, to make your programming productive and keep execution efficient?
NOTE
It's probably easier to use the same data container for the carrier of data between tiers and as the part of the programming model, but you don't have to do things this way. For example, you might use custom classes for your programming model and use datasets as the carrier. You will have to do quite a lot of conversions, but it's possible to go that route nonetheless.