views:

238

answers:

1

There seems to be two different ways in the Zend Framework to implement a RESTful API, one by adding objects&functions to the Zend Rest Server object inside a action controller, the other through extending the very sparsely documented Zend Rest Controller method mentioned in the Zend Rest Router configuration.

My questions are:

  1. Do you configure the Router to point at the Zend_Rest server or
  2. Do you extend the Zend_Rest_Controller class and instantiate business objects inside action methods?

Thanks!

+1  A: 

You should use Zend_Rest_Route and extend Zend_Rest_Controller. Zend_Rest is far from beeind RESTfull its more of another RPC.

Miha