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.
rest php zend-framework
Bogdan constantinescu
source share