Working with Data Sources / Testing the App
Visitors to VTC.com will be able to view all introductory videos for each training course.
Free Trial Members will gain access to first three chapters for each training course.
Full Access Members have full access to VTC.com’s entire library of video tutorials.
Learn More
Subtitles of the Movie
Now, I'm using the template here and I have a lot of data down here in this data feed that I can use and one of the things that I'm going to do is to modify this template and the structure so that I can put more of the data from this feed into it. Now, I'm going to change the description because I happen to know, since I've seen them before, that these descriptions are sometimes fairly lengthy. I have a field here called location and I could use that for any of these other things. I can, for example, attach it to the studio name as text. So I've got the studio name there. There's another field that's rather interesting and that is this poster field, which I can expand or collapse. But I have a large poster here that I can use and what I'm going to do is to create from the library an image container and I'm now going to bind the large poster to the image. I'm doing it the same way. I'm going to the binding control and dragging to a field. And in the case of an image, what I want is the source. And so now I've got a new look to the back of the details of the movie and I've linked it to instead of JSON, to an XML-formatted dataSource and instead of a flat file I'm linking it to a URL so I have live data that I'm pulling off of Apple's site. So now let's take a look and see what happens when I run this. OK, I'm going to click here to open the simulator and we want to simulate running on the Apple domain because what I'm doing is this is the cross-domain scripting issue and simulating it will be just fine here. And the simulator is running. The reason it's fine to simulate that is because when you deploy this you'll be using your own URL feed and you won't have to worry about cross-domain scripting. So here's a list of movies with current trailers on Apple's site and let's take a look at 2012 and see what I've done is I've pulled down the title, this is the studio, this is the poster and I have the description here. I can now use the same principles that I've used before. Let's stop this and what I'm doing now is I'm going to move this up because I can see that I have some little reshaping to do and I'll do that later but what I've done is picked up information from the dataSource that's online. Dashcode parses it, whether it's JSON or XML into this structure, gives me binding controls here and I start what I have to do in a browser. I start from the dataSource. I won't have the list here yet and I've got to do a binding to the list and once I've done that, then I have the list set up and I can bind elements within this list to fields, usually at the detailed level. So I come here, I see the list of the items from the data sources and then I go into details and I pull the data from the list element.
Tutorial Information
| Course: | Developing iPhone Web Apps |
| Author: | Jesse Feiler |
| SKU: | 34075 |
| ISBN: | 1-935320-89-0 |
| Release Date: | 2009-12-31 |
| Duration: | 8 hrs / 103 lessons |
| Work Files: |
Yes |
| Captions: | Available on CD and Online University |
| Compatibility: |
Vista/XP/2000, OS X, Linux QuickTime 7, Flash 8 |
VTC Sign up & Benefits
- Unlimited Access
- 98,729 Video Tutorials (23,265 free)
- Video Available as Flash or QuickTime
- Over 1026 Courses
- $30 for One Month Access
- Multi-User Discounts Available
United States 