C
Chumma Dede
Hi,
We are building a 3-tier web-app and are currently in planning phase.
At the business layer, I have a class which has a 2-d array which can
potentially hold thousands of rows. The thing is on the UI, I would
like to implement some kind of paging to display only N rows at a time
from this 2-d array.
I only want to retrieve records for the current page from the database.
This way the object does not overload memory with all rows that are not
currently shown on the UI.
How should I handle this in the class design? Should I have a property
in the class which will hold the current page number? This class
represents a business object, so I am not keen on that solution.
Any suggestions on how to handle this while designing classes? We are
currently in the Planning phase, and this will be a great help.
Thanks,
JGP
We are building a 3-tier web-app and are currently in planning phase.
At the business layer, I have a class which has a 2-d array which can
potentially hold thousands of rows. The thing is on the UI, I would
like to implement some kind of paging to display only N rows at a time
from this 2-d array.
I only want to retrieve records for the current page from the database.
This way the object does not overload memory with all rows that are not
currently shown on the UI.
How should I handle this in the class design? Should I have a property
in the class which will hold the current page number? This class
represents a business object, so I am not keen on that solution.
Any suggestions on how to handle this while designing classes? We are
currently in the Planning phase, and this will be a great help.
Thanks,
JGP