Dancer (software)
Encyclopedia
Dancer is an open source
Open source
The term open source describes practices in production and development that promote access to the end product's source materials. Some consider open source a philosophy, others consider it a pragmatic methodology...

 micro web application framework
Web application framework
A web application framework is a software framework that is designed to support the development of dynamic websites, web applications and web services. The framework aims to alleviate the overhead associated with common activities performed in Web development...


written in Perl
Perl
Perl is a high-level, general-purpose, interpreted, dynamic programming language. Perl was originally developed by Larry Wall in 1987 as a general-purpose Unix scripting language to make report processing easier. Since then, it has undergone many changes and revisions and become widely popular...

 inspired by Ruby's
Ruby (programming language)
Ruby is a dynamic, reflective, general-purpose object-oriented programming language that combines syntax inspired by Perl with Smalltalk-like features. Ruby originated in Japan during the mid-1990s and was first developed and designed by Yukihiro "Matz" Matsumoto...

 Sinatra
Sinatra (software)
Sinatra is a free and open source web application library and domain-specific language written in Ruby. It is an alternative to other Ruby web application frameworks such as Ruby on Rails, Merb, Nitro, Camping, and Rango. It is dependent on the Rack web server interface.Designed and developed by...

.

Dancer is developed through GitHub
Github
GitHub is a web-based hosting service for software development projects that use the Git revision control system. GitHub offers both commercial plans and free accounts for open source projects...

 and stable releases are available via CPAN
CPAN
CPAN, the Comprehensive Perl Archive Network, is an archive of nearly 100,000 modules of software written in Perl, as well as documentation for it. It has a presence on the World Wide Web at and is mirrored worldwide at more than 200 locations...

.

Example

  1. !/usr/bin/perl

use Dancer;

get '/hello/:name' => sub {
return "Why, hello there " . params->{name};
};

dance;

Out-of-box

Unlike other frameworks, Dancer only requires 5 CPAN modules
and is very self contained. As a result you can rapidly develop
without being mired in configuration.

Standalone Development Server

Dancer includes a standalone development server that can be used
for developing and testing software.

PSGI / Plack support

Dancer outputs to the PSGI
PSGI
PSGI or Perl Web Server Gateway Interface is an interface between Web servers and Perl-based Web applications and frameworks that allows writing portable applications that can be run as standalone servers or using CGI, FastCGI, mod_perl, et al...

 spec thus it can be run on any
Plack server
Plack (software)
Plack is a set of tools for running Perl-based Web applications and frameworks compatible with the PSGI specification.Plack was inspired by Rack for Ruby and Paste for Python.Plackup is a command-line tool for running the PSGI applications,...

and along with any server or
protocol that supports the PSGI spec:

Abstracted

Since most parts of Dancer are abstracted, one can easily download or
build extensions simply by extending a base class and writing your
custom code.

The object system is also very lightweight allowing fast responses
especially in CGI environments.

External links

The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK