Frederick Marcoux
Frederick Marcoux

Reputation: 2223

Zend - Creating an PHP API for a mobile application

I'm currently planning the creation of a mobile application for and .

The application will permit to the end-user to manage and see the progress of its projects. (Web creation company).

The application will have:

The question is: What is the best way to create an API (Restful or something else) using the Zend Framework?

This API must and will be integrated to a custom-made Projects Management System and a MySQL DB.

Upvotes: 0

Views: 958

Answers (2)

Jan P.
Jan P.

Reputation: 228

I just working on PHP API (no matter if API is for mobile platforms or another webs) and after realizing between SOAP and REST I chose a RESTful API and I can recommend it...

Zend Framework has components for both of mentioned approaches, but REST is easier and more understandable in comp. with SOAP...

The one thing what you have to think about is logging, you can use HTTP Auth or OAuth (HTTP autentification is easier), but better approach according to me is generate unique API KEY for your users (each user should have own KEY) and this KEY ensure you can recognize user and a security risk is minimal because user do not have to send login and password inside HTTP request (security risk) and in case of KEY is catched on WIFI or infrastructure, hacker do not get user logins to web application, only for API where propably will not be all features what main web app offer.

And if you set some time expiration for you KEYs or IP restriction for KEY, than you can make it more safe:)

Some tip for the end: Implement API as new separated ZF module.

Upvotes: 2

Hari K T
Hari K T

Reputation: 4244

One of the best stuffs I have noticed so far is http://getfrapi.com/

It makes use of everything from Zend to Pear. May be you should checkout the video http://www.youtube.com/watch?v=vJVQi7ZFSaQ

Upvotes: 0

Related Questions