Quote:
Originally Posted by idima
Hey dicklacara, thank you very much!
The synchronization must run over EDGE, 3G or WIFI not over USB. I think, it's the best solution to implement a web service for the server, that realizes the sync. Do you have some further information or tutorials for this?
Thank you very much for your help!!!
|
The web service is prolly the best solution.
I haven't screwed around with web services or web programming since 2004, so my answer may be somewhat dated:
The only experience I have writing/publishing WS (Web Services) is using CF (ColdFusion) on the server. It is easy to do but CF isn't as common as PHP and some other web programing languages.
On the client side I used JavaScript.
The data was exchanged using an XML packet. Alternately, you could exchange data using a WDDX packet. WDDX is simply XML coded with a convention to to allow the server to supply JavaScript routines (along with the data) to encode/decode the data on the client,
Here's what the process looked like:
The Client Side Application:
1) receive input from the user (or client app event)
2) generate SQL request
3) XML encode the request if necessary
4) pass the request to the web service
The Server Side application:
1) receive request
2) decode (XML parse) the input if necessary
3) analyze the request
4) perform the DB query
5) XML encode the query results
6) return the results
The Client Side application:
1) receive results
2) decode (XML parse) the results if necessary
3) analyze the results if necessary
4) generate DB query to update client DB if necessary
5) perform the DB query to update client DB if necessary
6) display results if necessary
Given: that you have access to (or can write) a web service that functions as described above.
Your iPhone app would likely include:
1) an http interface to access the web service
2) an XML parser
3) an XML encoder
4) an SQLite DB interface
Since the iPhone SDK has only been around a few months, you prolly aren't going to find an example that does what you want. The SDK includes examples using XML and SQLite... the guys at pragprog.com are considering a chapter on consuming WS... and you can google for examples of other pieces.
Whew!
I, too, am interested in an iPhone app that does this. I need to add similar capability to a future version of an app that is currently being prepared for publication. I'd prefer not to spend the time to bring up a DB server, refresh my knowledge on WS publishing, learn how to do it in PHP...
Rather, if someone knows of a publicly-accessible WS that interacts with an SQL DB (receiving DB queries, returning results) then I could concentrate on the client-side iPhone app.
HTH
Dick