Pagination in a REST web application

Typically, the user performs a search, gets a hit list and can view it. Hitlist is an intermediate result that remains unchanged during browsing and is usually stored in session state. For instance. if new elements are added at the same time by some others, they will appear only in a subsequent search.

In a REST application, I cannot easily get this intermediate result - and it does not belong to the client, nor to the model. I read Pagination in a REST web application , but I did not quite understand the answer. The solution seems to suggest that the model is not updating while the user is viewing the results.

We can, of course, imagine the world (model) as a series of unchanged images. By providing a timestamp (or global version number), we then get a consistent view of the model at a time that solves the problem from a conceptual point of view. However, it implies full modeling of the model. (I am also wondering if there is a drawing connection with functional programming)

How do I solve this problem?

Note. I ask because I plan to use a replay structure that has no idea about the state or session of an HTTP; he is pure soothing.

+5
source share
2 answers

. ehcache ( ) memcached ( ) . + . , , cookie . . ElasticSearch.

EDIT: - play-search http://github.com/jfp/play-search, :

    Query q = Search.search("object:dogs", Folder.class);
q.orderBy("object")
    .page(2,5)
    .reverse();

PS: Play . .net, , () - , asp.net mvc 2, Play. Grails - , Django/Python, Yii/Php, Rails - , jvm/clr. , , , jsf, spring mvc . spring roo - . Asp.net mvc asp.net .NET. # 1, asp.net jsf , . , Java - . scala ...

+5

, , , . , . , , ( ). , . , .

, - , . , ?

0

All Articles