The right algorithm for a dynamicaly image showing photo album application
posted 11 months ago
I'm building a photo album application for android. The app simply shows 50 photos on the main screen and when a user clicks on one of them, the profile screen of the photo owner is opened.
If the user X is not subscriber of the user Y, he/she sees user Y's photos as locked (blurred with a lock image).
For this purpose, I keep two versions of a photo as blurred and original on server's disk and when the main screen is loading, the app decides and generates a proper link to get the proper photo from server.
The link generation is performed by checking each photo owners whether the app user is subscriber to them or not.
Letting the logical work to the client side is a correct approach ?
Or, should I put an imageurl field to the photo object and the app would only be reponsible for calling the getImageURL() method? However, in this case I should keep imageURL fields for each user to another differently. In other words, there wouldn't be a single imageURL field for a photo on my database.