Views, ImageCache and an iPhone app

When developing a mobile app, be it for the iPhone, an Andriod phone or a Blackberry, having dynamic data sprinkled in the app is important. has recently sponsored the Dog Park Finder iPhone app and they wanted a thumbnail photo in each dog park listing.

One key is that if a park gets its first photo, or a better photo, the editors wanted to be able to promote the photos to the top of the photo page, and to have it show up as the thumbnail in the iPhone app. To do this without updating the app, we used a static URL that points to a View, which displays a Imagecached image.

Imagecache was used to exactly size photos to fit in the frame used in the app, while Views allows us to have a static URL, even though the photo displayed can be changed by the editors (by using the Sticky flag). This flexibility is key to pushing the photos they select into the app without an app update.

Another Module that is key for making a mobile app is Path Redirect. This is needed because many times the URL of a page is need for a web view display. But if a page URL changes then it will break the mobile app, thus being able to use Path Redirect's ability to redirect from an old URL to a new one is great.

I can hear someone say that with the Global Redirect module you could just use 'node/44' type URLs, but we didn't like that solution because in the 'Tell a Friend' email, a URL is embedded that directs to a dog park details page, and we didn't want a 'node/44' type URL in the email.

The next few updates in the app will add in the ability to submit reviews, submit photos and read in live reviews into the app using the services module. I will write about those interesting tasks as they come.