Deprecated: Assigning the return value of new by reference is deprecated in /home/fumanchu/webapps/b2/blogs/inc/_main.inc.php on line 128

Deprecated: Assigning the return value of new by reference is deprecated in /home/fumanchu/webapps/b2/blogs/inc/_main.inc.php on line 134

Deprecated: Assigning the return value of new by reference is deprecated in /home/fumanchu/webapps/b2/blogs/inc/_main.inc.php on line 141

Deprecated: Assigning the return value of new by reference is deprecated in /home/fumanchu/webapps/b2/blogs/inc/_main.inc.php on line 169

Deprecated: Assigning the return value of new by reference is deprecated in /home/fumanchu/webapps/b2/blogs/inc/_main.inc.php on line 199

Deprecated: Assigning the return value of new by reference is deprecated in /home/fumanchu/webapps/b2/blogs/inc/_main.inc.php on line 205

Deprecated: Assigning the return value of new by reference is deprecated in /home/fumanchu/webapps/b2/blogs/inc/_main.inc.php on line 233

Deprecated: Assigning the return value of new by reference is deprecated in /home/fumanchu/webapps/b2/blogs/inc/_main.inc.php on line 248

Deprecated: Assigning the return value of new by reference is deprecated in /home/fumanchu/webapps/b2/blogs/inc/_main.inc.php on line 254

Deprecated: Assigning the return value of new by reference is deprecated in /home/fumanchu/webapps/b2/blogs/inc/_main.inc.php on line 267

Deprecated: Assigning the return value of new by reference is deprecated in /home/fumanchu/webapps/b2/blogs/inc/_main.inc.php on line 595

Deprecated: Assigning the return value of new by reference is deprecated in /home/fumanchu/webapps/b2/blogs/inc/files/model/_file.funcs.php on line 559

Deprecated: Assigning the return value of new by reference is deprecated in /home/fumanchu/webapps/b2/blogs/inc/_connect_db.inc.php on line 29

Strict Standards: Declaration of UserSettings::get() should be compatible with AbstractSettings::get($col_key1, $col_key2 = NULL, $col_key3 = NULL) in /home/fumanchu/webapps/b2/blogs/inc/users/model/_usersettings.class.php on line 208

Strict Standards: Declaration of UserSettings::set() should be compatible with AbstractSettings::set() in /home/fumanchu/webapps/b2/blogs/inc/users/model/_usersettings.class.php on line 208

Warning: Creating default object from empty value in /home/fumanchu/webapps/b2/blogs/inc/settings/model/_abstractsettings.class.php on line 223

Warning: Creating default object from empty value in /home/fumanchu/webapps/b2/blogs/inc/settings/model/_abstractsettings.class.php on line 223

Warning: Creating default object from empty value in /home/fumanchu/webapps/b2/blogs/inc/settings/model/_abstractsettings.class.php on line 223

Warning: Creating default object from empty value in /home/fumanchu/webapps/b2/blogs/inc/settings/model/_abstractsettings.class.php on line 223

Warning: Creating default object from empty value in /home/fumanchu/webapps/b2/blogs/inc/settings/model/_abstractsettings.class.php on line 223

Warning: Creating default object from empty value in /home/fumanchu/webapps/b2/blogs/inc/settings/model/_abstractsettings.class.php on line 223

Warning: Creating default object from empty value in /home/fumanchu/webapps/b2/blogs/inc/settings/model/_abstractsettings.class.php on line 223

Warning: Creating default object from empty value in /home/fumanchu/webapps/b2/blogs/inc/settings/model/_abstractsettings.class.php on line 223

Warning: Creating default object from empty value in /home/fumanchu/webapps/b2/blogs/inc/settings/model/_abstractsettings.class.php on line 223

Warning: Creating default object from empty value in /home/fumanchu/webapps/b2/blogs/inc/settings/model/_abstractsettings.class.php on line 223

Warning: Creating default object from empty value in /home/fumanchu/webapps/b2/blogs/inc/settings/model/_abstractsettings.class.php on line 223

Warning: Creating default object from empty value in /home/fumanchu/webapps/b2/blogs/inc/settings/model/_abstractsettings.class.php on line 223

Warning: Creating default object from empty value in /home/fumanchu/webapps/b2/blogs/inc/settings/model/_abstractsettings.class.php on line 223

Warning: Creating default object from empty value in /home/fumanchu/webapps/b2/blogs/inc/settings/model/_abstractsettings.class.php on line 223

Warning: Creating default object from empty value in /home/fumanchu/webapps/b2/blogs/inc/settings/model/_abstractsettings.class.php on line 223

