Tuesday, October 6, 2009

WebCandy RESTs on WebMachine.

The previous post was about merge of the StickyNotes app with WebMachine. The release 0.1 was deployed on BitBucket

That was the "don't touch anything" approach. The solution was elegant, but the data flow mechanisms were all hidden by the POST.

  • In the release 0.2 the create, update, delete, read operations were made explicit through the HTTP POST, PUT, DELETE and GET which potentially allows the web server to cache the data and reduce the load.
  • The home page allows you to check / turn on / turn off / view the WebMachine TRACE without any extra coding. All functionality is already supplied in the admin resource.
  • The JQuery was extended for PUT and DELETE in the application.js - some say that the next JQuery release will have it all. Anyway, it was pretty straitforward copy/paste.
  • The notes.erl was slightly edited for the read method to put the data structure inline with the other access methods.

The release 0.2 code with pre-compiled binaries is platform-independent and ready to run. You have to install Erlang/OTP first.
After downloading and unpacking the zip, use the start.sh (or start.cmd on Windows) and point your browser to

No comments: