Dancer 1.150 released

I’m happy to announce the release of Dancer 1.150.

This release has been made possible by six people, so it’s quite the first community-driven release of Dancer, and nothing could make me more happy than that.

I really like the fact that different people, from different places come and contribute ideas, documentation and patches. This is how open source works, and this is how great tools are written. I’m glad to see Dancer taking that path. I can only hope that it will be like that for a long time.

This new version provides mostly bugfixes and documentation updates. See the changelog for full details. Oh, and thanks to David Precious, we now have a shiny Cookbook!

Major new features will come with 1.160, but that’s for another blog entry ;)

Enjoy your dances.

Dancer’s development update, near to release 1.140

Lots of good things happened recently in Dancer’s development, here they are:

HTTP::Server::Simple::PSGI

After my last post about Dancer, Tatsuiko Miyagawa suggested to build Dancer’s standalone server upon a PSGI-aware layer, rather than on HTTP::Server::Simple::CGI.

A couple of days later, he released HTTP::Server::Simple::PSGI, which is actually based HTTP::Server::Simple (which itself doesn’t depend on any non-core modules).

A few patches later, the standalone server was refactored and running on this new guy. That means when writing a Dancer app, you can now always rely on PSGI environment goodness, whereas you’re using the standalone server, or the Plack architecture. That just rocks, again kudos to @miyagawa.

Dancer::Request

The Dancer::Request class got also heavily refactored and enhanced, it can now provide the user with an access to the raw body of the incoming request (thanks to RasterBurn for the report).

By the way, this class needs still so more features, and I’m actively working on it. I may release Dancer 1.2 when I’m happy with that one.

Oh and it also now provides a complete documentation. POD FTW.

Dancer::Route

I also gave a shot at Dancer::Route, which has been recently patched to support some new features (prefix and conditional matching, thanks to Frank Cuny)

No more CGI.pm, really!

I also found that CGI.pm was still used in one very place for rendering and HTML page. This was a shame as we wanted Dancer to be 100% CGI.pm-free. Hence the patch that actually allow us to say it now, for REAL ;)

All of this freash meat is available on my GitHub repo and will be soon released to CPAN, under version 1.140. Stay tuned!

Dive into Dancer’s code: core and extensions

The discussion that is rising these days about frameworks and libraries reminds me I did not even take the time to talk about the last version of Dancer.
I should have, hence this post.

Last version of Dancer, 1.130, is the first version which is “plugin-aware”.
That means since 1.130 anyone can write their own template, logger or session engine and rock the app by just setting the appropriate value to the corresponding setting.

The plugins that existed before the split have been extracted from the core distribution in order to be shipped separately, that’s much clean and makes more sense that way:

If you have a template, logger or session engine you’d like to see in Dancer’s ecosystem, I invite you to take a look at the corresponding interfaces you have to implement, it’s pretty straight forward.

The concept is pretty easy, basically, here are the steps to follow to add a new engine:

  • choose a setting name that is available for template, session or logger, according to what you’re doing.
  • implement the interface of the engine you like (Dancer::Template::Abstract, Dancer::Session::Abstract, Dancer::Logger::Abstract)
  • Name your class with a camelized version of the setting name

Here is an example, let’s say you have a great template engine you’d love to use for rendering your views in your Dancer app, let’s name it “HTML::IronMark”.

  • First of all, create Dancer::Template::Ironmark which implements the interface Dancer::Template::Abstract
  • Then change the setting template to "ironmark"

And well, you’re done. This is pretty much the same job for logger and session engines.

Feel free to contact me if you want to write your own and need more precisions.

Get Adobe Flash playerPlugin by wpburn.com wordpress themes