Warning: Creating default object from empty value in /home/fumanchu/webapps/b2/blogs/inc/settings/model/_abstractsettings.class.php on line 223

Warning: Creating default object from empty value in /home/fumanchu/webapps/b2/blogs/inc/settings/model/_abstractsettings.class.php on line 223

Warning: Creating default object from empty value in /home/fumanchu/webapps/b2/blogs/inc/settings/model/_abstractsettings.class.php on line 223

Warning: Creating default object from empty value in /home/fumanchu/webapps/b2/blogs/inc/settings/model/_abstractsettings.class.php on line 223

Warning: Creating default object from empty value in /home/fumanchu/webapps/b2/blogs/inc/settings/model/_abstractsettings.class.php on line 223

Warning: Creating default object from empty value in /home/fumanchu/webapps/b2/blogs/inc/settings/model/_abstractsettings.class.php on line 223

Warning: Creating default object from empty value in /home/fumanchu/webapps/b2/blogs/inc/settings/model/_abstractsettings.class.php on line 223

Warning: Creating default object from empty value in /home/fumanchu/webapps/b2/blogs/inc/settings/model/_abstractsettings.class.php on line 223

Warning: Creating default object from empty value in /home/fumanchu/webapps/b2/blogs/inc/settings/model/_abstractsettings.class.php on line 223

Warning: Creating default object from empty value in /home/fumanchu/webapps/b2/blogs/inc/settings/model/_abstractsettings.class.php on line 223

Warning: Creating default object from empty value in /home/fumanchu/webapps/b2/blogs/inc/settings/model/_abstractsettings.class.php on line 223

Warning: Creating default object from empty value in /home/fumanchu/webapps/b2/blogs/inc/settings/model/_abstractsettings.class.php on line 223

Deprecated: Assigning the return value of new by reference is deprecated in /home/fumanchu/webapps/b2/blogs/inc/_core/_param.funcs.php on line 1692

Warning: Cannot modify header information - headers already sent by (output started at /home/fumanchu/webapps/b2/blogs/inc/_main.inc.php:128) in /home/fumanchu/webapps/b2/blogs/inc/sessions/model/_session.class.php on line 219

Deprecated: Assigning the return value of new by reference is deprecated in /home/fumanchu/webapps/b2/blogs/inc/generic/model/_genericelement.class.php on line 109

Deprecated: Assigning the return value of new by reference is deprecated in /home/fumanchu/webapps/b2/blogs/inc/_core/model/dataobjects/_dataobject.class.php on line 428

Deprecated: Assigning the return value of new by reference is deprecated in /home/fumanchu/webapps/b2/blogs/inc/_core/model/dataobjects/_dataobject.class.php on line 437

Strict Standards: Declaration of Blog::set() should be compatible with DataObject::set($parname, $parvalue, $make_null = false) in /home/fumanchu/webapps/b2/blogs/inc/collections/model/_blog.class.php on line 1886

Strict Standards: Declaration of Group::set() should be compatible with DataObject::set($parname, $parvalue, $make_null = false) in /home/fumanchu/webapps/b2/blogs/inc/users/model/_group.class.php on line 553

Strict Standards: Declaration of User::dbdelete() should be compatible with DataObject::dbdelete() in /home/fumanchu/webapps/b2/blogs/inc/users/model/_user.class.php on line 1343

Strict Standards: Declaration of User::set() should be compatible with DataObject::set($parname, $parvalue, $make_null = false) in /home/fumanchu/webapps/b2/blogs/inc/users/model/_user.class.php on line 1343

Strict Standards: Declaration of Filetype::set() should be compatible with DataObject::set($parname, $parvalue, $make_null = false) in /home/fumanchu/webapps/b2/blogs/inc/files/model/_filetype.class.php on line 192

Strict Standards: Declaration of Comment::set() should be compatible with DataObject::set($parname, $parvalue, $make_null = false) in /home/fumanchu/webapps/b2/blogs/inc/comments/model/_comment.class.php on line 1334

Deprecated: Assigning the return value of new by reference is deprecated in /home/fumanchu/webapps/b2/blogs/inc/_blog_main.inc.php on line 412

Deprecated: Assigning the return value of new by reference is deprecated in /home/fumanchu/webapps/b2/blogs/inc/items/model/_itemlist.class.php on line 483

Deprecated: Assigning the return value of new by reference is deprecated in /home/fumanchu/webapps/b2/blogs/inc/items/model/_itemlistlight.class.php on line 119

Deprecated: Assigning the return value of new by reference is deprecated in /home/fumanchu/webapps/b2/blogs/inc/items/model/_itemlistlight.class.php on line 838

