RESTful Zend Framework API

I am developing an application based on the Zend Framework, and I found myself writing a skeleton for an API module. I read a little on the Internet, and started writing a skeleton based on Zend_Rest_Controller . It turned out that to enter the API, you must enter the key.

The questions started when my colleague started implementing the skeleton in the right API for one of our applications. He told me that he thought it would be better if we had a regular Zend_Controller_Action , extended in the API controller, and in indexAction a Zend_Rest_Server , which processes the object.

I'm a little confused. From my personal point of view, I would like to have a "more than average" controller containing each of the 4 actions (get, post, put, delete) and some logic in each action, and not one action controlled by Zend_Rest_Server .

My problem is that I cannot figure out which of the two solutions is better in terms of architecture; and, of course, the most easily repaired over time.

+7
rest php zend-framework
source share
2 answers

Zend_Rest_Server is generally considered deprecated in favor of Zend_Rest_Controller / Zend_Rest_route. See this post from MWO'P , for example.

Only this will push me to Zend_Rest_Controller / Zend_Rest_Route.

+5
source share

If you want to do REST on Zend, I suggest you take a look at the Resauce Framework

+1
source share

All Articles