t-knapp / BINhungrig-fh-bingen-mensa-android

Android App "BINhungrig" for menu of cantina of Fachhochschule Bingen
3 stars 1 forks source link

Allow users to change their rating #6

Open git-commit opened 10 years ago

t-knapp commented 10 years ago

How to persist it at client side? SQL?

git-commit commented 10 years ago

Two solutions I came up with:

Api handles the changed ratings

Every device could identify itself to the api using a uuid (or device id).

api.php?dishid=1&rating=5&deviceid=abc

The API would need to keep track of new and updated ratings in that case.

App removes old rating, then sends new rating

We can also add a funktion to the api to revoke a rating. The App can use this function to remove the old rating and then send a new rating.

I think if it's possible to add a UUID, letting the API handle the ratings (and later other stuff too maybe) would be the better solution, though a little more effort to implement.

Either way we implement that, just note that the button should be labeled accordingly to the action the app is going to perform. E.g. "Bewerten", "Bewertung ändern", "Bewertung löschen"

Any other suggestions?