@hackage RESTng0.1

A framework for writing RESTful applications.

RESTng: A framework for writing RESTful applications

It is experimental, incomplete and we are currently not actively developing it. Anyway, there are several interesting features so we have decided to release them to share the ideas.

Features include:

Yahoo Grids: The presentation uses the yuiGrid (grids defined by layout hints rendered with the yahoo grids).

Annotations: A resource can be annotated so that related information can be shown. The presentation of a resource to html is done by multiple annotations, each one possibly in different boxes with different layout hints.

Associations: Resource collections "has many" associations can be defined allowing:

  • Lookup functions in the Model for associated resources

  • Some annotations are available to be used like childComponent or parentComponent to list children resources or show the parent in separate boxes.

  • Hierarchical URLs are automatically handled in the control part. i.e.: GET http://site/book/3/chapter/1 (get the chapter 1 of book with id 3) GET http://site/book/3/chapter/new (get a form for filling data for the new chapter for book with id 3) POST http://site/book/3/chapter/new (create a new chapter for the book with id 3) and so on for updates, list and delete actions

  • Polymorphic associations are supported (i.e.: comment associated to books and also associated to authors).

ORM: The ORM generates tables in the DB from the Haskell record type. Existing tables and attributes are kept and missing attributes are added.

Other features supported:

  • Tags
  • Ratings
  • Comments
  • Users and login
  • CMS-like form fields validations.

Please send comments or questions to: