Hello, Let's say I have an object that is fairly complex. Since it is so complex, it takes a bit to load from the database. Now let's say my users want a grid that shows all of these objects, and I know if I provide it the performance will not be desirable. I'm trying to put my finger on the best way to handle this. So far I have two ideas:
Implement lazy-loading: I really don't need the entire object to display the grid. I'm not sure I want to go this route those because everywhere else will need the entire object loaded and I don't want to drastically change my architecture for grids.
Return a recordset specifically tailored for my grid: This is the way I am leaning. Basically I would return a DataSet or simply flat object. My Stored Procedure can do the data relations to return the recordset as desired.
Is there any other approaches I might want to look at? I haven't done any real grids previously and wanted to make sure I did it right the first time. Can anybody come up with any disadvantages of my second idea?