PDA

View Full Version : O'Reilly Conference App Data Connection



pphelan@gmail.com
4 Apr 2011, 10:12 AM
I am interested in learning more about the O'Reilly Conferences App Sample and source code. I reviewed the source code provided under examples with Sencha Touch 1.1.0 but am still a little confused with how the app connects with the O'Reilly external data. Does anyone know of a way to see the data format for the O'Reilly's external data? Is it coming from an XML file? If so what is the address?

gammba
5 Apr 2011, 9:44 AM
In oreilly-all-debug there's an entry in the proxy refering:
url : 'https://en.oreilly.com/' + this.shortUrl + '/public/mobile_app/all'

this generates the address:
https://en.oreilly.com/web2010/public/mobile_app/all

I saved the json data in that address to a local file and changed the entry on the file pointing to my local file, but on page load, i can see that a request is still being submitted to:
http://en.oreilly.com/ /web2010/public/mobile_app/all?_dc=1302024778246&callback=stcCallback1001&limit=25&sort=%5B%7B%22property%22%3A%22time%22%2C%22direction%22%3A%22ASC%22%7D%5D

Also i deleted all entries in the local file except for one, so there should be only one entry in the list, yet i get all the items.

If u get on the road with this, please post it.

Cheers!

Bucs
12 Apr 2011, 11:01 AM
Have you tried to use Chrome and XHR to see the request and the responses? Shouldn't that do the trick for you?

lyrics
28 Sep 2011, 6:51 AM
Hi there,

I'm trying to get the example app to read my own proposals and speakers but it won't work. Is there any soltion for that. What I tried and did:

1.
I downloaded the json-encoded file generated on https://en.oreilly.com/web2010/mobile_app/all and uploaded it to my server. Then I changed the SessionList.js variable "url" to the file on my server. That did not work.

2.
I wrote a php-script and tried to generate my own json-encoded data. That did not work either

3.
I wrot a php-script to read out the response from https://en.oreilly.com/web2010/mobile_app/all and proxy it. Did not work.

Can please anyone help me. What I need is to find out how I can use my own data (json resonse or any other text, csv, php-response).

Thank you very much in advance!

lyrics
28 Sep 2011, 10:25 AM
I placed the following index.php file and a validated json text which I got as a response from the O'Reilly Link into a folder. Navigating to that folder I get exactly the same result I get from O'Reilly but the sencha example still does not show any result.

<?
header('Cache-Control: no-cache, must-revalidate');
header('Content-type: application/json');
header("Content-Disposition: attachment; filename=all");

$file = file("all");
foreach($file as $zeile)
{
echo $zeile;
}

?>

Ideas? Greetz.

lyrics
30 Sep 2011, 12:06 AM
First step: I placed the all.json file in the app root. Then I changed the src/SessionList.js proxy settings to
proxy: {
type: 'ajax',
//url : 'https://en.oreilly.com/' + this.shortUrl + '/public/mobile_app/all',
url : 'all.json',
reader: {
type: 'json',
root: 'proposals'
}
}
That did the job for local storage. Now I'm still searching for a way to place the file on a remote server and get a connection. Help appreciated.