Take the 2-minute tour ×
User Experience Stack Exchange is a question and answer site for user experience researchers and experts. It's 100% free, no registration required.

I'm creating an Android app which is an on-device portal for installing applications. I'm currently storing the required images (apps and category icons) in an Sqlite database using base64 encoding algorithm.

Now I can feel that the app runs slowly when it needs to decode the images and display them to user.

Should I continue using my current approach or is it better to fetch images from server every time they are needed?

Remember that for the latter approach we need a working internet connection.

Or, alternatively, should I implement a non-DB local cache feature?

share|improve this question
    
Belongs on stackoverflow.com –  Danny Varod Mar 1 '12 at 16:37
1  
No, this question is fine here. The question is about impact on UX, not about technical implementation. –  Rahul Mar 1 '12 at 16:40
    
Quotes (for original version, not my edit): "or it's better to fetch images from server every time I need them?" "Or should I implement a cache feature?" - implementation questions. UX requirements are not the question (speed + offline, not speed vs offline). –  Danny Varod Mar 1 '12 at 16:57
1  
- Doesn't matter if it was a technical question, we'll answer it from a UX perspective anyway. Deal with it! ;) –  Tony Bolero Mar 2 '12 at 8:14

5 Answers 5

An important aspect of the user experience as it relates to user interfaces is responsiveness.

You should optimise your app so that the user doesn't notice whether you're caching images, rendering them from a local database or fetching them from the server.

Whichever approach leads to the best responsiveness is the best isolated option from a user expeirence point of view.

share|improve this answer

First of all, I'm not very sure if this question belongs here.

Anyways, I think one solution for the problem you mentioned could be saving low resolution images in your database which can be used to quickly load your app, and if an Internet connection is available you can fetch your images from there.

Still, if you upload some screen shots from your app, it might be helpful to give some other suggestions based on your context.

share|improve this answer
    
It belongs here. He's not asking about code implementation. Response time is very much related to UX. –  dnbrv Feb 29 '12 at 22:07
    
But specific technical ways to achieve a high response time? You basically say yourself below that you can't answer the question as asked and just comment on something else… –  Gala Mar 1 '12 at 8:03

As a UXD, I can't tell you the exact implementation method because I don't know the various storage architectures & access protocols. However, I can tell you that, in this situation, the top-most priority should be response time.

Users don't care how or where images are stored and retrieved. They just care about accomplishing their tasks quickly, especially when it comes to working on mobile devices. In that context, users are on the go and aren't likely to have the luxury of waiting for the app to download standard data or sift through a large poorly-organized local storage. The loading time of each screen you should be aiming for is 1 second.

As I've said, I can't tell you precisely how to achieve that time with coding but here's what you need to keep in mind when implementing it.

  • Unless the business data used by your app needs to be up to date (i.e. is downloaded for every session), tour only solution is local storage because mobile data consumption isn't cheap and may not be available everywhere. And even if a new set of data needs to be downloaded for every session, graphics requires far more traffic.
  • If you're saying that storing all images in a SQLite database encoded in Base64 increases the response time, you need to experiment with other formats for storing image data. This may include keeping each graphic element in a separate file in the device's file system or using a different compression format or implementing sprites or even downsampling the images.
  • Finally, if there's so much graphics needed that you can't reduce the response time to a reasonable value, you need to go back to the drawing board and re-evaluate your GUI: I'm sure some images can be dropped without harming the UX.
share|improve this answer

This question really belongs on StackOverflow, since it is obvious that you want you application to be responsive, but you are not sure how to make it so.

Local databases are usually used for cache and for improving response time, not for increasing it.

If accessing your local database (SQLite) and decoding from BASE64 slows your app more than direct Internet approach, then your DB/DAL design/code and/or decoding algorithm/code really need improving. Both should take a negligible amount of time.

Also, you could store the images in binary format (if you can't do this with SQLite, then use another DB).

Seeing that your app is a mobile app and not a web page, it probably should be able to run offline, so access the web each time shouldn't be mandatory.

share|improve this answer
    
While the question is in fact a valid question for UXSE, you've given an answer that does belong on SO. –  Rahul Mar 1 '12 at 16:42
    
I did flag it for moval to there and I do not thing this question is a UX question - the responsiveness should not be worse because of the offline requirement. Anyway, voting it down for answering in a useful way just because it is not a UX answer is just wrong. –  Danny Varod Mar 1 '12 at 16:52
    
The question is as UX as it could be. It's about response time's effects on overall experience given the constraints of each method not about specific architectures & protocols. –  dnbrv Mar 1 '12 at 17:02
    
Lets agree to disagree. –  Danny Varod Mar 1 '12 at 17:57
    
Thank you for your answer but my question is not about technicality of the matter, but it's about the compromise of speed in favor of accessibility. –  Hamed Momeni Mar 2 '12 at 7:09

If the app needs to be functional even if the app loses its connection to the Internet and the images is critical to understand and interact with interface then they need to be cached.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.