Help get this topic noticed by sharing it on Twitter, Facebook, or email.
I’m frustrated

Dojo, JSONP, how do I USE the data?

I am talking about Dojo the definitive Guide by Matthew Russell. I have a couple of comments, a suggestion, and a question.

Comment: they expect me to already know what is so easy for them because they swim in it. But that is what the book is supposed to teach me. Some of the examples are such a minimal case that they don't tie to anything real world and just remembering what corresponds to what impedes understanding the material.

Suggestion: For every example, try to tie it to something concrete, instead of so much foo and bar. The liger/lion/tiger example to illustrate multiple inheritance was a good one, the book needs more like that. In some of the others I'm saying now wait: baz is the data and foo is the function that's being passed to bar, no wait it's the other way around. Just simply giving them names that have meaning makes it easier to get head around. Also some examples are not complete. Like the one on p 102, you don't need to wrap it in addOnLoad but a beginner might not know this.

And now for my question about the example on 102. I think it is working, in firebug I expand out the object returned from FlickR and I get lots of FlickRy looking stuff. However I do not understand how I would do anything with this data via a callback. The text says it "creates a temporary function and channels the response into the load function" and I do not understand that sentence. What does the "temporary function" do? Sooo this is NOT a callback I would write like the one in the "primer"? would I wrap this thing in addOnload and a function tag and then use the result. I mean come on I went to all the bother to get this data from a web service, I probably want to put it on the web page.
1 person has
this question