mardi 21 juillet 2015

Client and server: data filtering and sorting synchronization.

I have a java client-server crud application. In client I open person table and I can set filter for example by city,age,sex. Besides I can add some sorting rule, for example sort by name,and after by age. These filtering and sorting rules are sent to server where they are passed to sql dao and used in sql code. So server returns DTO to client according to filtering and sorting rules. It's is important - it is server that implements these rules as client only passes these rules to server. Everything is easy and clear.

Now I create new Person in client application. Newly added person must be visible in table of persons. And now I came across a problem. How to add this person to table according to filtering and sorting rules. The only solution I see is to make client refresh all the data from the server according to the same rules. However it is obvious this is bad solution.

I am sure that this is common problem for crud application. What are possible solutions: patterns,algorithms,libs? What is the name of this problem (if it exists)

Aucun commentaire:

Enregistrer un commentaire