Making the SearchPhotos components

For searching photos, we will need a store and two views (list and details). When our application launches, the SearchPhotos.js controller will determine the user's current location. The controller will then load the store based on that location and display the photos in our list component. When the user taps on an item in the list, the controller will grab our details view and use it to display more information about the photo.

Let's start by creating our data store.

Creating the SearchPhotos store

The data store is in charge of contacting the Flickr API and getting the photos for our list. We will also need to include some basic information for paging and a reference to our shared model file.

Create a new file ...

Get Sencha Touch 2 Mobile JavaScript Framework now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.