Let's see how best to answer this question.
Answer to 1
There was no iPhone app. At work, I create / maintain an Adobe AIR client application that makes many service calls. My rule is to do something that makes sense on the client (use their resources), instead of constantly messing with the server. Usually, our application downloads all the necessary information from the server and has enough data to do business. From time to time, he needs to send this information back to the server, which will be stored in a safe place, but most of the logic of how everything works in the client application.
Because we use Adobe technology, we use AMF as the transport protocol for sending data between the client and server.
Answer to 2
Security will be up to you. I talk about this more in step 4. For REST, you simply pass get / post / delete / etc with values ββthat are not hidden. XMLRPC you just pass xml that everyone can see. Now REST is a discussion. Since there is no real standard, it is difficult to determine what REST is when people talk about it. If you want to use REST, I don't think that Zend_Rest really does a good job of handling it. There are other frameworks that focus on REST that may work better for you. Also, if security is important, use HTTPS instead of HTTP.
If you decide to do REST (the right way ) I think you will need a lot of time.
Answer to 3
All about how you create it. I use Zend for the services I described above at work. I built it in such a way that you can use the whole API using JSONRPC or AMF (and I can easily add XMLRPC or others if I want) and consume the same resource. I use AMF for our AIR application and I use JSONRPC for my PHP sites / tools. I like JSON better since I feel it is less weight than xml and it is easier for me to work.
Then I have a cron job where every night I cache thousands of requests that cost data from db to memory. The data that I know will not change the next day and will be used quite often. Everything that is not cached by this process will be cached individually at the request of the client with a specific expiration time. What all of this means, all of my business calls are extremely fast and efficient. Many times I donβt even have to hit db, so the server-side request processing time is a split second.
In addition, if you use Zend, do not use the framework for the API, just use the server module as a separate part. Do not use the entire MVC stack, just create a separate file for each protocol that you want to use. I have json.php that handles JSONRPC requests and an amf.php file that handles an AMF request. Both files inside are quite lightweight, they just need to run Zend_Json_Server or Zend_Amf_Server, assign the class path where my classes are located, and process the request.
Answer to 4
Whatever protocol you use, you will need to integrate security into it, as with any protocol. You can use Zend and acl authentication modules. If you transfer sensitive data back and forth, be it json, xml, rest, you will need to encrypt this data, or someone will see it. AMF is a binary format that is a little harder to do than that. Whichever protocol you choose, you still need to create an authentication mechanism to make sure others don't use it without access.
If you are looking for more information on the various ways to create web services using Zend, I think the Zend Framework Web Servicces book is a good resource to start with. Hope this helps you get started.