1. Nov 16th, 2010

    I love how fast it is: OAuth 2.0 with Sammy.js, Sinatra and MongoDB

    I just wanted to capture how sleek and responsive the UI is:

    The secret sauce: the entire console is a single-page client-side JavaScript app, using Sammy.js, so all the interactions and rendering are happening on the client side. It helps that Safari is damn fast.

    The client-side code gets data from the back-end, itself a lightweight Sinatra app. All the responses are JSON, much less data to generate and transmit, compared to say HTML partials or XML nonsense.

    Authentication is done using OAuth 2.0, more specifically the HTTP Authorization header, added to all jQuery requests using Sammy.OAuth2. No cookies harmed in the making of this video.

    Using MongoDB to store and fetch the data just adds to the speediness of the queries.

    Charts rendered by Protovis, which is also quite the speed daemon.

    1. Nov 17th, 2010

      Kris

      Hi Assaf, this looks really slick! I came across your OAuth2 server the other day and really want to check it out. I was wondering if you’ve tried doing any automated integration testing with this type of stack?

      I’ve been wrestling with this as the client side AJAX interactions become more and more integral to my current project. I’ve decided to throw out Cucumber as the added overhead/abstraction just doesn’t seem worth it. The plan is to try and just use capybara/envjs with straight test unit, but I’m always interested in hearing how others are doing it.

      Thanks,

      Kris

    2. Nov 17th, 2010

      Assaf

      Kris, that’s next on my todo list. I’ll post more soon.

    Your comment, here ⇓