Implementation differences between Zend_Rest_Server & Zend_Rest_Controller

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!

13.10.2009 18:21:25
1 ОТВЕТ

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

1
15.10.2009 06:37:51