A**o 发帖数: 1550 | 1 来个常见问题:
比如说java版面,查询后可以得到一个list,因为结果多,要分页。
另外进入每篇文章后,可以有本查询上一篇,下一篇的功能。
大家都是怎么实现的?说说自己的经验吧。
谢谢! |
t*******e 发帖数: 684 | 2 Pagination is better to be implemented at the SQL level. |
A**o 发帖数: 1550 | 3 that's fine. so you are proposing an in-house ad-hoc solution?
【在 t*******e 的大作中提到】 : Pagination is better to be implemented at the SQL level.
|
t*******e 发帖数: 684 | 4 Hibernate/JPA supports pagination out of box. Hibernate Search enables
pagination for Lucene. LDAP v3 does the same at the protocol level. |
k***r 发帖数: 4260 | 5 我都是自己写。不难呀。
【在 A**o 的大作中提到】 : 来个常见问题: : 比如说java版面,查询后可以得到一个list,因为结果多,要分页。 : 另外进入每篇文章后,可以有本查询上一篇,下一篇的功能。 : 大家都是怎么实现的?说说自己的经验吧。 : 谢谢!
|
A**o 发帖数: 1550 | 6 en, i'm working on jpa now.
i'm already using EJB3 on other part of project.
not much choice now.
【在 t*******e 的大作中提到】 : Hibernate/JPA supports pagination out of box. Hibernate Search enables : pagination for Lucene. LDAP v3 does the same at the protocol level.
|
b******y 发帖数: 9224 | 7 sql level is good. We just roll our own, nothing too difficult. |
b******y 发帖数: 1684 | 8 and use Value List Handler pattern for caching
【在 b******y 的大作中提到】 : sql level is good. We just roll our own, nothing too difficult.
|
F****n 发帖数: 3271 | 9 这个东西要做好不容易,真要做的话可参照GOOGLE MAP
做一个2D Grid 然后Tiling Cache. 这应该是Ultimate Solution.
【在 A**o 的大作中提到】 : 来个常见问题: : 比如说java版面,查询后可以得到一个list,因为结果多,要分页。 : 另外进入每篇文章后,可以有本查询上一篇,下一篇的功能。 : 大家都是怎么实现的?说说自己的经验吧。 : 谢谢!
|
A**o 发帖数: 1550 | 10 haha, fancy naming
【在 b******y 的大作中提到】 : and use Value List Handler pattern for caching
|
b******y 发帖数: 1684 | |
A**o 发帖数: 1550 | |
s******e 发帖数: 493 | 13 usually to basic ways.
one situation is that you are sure that result set is not that big, you can
pass all the results to the front, let front paly with it (paging or sorting
). This way you will not have real time but you do relieve the server burden
. On the front, you have a better response time, on the server side, it is
more scalable.
Another situation is that your result set is huge, you will need to sort at
sql level (if you have to support multiple db servers, you should know that
there |