Typed Datasets or Custom Objects: Revisited

posted on 04/18/04 at 01:19:12 am by Joel Ross

After doing some more thinking about this, and talking to a colleague, I've come to a conclusion on this: KISS. Keep It Simple, Stupid. I was overcomplicating it.


The solution is to use a Manager design pattern that manages the objects. Instead of using custom objects or typed datasets, the data objects we use to create the collections are already data objects. We don't want to add the data access to those classes, so we use a Manager to facilitate CRUD functionality for our objects.


This approach is much simpler, and makes me feel much more comfortable than either of my other two approaches. The odd thing about this? It's really a mixture of the two approaches. I'll be using custom objects, and have a central class that handles the management of the custom classes.


This just shows me (once again) how little I truly get about best programming practices. Seeing the solution laid out in front of me (a solution presented to me by my colleague), it makes perfect sense, but it wasn't something I could figure out on my own. As soon as I saw it, I knew it was what we needed, and that uneasy feeling I had went away.

Categories: ASP.NET