Deprecated: Assigning the return value of new by reference is deprecated in /home/fumanchu/webapps/b2/blogs/inc/items/model/_item.class.php on line 1411

Deprecated: Assigning the return value of new by reference is deprecated in /home/fumanchu/webapps/b2/blogs/inc/items/model/_item.class.php on line 1414

Deprecated: Assigning the return value of new by reference is deprecated in /home/fumanchu/webapps/b2/blogs/inc/items/model/_item.class.php on line 3000

Strict Standards: Declaration of ItemListLight::query() should be compatible with Results::query($create_default_cols_if_needed = true, $append_limit = true, $append_order_by = true, $query_title = 'Results::Q...') in /home/fumanchu/webapps/b2/blogs/inc/items/model/_itemlistlight.class.php on line 48

Strict Standards: Declaration of GenericCategoryCache::clear() should be compatible with DataObjectCache::clear($keep_shadow = false) in /home/fumanchu/webapps/b2/blogs/inc/generic/model/_genericcategorycache.class.php on line 375

Strict Standards: Declaration of GenericCategory::set() should be compatible with DataObject::set($parname, $parvalue, $make_null = false) in /home/fumanchu/webapps/b2/blogs/inc/generic/model/_genericcategory.class.php on line 133

Strict Standards: Declaration of CollectionSettings::_load() should be compatible with AbstractSettings::_load($arg1 = NULL, $arg2 = NULL, $arg3 = NULL) in /home/fumanchu/webapps/b2/blogs/inc/collections/model/_collsettings.class.php on line 130

Warning: Creating default object from empty value in /home/fumanchu/webapps/b2/blogs/inc/settings/model/_abstractsettings.class.php on line 236

Warning: Creating default object from empty value in /home/fumanchu/webapps/b2/blogs/inc/settings/model/_abstractsettings.class.php on line 236

Warning: Creating default object from empty value in /home/fumanchu/webapps/b2/blogs/inc/settings/model/_abstractsettings.class.php on line 236

Warning: Creating default object from empty value in /home/fumanchu/webapps/b2/blogs/inc/settings/model/_abstractsettings.class.php on line 236

Warning: Creating default object from empty value in /home/fumanchu/webapps/b2/blogs/inc/settings/model/_abstractsettings.class.php on line 236

Warning: Creating default object from empty value in /home/fumanchu/webapps/b2/blogs/inc/settings/model/_abstractsettings.class.php on line 236

Warning: Creating default object from empty value in /home/fumanchu/webapps/b2/blogs/inc/settings/model/_abstractsettings.class.php on line 236

Warning: Creating default object from empty value in /home/fumanchu/webapps/b2/blogs/inc/settings/model/_abstractsettings.class.php on line 236

Warning: Creating default object from empty value in /home/fumanchu/webapps/b2/blogs/inc/settings/model/_abstractsettings.class.php on line 236

Warning: Creating default object from empty value in /home/fumanchu/webapps/b2/blogs/inc/settings/model/_abstractsettings.class.php on line 236

Warning: Creating default object from empty value in /home/fumanchu/webapps/b2/blogs/inc/settings/model/_abstractsettings.class.php on line 334

Warning: Creating default object from empty value in /home/fumanchu/webapps/b2/blogs/inc/settings/model/_abstractsettings.class.php on line 334

Warning: Creating default object from empty value in /home/fumanchu/webapps/b2/blogs/inc/settings/model/_abstractsettings.class.php on line 334

Warning: Creating default object from empty value in /home/fumanchu/webapps/b2/blogs/inc/settings/model/_abstractsettings.class.php on line 334

Warning: Creating default object from empty value in /home/fumanchu/webapps/b2/blogs/inc/settings/model/_abstractsettings.class.php on line 334

Notice: Array to string conversion in /home/fumanchu/webapps/b2/blogs/inc/_core/_param.funcs.php on line 1161

Notice: Array to string conversion in /home/fumanchu/webapps/b2/blogs/inc/_core/_param.funcs.php on line 1161

Warning: Creating default object from empty value in /home/fumanchu/webapps/b2/blogs/inc/settings/model/_abstractsettings.class.php on line 334

Warning: Cannot modify header information - headers already sent by (output started at /home/fumanchu/webapps/b2/blogs/inc/_main.inc.php:128) in /home/fumanchu/webapps/b2/blogs/inc/skins/_skin.funcs.php on line 379
RESTful JSON

Deprecated: Assigning the return value of new by reference is deprecated in /home/fumanchu/webapps/b2/blogs/inc/widgets/model/_widget.class.php on line 451

