CoffeeScript, Facebook, and Futon

By Jason on Jul 11, 2011


Starting today, all Iris Couch accounts have several new features.

CoffeeScript

We support CoffeeScript.

Our founding mantra is “orthodox CouchDB”; however, I’ve bent the rules, backporting from Apache CouchDB trunk, keeping parity with Couchbase Single Server.

Here is a simple CoffeeScript design document, formatted for clarity.

{ "_id"     : "_design/coffee_app"
, "language": "coffeescript"
, "shows"   : { "hello_world": "(doc) -> 'Hello, #{doc._id}!'" }
, "filters" : { "has_foo"    : "(doc) -> doc.foo"              }
, "views":
  { "foo": { "map"   : "(doc) ->
                          if doc.foo
                            emit(doc.foo, 1)"

           , "reduce": "(keys, values, rereduce) ->
                          sum = 0
                          for x in values
                            sum = sum + x
                          sum"
           }
  }
}

Mobile Futon

  1. Get out your iPhone or Android.
  2. Go to Futon: https://example.iriscouch.com/_utils/
  3. Nice, isn’t it? That is Dale Harvey’s Mobile Futon.

You can disable Mobile Futon by clicking the Configuration link in Futon. Under httpd, set mobile_futon to false.

Sammy Futon

We heard the rumors too: an elusive “alternative Futon.” It has neither name nor master. Some say it evolved from proper Futon. Others say “devolved” would be more accurate.

In any case, we’ve captured a live specimen, installed it alongside its cousin, and named it Sammy Futon to sound adorable.

You can enable Sammy Futon by clicking the Configuration link in Futon. Under httpd, set sammy_futon to true.

Facebook Authentication

Iris Couch now supports Ocasta Labs’s excellent Facebook Authentication module. Your users can log in to your application using their Facebook account.

This is not quite turn-key. (What can I say? It’s Facebook.) To use CouchDB Facebook authentication, visit the Configuration link in Futon, and input your information in the [fb] section. See Martin’s documention, under Configuration.

Feedback

If you have feedback or issues, please let us know at the Iris Couch Get Satisfaction forum, or email us@iriscouch.com.

Thanks

Other people wrote this code; we simply take the credit. We are grateful to the following people for their inspiring CouchDB projects.

  • Jan Lehnardt at Couchbase, for implementing CoffeeScript support
  • Martin Higham at Ocasta Labs, and Sander Dijkhuis for Facebook authentication; and Ed Moore at Ocasta Labs for helping me understand it all
  • Dale Harvey at Couchbase, for Mobile Futon
  • Benjamin Young, Dale Harvey (both at Couchbase), Sam Bisbee, and Mikeal Rogers (now at Yammer) for Sammy Futon