Quote:
The first issue is whether rows can be retrieved quickly enough as a user scrolls down a table , I thinking that if I use hibernate in conjunction with a database Iit caching will ome into play but will that solve the issue.
In my experience hibernate is very fast considering what it does for you. I only find problems with hibernate with complicated joins and often that can be solved with a little thought about the structure of the data or even just better index's in the database itself. Obviously if you write your own sql for the database using plain jdbc you'll be able to get a performance improvement, but that performance improvement in my opinion is not worth the productivity using hibernate gives you.
Quote:
Also colums are sortable, so if a user clicked on a column it would somehow need access to every row in order to sort correctly.
You would have to sort at the database level, however hibernate offers multiple ways to do this in a database neutral way. You can look at criteria or just using hql(basically these will give you a way to define the order by clause).
Quote:
Although the table column can have seventy columns by default only ten are shown, however the other sixty are still stored in the tables data model using valuable memory so I think I could grab some memory back here, but then if they decide to show the other 60 columns it could blow memory in one go
.
If you are using hql you can define the columns that are returned and they will come back as a list of objects not your mapped classes. For instance:
Code:
select p.firstName, p.lastName from Person p
This will return a List of Lists with a String Object for firstName and a String object for lastName.
You can also cast your items to an object for instance using a map
Code:
select new java.util.HashMap(p.firstName as FirstName, p.lastName as LastName) from Person p
This will return a List of Maps where you can just call map.get("FirstName") to retrieve the first name. You can use the same method to cast other types of objects also.
Quote:
I also considered using some kind of paging mechanism so that even if there were 100,000 rows loaded , only a 1000 were loaded into a table in one go, and you get to the bottom of the table the next 1000 are loaded, is this feasible.
I would page the data in small increments. As human being I can't process even a thousand rows at a time. If I look at list I generally scroll to a certain item, look at the top ten or look at the bottom ten in a list. Never do I process the whole list. I would say a hundred is sufficient with paging.