Deprecated: Assigning the return value of new by reference is deprecated in /home/fumanchu/webapps/b2/blogs/inc/widgets/model/_widget.class.php on line 547

Strict Standards: Declaration of ComponentWidget::set() should be compatible with DataObject::set($parname, $parvalue, $make_null = false) in /home/fumanchu/webapps/b2/blogs/inc/widgets/model/_widget.class.php on line 722
« Resources are concepts for the clientCherryPy for Python 3000 »

RESTful JSON

08/19/08

Permalink 07:40:00 pm, by fumanchu Email , 342 words   English (US)

Warning: Creating default object from empty value in /home/fumanchu/webapps/b2/blogs/inc/settings/model/_abstractsettings.class.php on line 334

Warning: Creating default object from empty value in /home/fumanchu/webapps/b2/blogs/inc/settings/model/_abstractsettings.class.php on line 334
Categories: IT


Warning: Creating default object from empty value in /home/fumanchu/webapps/b2/blogs/inc/settings/model/_abstractsettings.class.php on line 334
RESTful JSON


Strict Standards: Declaration of markdown_extra_plugin::GetDefaultSettings() should be compatible with Plugin::GetDefaultSettings(&$params) in /home/fumanchu/webapps/b2/blogs/plugins/_markdown_extra.plugin.php on line 84

Strict Standards: Declaration of smilies_plugin::GetDefaultSettings() should be compatible with Plugin::GetDefaultSettings(&$params) in /home/fumanchu/webapps/b2/blogs/plugins/_smilies.plugin.php on line 398

Strict Standards: Declaration of smilies_plugin::GetDefaultUserSettings() should be compatible with Plugin::GetDefaultUserSettings(&$params) in /home/fumanchu/webapps/b2/blogs/plugins/_smilies.plugin.php on line 398

Strict Standards: Declaration of auto_p_plugin::GetDefaultSettings() should be compatible with Plugin::GetDefaultSettings(&$params) in /home/fumanchu/webapps/b2/blogs/plugins/_auto_p.plugin.php on line 633

Interesting timing on Joe Gregorio's latest foray. Lately, I've been URI-ifying all the JSON calls which etsy.com's PHP layer makes to the back end (partly with the hope that that API would be opened up to the public someday, but that isn't currently a business need). Even though the company is bucking the mainstream quite successfully, the site itself is pretty typical e-commerce. Here's what I ended up with.

Out of 298 URI's (not counting querystring variants):

  • 40 are collections which support POST to add a subordinate item. Some of these are "top-level" object collections, and some are subordinate collections of data pertaining to single "objects" (e.g. /users/{user_id}/images/)
  • 37 are collections which support GET to return aggregated info on all, or a subset of, their members, sometimes with search params passed in the querystring.
  • 47 are traditional "objects" which support GET/PUT/DELETE on a URI of the form: /collection/subcollection/{id}, and tend to map to a database row (although many of those are virtual, being split in practice over several tables).
  • 92 are URI's which GET/PUT/DELETE "object attributes", usually a single scalar each, which tend to map to single database cells. Several of these have side effects when you set/delete them.
  • 34 are of the form /collection/count.
  • 31 are of the form /collection/ids/.
  • 20 are of the form /collection/count_and_limited_ids, which is perhaps a quirk of our architecture; at some point, I'd like to see how splitting these each into 2 calls affects performance.
  • 6 are RPC-style POST URI's which I haven't had time to refactor into real noun-y resources.
  • 2, I'm sad to say, are of the form DELETE /collection/{id}/cache

The URI space for this API is pretty sparse right now--these URI were simply created to replace an existing RPC-style space of procedure names. And it's essentially a single data point. However, I think it's pretty representative of e-commerce needs for RESTful JSON. One lesson might be that pagination (count and ids) should be addressed in any coordinated protocol effort.


Warning: Creating default object from empty value in /home/fumanchu/webapps/b2/blogs/inc/settings/model/_abstractsettings.class.php on line 334

Deprecated: Assigning the return value of new by reference is deprecated in /home/fumanchu/webapps/b2/blogs/skins/_item_feedback.inc.php on line 156

2 comments

Comment from: BradK [Visitor]

Strict Standards: Only variables should be passed by reference in /home/fumanchu/webapps/b2/blogs/inc/plugins/model/_plugins.class.php on line 677

Strict Standards: Declaration of PluginSettings::get() should be compatible with AbstractSettings::get($col_key1, $col_key2 = NULL, $col_key3 = NULL) in /home/fumanchu/webapps/b2/blogs/inc/plugins/model/_pluginsettings.class.php on line 95

