[wp-trac] [WordPress Trac] #14618: Proposal: Standardize WP Responses to JS Requests as JSON
WordPress Trac
noreply at wordpress.org
Thu Jan 3 15:26:00 UTC 2013
#14618: Proposal: Standardize WP Responses to JS Requests as JSON
-------------------------+-----------------------------
Reporter: filosofo | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Future Release
Component: JavaScript | Version: 3.0
Severity: normal | Resolution:
Keywords: needs-patch |
-------------------------+-----------------------------
Changes (by MikeSchinkel):
* cc: mike@… (added)
Comment:
Replying to [comment:22 josephscott]:
> A simple HTTP (REST, though that term is generally mis-understood and
abused) would be my preferred approach.
+1 that a general API for WordPress sites would be RESTful and not RPC.
RPCs are becoming the anti-pattern for web APIs where REST APIs ''(mis-
understand and abuse)'' are becoming the standard. You'll find very few
public web APIs offered as JSON-RPC or even XML-RPC vs. REST ''(24+169 vs.
5348):''
- http://www.programmableweb.com/apis/directory/1?protocol=JSON-RPC
(Count: 24)
- http://www.programmableweb.com/apis/directory/1?protocol=XML-RPC (Count:
169)
- http://www.programmableweb.com/apis/directory/1?protocol=REST (Count:
5248)
Here's a few good articles on the topic:
- http://www.emergentone.com/blog/api-types-rest-vs-rpc/
- http://blog.perfectapi.com/2012/opinionated-rpc-apis-vs-restful-apis/
One of the biggest benefit of REST vs. RPC is REST uses the natural
caching mechanisms of HTTP.
That said, I do agree adding JSON-RPC support would be great in the short
term, see: #23099.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/14618#comment:28>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list