O'Reilly logo

Sencha Touch 2 Mobile JavaScript Framework by Bryan P. Johnson, John Earl Clark

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required