/roar

Resource-oriented architectures in Ruby.

Primary LanguageRuby

ROAR

Streamlines the development of RESTful, resource-oriented architectures in Ruby.

Introduction

Note: This is a WIP, don’t blame us if the API changes ;-)

ROAR is an attempt to provide a useful framework for developing ROAs in Ruby. It bundles all the great tools we have and defines generic, simple interfaces to have real RESTful behaviour. Most applications simply expose CRUD operations via HTTP, whereas ROAR encourages you to use the power of different resource representations, content negotiation, HATEOAS and more.

THE CENTRAL ASPECT is the resource. most trickiest: representation

Dependencies

Currently it relies on the following gems:

  • ActiveModel
  • Restfulie

Representation

Representer holds the mapping instructions for conversion from and to a representation (e.g. XML). This used to be split into controller and model. Now you can unit test your representations.

Representations are implemented as mixins and can be used both on client and server.

Representer should suit your representation and not try to make your representation suit the underlying representing layer.

Client/Server
client: accessing nested attributes in complex xml hashes sucks. order[:position]1[:article]
don’t confuse client/server with view/controller

Hypermedia and HATEOAS