Wednesday, August 6th, 2008

Code on Demand: How JavaScript is RESTful

Category: JavaScript

In the code-on-demand style, a client component has access to a set of resources, but not the know-how on how to process them. It sends a request to a remote server for the code representing that know-how, receives that code, and executes it locally.

The above quote comes from the infamous thesis by Roy Fielding which kicked off REST.

Joe Gregorio reminded us of this quote to remember that JavaScript fits in nicely with REST and the cloud:

The word ‘code’ here means JavaScript. Well, at the time it was written all the examples given were Java applets, but the idea is the same, that code is downloaded and executed. The takeaway here is that JavaScript is a fully fledged RESTful part of the web, and those JavaScript APIs, just like the hyptertext I pointed out yesterday, are RESTful points of integration of Cloud Computing.

It’s almost as if the web were designed for this stuff.

Posted by Dion Almaer at 11:11 am

3.6 rating from 16 votes


Comments feed TrackBack URI

That’s cool, but it is safe?
Transmitting the code inside a JSON object can prevent some xss attacks, but i don’t know how safe it can be.
I’m not trying to spread FUD, i really don’t know.

Comment by PedroBatista — August 6, 2008, really.. that’s exactly it..

Comment by Mikael Bergkvist — August 7, 2008

Leave a comment

You must be logged in to post a comment.