Dancer

| 2 Comments | No TrackBacks

Dancer is a minimal web-framework for Perl world, which is entirely inspired by Sinatra in the Ruby land.

It is really simple to start coding in Dancer:

use Dancer;

get "/" => sub {
    "Hello World"
};

get "/hello/:name" => sub {
    "Hello, " . params->{name}
};

Path-based dispatching rules are declared with get/post/put/delete keywords, mapping to a given action sub-routine, from which, whatever returned is the response of the request.

The recommended template system to work with Dancer is Template Toolkit, the state of the art. I supposed it should be able to switch among several template engines, but it is not done yet.

I tried to write a toy app with Sinatra + DataMapper a few weeks ago and it went great. This week I tried Dancer + KiokuDB, and that was a little bumpy road, honestly said. Hmm, it looks like there are plenty of room to improve in the Perl wonderland.

I appreciate people taking time doing the Dancer project. Such minimalistic web framework can blow people’s mind.

No TrackBacks

TrackBack URL: http://pub.gugod.org/mt/mt-tb.cgi/293

2 Comments

Hey, it'd be interesting to know the issues you faced when connecting KiokuDB and Dancer, so that we can nail them down.

Great post!

Some time ago, I wrote a really simple wiki thing using KiokuDB + Dancer, more as a proof of concept/toy-thing though.

http://github.com/oz/tiny_wiki

Hope this helps. :)

Leave a comment

About this Entry

This page contains a single entry by gugod published on December 24, 2009 12:57 AM.

試用 Mac Bumptop was the previous entry in this blog.

在 git 的 pre-commit hook 裡面檢查 console.log is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.

Pages

Powered by Movable Type 4.35-en