Dancer (software)

Last updated
Dancer
Original author(s) Alexis Sukrieh
Initial releaseJuly 27, 2009 (2009-07-27)
Stable release
0.301004 [1] / 2021-06-06 [±]
Repository Dancer Repository
Written in Perl
Operating system Cross-platform
Type Web application framework
License GPL and PAL
Website www.perldancer.org

Dancer is an open source lightweight web application framework written in Perl and inspired by Ruby's Sinatra.

Contents

In April 2011, Dancer was rewritten from scratch and released as Dancer2. The reason for the rewrite was to fix architectural issues and eliminate the use of singletons. [2] Development of Dancer1 was at first frozen, but was later continued to maintain backward compatibility for existing apps. [3]

Dancer is developed through GitHub, with stable releases available via CPAN. Dancer2 is released as a separate module.

Example

#!/usr/bin/env perluseDancer2;get'/hello/:name'=>sub{return"Why, hello there ".route_parameters->get('name');};get'/redirectMeTo/:trgval'=>sub{redirect'/'.route_parameters->get('trgval');};start;


Features

Out-of-box

Unlike other frameworks such as Catalyst, Dancer only requires a handful of CPAN modules and is very self-contained.

Standalone development server

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

PSGI / Plack support

Dancer supports the PSGI specification, and can thus be run on any compliant PSGI server, including Plack, uWSGI or Mongrel 2.

Abstracted

Since most parts of Dancer are abstracted and has a plugin architecture, extending Dancer is fairly straightforward, and a thriving community has sprung up around building these extensions.

Dancer features a lightweight object system, exception throwing similar to Try::Tiny, and is fast, especially in CGI environments.

See also

Related Research Articles

The Comprehensive Perl Archive Network (CPAN) is a repository of over 250,000 software modules and accompanying documentation for 39,000 distributions, written in the Perl programming language by over 12,000 contributors. CPAN can denote either the archive network or the Perl program that acts as an interface to the network and as an automated software installer. Most software on CPAN is free and open source software.

Perl Interpreted programming language first released in 1987

Perl is a family of two high-level, general-purpose, interpreted, dynamic programming languages. "Perl" refers to Perl 5, but from 2000 to 2019 it also referred to its redesigned "sister language", Perl 6, before the latter's name was officially changed to Raku in October 2019.

Visual Basic .NET Object-oriented computer programming language

Visual Basic, originally called Visual Basic .NET (VB.NET), is a multi-paradigm, object-oriented programming language, implemented on .NET, Mono, and the .NET Framework. Microsoft launched VB.NET in 2002 as the successor to its original Visual Basic language, the last version of which was Visual Basic 6.0. Although the ".NET" portion of the name was dropped in 2005, this article uses "Visual Basic [.NET]" to refer to all Visual Basic languages released since 2002, in order to distinguish between them and the classic Visual Basic. Along with C# and F#, it is one of the three main languages targeting the .NET ecosystem. As of March 11, 2020, Microsoft announced that evolution of the VB.NET language has concluded.

A Perl module is a discrete component of software for the Perl programming language. Technically, it is a particular set of conventions for using Perl's package mechanism that has become universally adopted.

WebGUI Open-source content management system

WebGUI is an open-source content management system written in Perl and released under the GNU General Public License.

The Web Server Gateway Interface is a simple calling convention for web servers to forward requests to web applications or frameworks written in the Python programming language. The current version of WSGI, version 1.0.1, is specified in Python Enhancement Proposal (PEP) 3333.

Apache Tapestry

Apache Tapestry is an open-source component-oriented Java web application framework conceptually similar to JavaServer Faces and Apache Wicket. Tapestry was created by Howard Lewis Ship, and was adopted by the Apache Software Foundation as a top-level project in 2006.

The Perl Object Environment or POE is a library of Perl modules written in the Perl programming language by Rocco Caputo et al.

Catalyst (software)

Catalyst is an open source web application framework written in Perl, that closely follows the model–view–controller (MVC) architecture, and supports a number of experimental web patterns. It is written using Moose, a modern object system for Perl. Its design is heavily inspired by such frameworks as Ruby on Rails, Maypole, and Spring.

Laminas Project is an open source, object-oriented web application framework implemented in PHP 7 and licensed under the New BSD License. The framework is basically a collection of professional PHP-based packages. The framework uses various packages by the use of Composer as part of its package dependency managers; some of them are PHPUnit for testing all packages, Travis CI for continuous Integration Services. Laminas provides to users a support of the model–view–controller (MVC) in combination with Front Controller solution. MVC implementation in Laminas has five main areas. The router and dispatcher functions to decide which controller to run based on data from URL, and controller functions in combination with the model and view to develop and create the final web page.

The Template Toolkit (TT) is a template engine used primarily for building web sites, but is also suitable for creating any type of digital document, such as a PDF or LaTeX file. Template Toolkit is based on a mini-language and does not allow direct Perl in its templates by default, unlike some competing products. This forces developers to separate business logic into Perl libraries, leaving only presentation logic in their templates. It is written in Perl, with some popular accessories in C. It is released under a free software licence.

HTML::Mason, or Mason for short, is a web application framework written in Perl. It is distributed on CPAN.

Rack (web server interface) API specification for web applications in programming language Ruby

Rack is a modular interface between web servers and web applications developed in the Ruby programming language. With Rack, application programming interfaces (APIs) for web frameworks and middleware are wrapped into a single method call handling HTTP requests and responses.

Padre (software) Perl software development platform

Padre is a multi-language software development platform comprising an IDE and a plug-in system to extend it. It is written primarily in Perl and is used to develop applications in this language.

Plack (software)

Plack is a Perl web application programming framework inspired by Rack for Ruby and WSGI for Python, and it is the project behind the PSGI specification used by other frameworks such as Catalyst and Dancer. Plack allows for testing of Perl web applications without a live web server.

Mojolicious is a real-time web application framework, written by Sebastian Riedel, creator of the web application framework Catalyst. Licensed as free software under the Artistic License v 2.0, it is written in the Perl programming language, and is designed for use in both simple and complex web applications, based on Riedel's previous experience developing Catalyst. Documentation for the framework was partly funded by a grant from The Perl Foundation.

The following outline is provided as an overview of and topical guide to the Perl programming language:

NIWA Cloud Application Platform

NIWA Cloud Application Platform is a platform as a service (PaaS) cloud computing platform for developing and hosting web application.

FCL-Web is part of Free Pascal's Free Component Library (FCL), focusing on web (related) application development. The package helps users to develop CGI, FastCGI and embedded web server applications, as well as Apache modules. It provides units implementing HTTP(S) protocol and a somewhat low level web application framework, in the form of web modules. Some content producers are also provided. Other prominent use is to send/retrieve data from/to web services.

Bottle (web framework)

Bottle is a WSGI micro web-framework for the Python programming language. It is designed to be fast, simple and lightweight, and is distributed as a single file module with no dependencies other than the Python Standard Library. The same module runs with Python 2.7 and 3.x.

References

  1. "Dancer2 Releases". perldancer.org. Retrieved 2021-06-19.
  2. "All About Dancer - In Conversation With Sawyer X Part 2".
  3. "Dancer 1 and Dancer 2, what we're going to do". Archived from the original on 2015-01-20. Retrieved 2015-01-20.