[Haskell-cafe] ANN: RESTng 0.1 + RedHandlers 0.1 (request handlers)
+ YuiGrids 0.1 (yahoo grids)
Sergio Urinovsky
sergio.urinovsky at gmail.com
Fri May 15 16:14:42 EDT 2009
I'd like to announce the release of 3 new packages in hackage developed for
a RESTful web framework called RESTng.
They are experimental, the framework is incomplete and we are currently not
actively developing it.
There are several interesting features so we have decided to release them to
share the ideas.
*RESTng:* A framework for writing RESTful applications. Features that may be
of interest are:
* Resource presentation with annotations (implemented with Grids):
Resources are annotated with related data and all ends in boxes using grids.
i.e., an annotation for a book resource could be its author (the author
resource), and also their comments, so the book, the author and their
comments are shown in boxes. Annotations can have arbitrary data, but there
are some generic ones already available.
* Hierarchical URLs are automatically handled. i.e.: Can easily define that
a book resource "has many" chapters, then these actions are defined:
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
* ORM generates tables from haskell records (currently only PostgreSQL is
supported in the ORM).
* Associations "has many" defined for models. Making available functions to
query for the parent and children so you don't have to make the SQL query.
* Associations can be polymorphic so a comment can be associated to
different resources types. A record for a comment on a book, another for a
comment on a post.
* Tags, Ratings, Comments, Users and login and CMS-like form fields
validations supported.
*YuiGrids:*
* Containers and boxes with layout hints are specified. i.e:
- Box A: in left side bar, near the bottom, with this content ....
- Container B: in the main part of the page, near the top, with 3
columns and these let's say 14 boxes inside ... (including Box C)
- Box C: in the left column of three, with this other content ...
* Tries to satisfy the layout hints. Not allways possible, i.e: if every
box has layout hint to go near the bottom, some of them will go at the top.
* Boxes can have CSS specifications.
* All is rendered into Yahoo grids (http://developer.yahoo.com/yui/grids).
Currently, the YuiGrids uses own contextual html combinators are also
implemented in this package (called CxML here) instead of Text.XHtml for
keeping track of html parts like inline CSSs to be rendered at the head.
This can be improved to use the standard Text.XHtml library.
*RedHandlers:* It is another HTTP request handlers library to build
standalone web apps.
* They deal with request data as usual.
* There are also combinators for mapping part of the URL to public folders
in the file system.
* And one for sending files efficiently in the response (a fork of the HTTP
library was necessary for this, included here).
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20090515/4e062cc9/attachment.html
More information about the Haskell-Cafe
mailing list