ZF-5027: Zend_Rest isn't really RESTful
The Zend_Rest package seems to be based on a very liberal, and not very literal, idea of representational state transfer (aka, REST).
- Currently, the package is not payload-agnostic, requiring XML. In true REST, the payload structure is arbitrary. Standard HTTP payloads (key-value pairs) should be supported if it's going to be called RESTful.
Improvement: factor out the XML generation and decoding to a sub-package or subclass that can be used when desired.
- REST requires the use of HTTP verbs (GET, POST, PUT, DELETE, OPTIONS, HEAD) and not tunneled verbs. In the documentation, for 1.6.0, section 40.3.3, developers are instructed to tunnel the name of an application-specific method. This is RPC & SOA, and not ROA, and is very much anti-REST.
Improvement: support all HTTP verbs instead of custom method invocation (which makes it an RPC library, not a REST library). Follow the pattern of other RESTful frameworks/libs, and the O'Reilly RESTful Web Services book, and tunnel only standard HTTP verbs over POST for connectors that don't support all verbs (_method=PUT) but do not allow custom tunneling (method=doSomethingNonHTTPBased).
REST doesn't mean arbitrary XML over HTTP - it's far more specific to HTTP itself. I would absolutely love to see true REST support in ZFW, and am happy to contribute to a rewrite.