Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


Share this Page URL
Help

Project 1: Music Store Browser > Adding Backend Capabilities - Pg. 69

Project 1: Music store Browser 69 Adding Backend capabilities Now that we are ready with the user interface we can start working on the interaction with remote data. As we have said in the presentation of the project we will use iTunes Search API to query the music store database. If we check out the documenta- tion it is easy to find out that we are interested in the following URL: http://ax.itunes.apple.com/WebObjects/MZStoreServices. woa/wa/wsSearch?term=ARTIST&country=COUNTRYCODE. Values highlighted in italics are to be substituted by "real" val- ues like "Led Zeppelin" and "us"; therefore, the final URL will be like the following: http://ax.itunes.apple.com/WebObjects/ MZStoreServices.woa/wa/wsSearch?term=led+zeppelin&coun try=us. If we paste this URL into a browser we should see some JavaScrip Object Notation (JSON), as in Figure 1.6. This means that we are on the right track, in that parameters are correct and the web service is working. Let's copy the same URL, for we will use it to build the backend functionality of our application. In the Data/Services tab we start up the wizard to create a new web service and we choose "HTTP," as in Figure 1.7. We paste the URL in the first table and press "Enter." As you