Strict Standards: Declaration of PluginSettings::set() should be compatible with AbstractSettings::set() in /home/fumanchu/webapps/b2/blogs/inc/plugins/model/_pluginsettings.class.php on line 95

Warning: Creating default object from empty value in /home/fumanchu/webapps/b2/blogs/inc/settings/model/_abstractsettings.class.php on line 334

Strict Standards: Only variables should be passed by reference in /home/fumanchu/webapps/b2/blogs/inc/plugins/model/_plugins.class.php on line 677

Warning: Creating default object from empty value in /home/fumanchu/webapps/b2/blogs/inc/settings/model/_abstractsettings.class.php on line 236

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/fumanchu/webapps/b2/blogs/plugins/markdown_extra/markdown.php on line 1030

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/fumanchu/webapps/b2/blogs/plugins/markdown_extra/markdown.php on line 1030

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/fumanchu/webapps/b2/blogs/plugins/markdown_extra/markdown.php on line 1053

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/fumanchu/webapps/b2/blogs/plugins/markdown_extra/markdown.php on line 721

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/fumanchu/webapps/b2/blogs/plugins/markdown_extra/markdown.php on line 721

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/fumanchu/webapps/b2/blogs/plugins/markdown_extra/markdown.php on line 721

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/fumanchu/webapps/b2/blogs/plugins/markdown_extra/markdown.php on line 1729

This is what I like about CouchDB, which I've started working with lately. REST JSon API is the only way to talk to the DB. Seems like a brilliant choice. How did you implement all of your API's? Did you use any particular framework or is it just hand built PHP?

08/22/08 @ 11:32
Comment from: fumanchu [Member] Email

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/fumanchu/webapps/b2/blogs/plugins/markdown_extra/markdown.php on line 1030

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/fumanchu/webapps/b2/blogs/plugins/markdown_extra/markdown.php on line 1030

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/fumanchu/webapps/b2/blogs/plugins/markdown_extra/markdown.php on line 1053

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/fumanchu/webapps/b2/blogs/plugins/markdown_extra/markdown.php on line 721

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/fumanchu/webapps/b2/blogs/plugins/markdown_extra/markdown.php on line 721

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/fumanchu/webapps/b2/blogs/plugins/markdown_extra/markdown.php on line 721

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/fumanchu/webapps/b2/blogs/plugins/markdown_extra/markdown.php on line 1729

It's Python, actually. We started with Twisted but had to abandon that once we did some load tests.

08/24/08 @ 18:02

Deprecated: Assigning the return value of new by reference is deprecated in /home/fumanchu/webapps/b2/blogs/skins/_item_comment_form.inc.php on line 67

Deprecated: Assigning the return value of new by reference is deprecated in /home/fumanchu/webapps/b2/blogs/skins/_item_comment_form.inc.php on line 84

Leave a comment


Your email address will not be revealed on this site.

Your URL will be displayed.

Please enter the phrase "I am a real human." in the textbox above.
(Line breaks become <br />)
(Name, email & website)
(Allow users to contact you through a message form (your email will not be revealed.)

Deprecated: Assigning the return value of new by reference is deprecated in /home/fumanchu/webapps/b2/blogs/plugins/_calendar.plugin.php on line 190

Deprecated: Assigning the return value of new by reference is deprecated in /home/fumanchu/webapps/b2/blogs/plugins/_calendar.plugin.php on line 905

Warning: Creating default object from empty value in /home/fumanchu/webapps/b2/blogs/inc/settings/model/_abstractsettings.class.php on line 334

Warning: Creating default object from empty value in /home/fumanchu/webapps/b2/blogs/inc/settings/model/_abstractsettings.class.php on line 334
October 2020
Sun Mon Tue Wed Thu Fri Sat
 << <   > >>
        1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30 31

Search

The requested Blog doesn't exist any more!

XML Feeds


Warning: Creating default object from empty value in /home/fumanchu/webapps/b2/blogs/inc/settings/model/_abstractsettings.class.php on line 223
powered by b2evolution free blog software

Warning: Creating default object from empty value in /home/fumanchu/webapps/b2/blogs/inc/settings/model/_abstractsettings.class.php on line 304

Deprecated: Non-static method Hitlist::dbprune() should not be called statically, assuming $this from incompatible context in /home/fumanchu/webapps/b2/blogs/inc/sessions/model/_hit.class.php on line 531

Warning: Creating default object from empty value in /home/fumanchu/webapps/b2/blogs/inc/settings/model/_abstractsettings.class.php on line 304