Database Example:
function initDatabase() {
try {
if (window.openDatabase) { // check if your environment is ok to use
database
db = openDatabase("myTestDatabase", "1.0", "Test", 10000);
if (db) {
db.transaction(function(tx) {
tx.executeSql("CREATE TABLE IF NOT EXISTS main (id REAL UNIQUE,
text TEXT)", [], function (tx, result) {
// do something interesting with the result
});
});
} else {
// show an error
}
} else {
// database not supported (
}
} catch (e) {
// unknown error
}
}
------
As far as RESTful examples are concerned: Just take any of your existing
code and copy/paste it to the iPhone. It works *exactly* as in any other
web-browser.
It's as simple as sending this GET request:
<http://api.flickr.com/services/rest/?method=flickr.test.echo&name=value>
For REST & JSON see i.e. this:
<http://ajaxian.com/archives/more-ajax-experience-videos-json-and-javascript
>
differences to XML:
<http://ajaxian.com/archives/json-vs-xml-the-debate>
And you should definitely get a book. I.e. .
"Building iPhone Apps with HTML, CSS, and JavaScript" by Jonathan Stark
great stuff - and answers most your questions.
And again: Google is your friend
a.
On 31.03.10 16:24, "rim negra" <[email protected]> wrote:
> ok Andy thanks .. .. that's good ... so I can develop do that without
> objective c but do you have an example for that ??
> I am not experimented and I really nedd help ..
>
>
>
>
>
> 2010/3/31 Andy Fuchs <[email protected]>
>
>> You don't need Objective-C, you can use any Javascript framework too, or
>> write a small wrapper by your own. You can also use XML and parse this
>> through a library or DOM (depending on how that XML looks like).
>>
>> For RESTful examples, just use Google, which should dig up plenty.
>>
>> a.
>>
>>
>> On 31.03.10 15:11, "rim negra" <[email protected]> wrote:
>>
>>> the question was how can I use web services in my application iphone ???
>>> I have learned that I should use the framework Json with the objective c
>>>
>>> I also leanrend that iphone dosen't support the xml
>>>
>>> What I need for the moment is to run a simple example of app iphone which
>>> consume RESTful web services
>>> Is it clear now ?? Can any one help me -_- '' ??
>>>
>>>
>>>
>>>
>>> 2010/3/29 Andy Fuchs <[email protected]>
>>>
>>>> What is the question?
>>>>
>>>> a.
>>>>
>>>>
>>>> On 29.03.10 19:28, "rim negra" <[email protected]> wrote:
>>>>
>>>>> I am waiting for an answer .. Who can help me .?
>>>>>
>>>>> 2010/3/29 rim negra <[email protected]>
>>>>> I have to create an application iphone wchich uses RESTful web services
>>>> that I
>>>>> have alrealdy prepared them ..;
>>>>>
>>>>> How I could proceed ?????
>>>>>
>>>>> any help !!! any documentation !!!
>>>>>
>>>>> thanks
>>>>>
>>>>>
>>>>> --
>>>>> You received this message because you are subscribed to the Google
>> Groups
>>>>> "iPhoneWebDev" group.
>>>>> To post to this group, send email to [email protected].
>>>>> To unsubscribe from this group, send email to
>>>>> [email protected]<iphonewebdev%2bunsubscr...@googl
>>>>> egroups.com>
>> <iphonewebdev%2bunsubscr...@googleg
>>>>> roups.com>
>>>> .
>>>>> For more options, visit this group at
>>>>> http://groups.google.com/group/iphonewebdev?hl=en.
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> You received this message because you are subscribed to the Google
>> Groups
>>>> "iPhoneWebDev" group.
>>>> To post to this group, send email to [email protected].
>>>> To unsubscribe from this group, send email to
>>>> [email protected]<iphonewebdev%2bunsubscr...@google
>>>> groups.com>
>> <iphonewebdev%2bunsubscr...@googlegr
>>>> oups.com>
>>>> .
>>>> For more options, visit this group at
>>>> http://groups.google.com/group/iphonewebdev?hl=en.
>>>>
>>>>
>>
>>
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "iPhoneWebDev" group.
>> To post to this group, send email to [email protected].
>> To unsubscribe from this group, send email to
>> [email protected]<iphonewebdev%2bunsubscr...@googlegr
>> oups.com>
>> .
>> For more options, visit this group at
>> http://groups.google.com/group/iphonewebdev?hl=en.
>>
>>
--
You received this message because you are subscribed to the Google Groups
"iPhoneWebDev" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/iphonewebdev?hl=en.