开发者

iphone app to interact with website

Please forgive this simplistic iphone development question. I have written a web application in PHP and perl using a MySQL backend. The users log in with a username and password, and then are able to navigate around the site looking at there res开发者_如何学Cpective data.

I have decided to begin developing an iPhone app which will interact with the server (Linux Redhat that I have full control over). Now I know this is possible and I'm sure there are many tutorials out there to help so I am not asking for a 'how-to' here. What I would like to know is what should be my approach ie where do I start?? Some questions...

1) Should I be using a web service installed on my server, and if so which one? 2) How should I pass username and password data to the website if not using web service? 3) How easy is it to send the username/password, and receive any data securely ie HTTPS? 4) The old debate of JSON or XML for receiving data +/- sending login details??!

As I said, I am just looking for ideas/pointers on how to approach this project.

Thanks once again, Andy


1) It's up to you, you can create a RESTful web service and iPhone application which I personally preferred.

for 2),3) see

4) use JSON, it saves your bandwidth.

Alternatively you can develop a mobile website using somthing like Sencha Touch or jQuery Mobile and convert it into a native application


If you use JSON, dont forget to write some robust validation code to cope with malicious requests. The advantage of using XML is that you can use a validating parser and write a schema for all your documents, which can save you a lot of time and make your application more resilient to malformed requests.

I recommend you use a REST Web service over HTTPS, it makes things so much simpler.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