Session

RESTful Modeling and Active Record

F. Morgan Whitney, Senior Web Developer/Designer, Vonage

Date: Saturday, May 19
Time: 4:25pm - 5:15pm
Location: Oregon Ballroom 202

Vonage uncovered many challenges when attempting to apply the REST architecture to the Ruby on Rails framework. The solutions to these pitfalls were applied across a wide range of application domains and were generic enough to be applied extensively throughout the infrastructure, enabling Vonage to build a RESTful architecture against existing data models. In this presentation, we discuss the challenges we faced, the solutions we found, and the feedback we have received from the development community.

Topics include:

Using Models as a Cache – instead of state savers, models are used to cache back end data or used to save the current viewed state of the front end. Here we describe the search for the balance between creating a robust back end containing many custom services, and a sophisticated front end model that engages in active dialog with the back end.

Reusing code – we explore the possibilities of reusing components of Active Record code to create a robust RESTful front end model.

Error handling – in the RESTful models we develop, we examine the ways in which HTTP errors are handled without breaking web application flow, and how state changes are handled when errors do occur.

Rails Guidelines – we discuss our experience with implementing a RESTful model while still adhering to the guidelines of the Rails framework.

Processing Transactions – this discussion describes the balance we seek between simple transactions that run frequently, and large complicated transactions that run infrequently. We explore how our decisions in this context impact performance, code simplicity, and clarity.

Conference News and Coverage