Archive for December, 2012

Definition: What is a RESTful web service?

Saturday, December 15th, 2012

Ran across this explanation lately of what a RESTful web service is, think it’s the clearest one I’ve read in a long while:

Take the primary HTTP protocol request methods:

  • POST: submit forms, new data
  • GET: request a view
  • PUT: modify a resource
  • DELETE: delete a resource

and line them up to the usual database operations…CRUD (if need reminding just continue…)
and voila you’ve got a ‘RESTful web service’

  • POST/Create: Create a resource
  • GET/Read: Request a specific resource
  • PUT/Update: Edit a resource
  • DELETE/Delete: Delete a resource

Simple Javascript var_dump equivalent object interate print

Friday, December 7th, 2012

var out = ”;
for (var i in params) {
out += i + “: ” + params[i] + “\n”;