I am handed a task to implement a (web) list component (in Java, but inspirations may come from programmers using other platform) that would render as a table with following requirements:
- Database paging. The list could contain several thousands of rows. At one time, the component could only hold a subset of the list in memory.
- Buffered "inline edit". (I'm not even sure this is the right term.) User may change data on any row, but the change should not be flushed/committed to the database just yet, not until the user hit "save" button.
- User may sort the table from any column, or create filters.
I'm thinking a solution that goes like this:
- I will implement a 'buffer' store that is queryable and cluster proof. Something like db4o (http://www.db4o.com/). I'm not sure whether choosing this particular component is wise.., but you get the idea.
- on flow start (flow==between initial page load and 'save' button clicked) , the whole (unfiltered) list is loaded into the store. The list component will query against this temporary store.
- Any changes to the data during this flow will be made against object in the store.
- when user click 'save', all dirty data in the store will be comitted back to the relational database.
What do you think of this solution?
Is there a particular component/technology I should try for the temporary store?