This post originated from an RSS feed registered with Ruby Buzz
by David Naseby.
Original Post: A Quick Look at Cerise
Feed Title: naseby + ruby + stuff
Feed URL: http://homepages.ihug.com.au/~naseby/rss.xml
Feed Description: Random wanderings through Ruby.
Jason Wong asked me to have a look at Cerise, to continue my surveyance of the Ruby Web App Framework landscape. And obligingly, I will, because with my current rate of posting, I really can’t afford to lose a reader.
Cerise appears to implement its own web server. I say appears to because I can’t find any info on how to actually start the thing. The documentation on the site appears reasonable, but its focussed on the internals rather than the simple things. So here’s the simple thing: after downloading and unpacking Cerise, create a folder called “log”, and run server.rb. Anything in the apps directory will be set up as a separate application, each of which needs its own app.cfg file (the format is documented).
Superficially, Cerise appears ideal to me: Amrita-based templating, Ruby-based server (meaning no need to fuss with Apache). The web-app framework clincher for me is form-handling – if I need to delve into a hash (or similar) to connect controls to data, its all over. Ruby web-app frameworks are things I spend my spare time on, and they must be as elegant as possible to be worth it. Borges is the most elegant, but sadly, the least practical at present (performance). My current fixation, Iowa is a step backwards from Borges, but pragmatic in its compromises. Its pleasant to work in, and the form binding nice. So how does Cerise compare?
Peeking at the examples, it appears to be comparable to Iowa, if not a touch better, with its form handling. Cerise has a validation layer which might be quite handy, allowing typing of inputs, optional declaration, and regex-based rules. Form fields bind to attributes – I wonder if they can bind to attributes on attributes (e.g., instead of binding to @customer_name, bind to @customer.name), some way?
It has some extra added bonuses, like SOAP servlets built in, as well. The template inclusion syntax is handy, avoiding problems I have with repitition of HTML.
Cerise is worthy of an extra dig. Thanks for the tip, Jason…