in reply to Re: Perl, Android web app, AJAX, JSON
in thread Perl, Android web app, AJAX, JSON

Personally, I find the approach of thinking of communication as RPC problematic. I think it can lead to APIs that set up data piecemeal instead of atomic calls that update an entry.

For example, your CMS might have methods like ->set_title and ->set_body for an item. I think it would be quite bad to expose these procedures to the outside world. The API should be /item/create and /item/update, both of which supply the complete information to create or update the item. That way, you prevent confusion if only one of the calls succeeds and the other fails.