I'm creating a study application where on the home screen I have to get images for each record via REST. However the way I structured it is not the indicated one as I make a call of a run server action on the client side. How do I get the best practice and consequently performance in my application?

Thanks in advance.

Hi Pedro!

You could make it in background, using off line synchronization, but it depends of your use case. You can take a look on this article that explains off line data sync patterns, and choose which one better switch to you.



Hi pedro Quintino,

You can use Ajax to perform this as your retrieving data through REST, logic can be included in javascript section of web screen.


I'm sorry I forgot to say that this is a mobile app.


Hi Pedro,

REST calls are always made via the Server, so you're going to do a round trip to the server anyway. To minimize overhead, call the REST service (or Server Action) once, and have it return all the images at once.

EDIT: However, a better approach would be, like already suggested, to use offline datasync, and cache the images. This will greatly reduce the time needed to show the images, which makes for a better user experience.