MojoMojo
   HOME

TheInfoList



OR:

Catalyst is an
open source Open source is source code that is made freely available for possible modification and redistribution. Products include permission to use the source code, design documents, or content of the product. The open-source model is a decentralized so ...
web application framework A web framework (WF) or web application framework (WAF) is a software framework that is designed to support the development of web applications including web services, web resources, and web APIs. Web frameworks provide a standard way to build an ...
written in
Perl 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 offic ...
, that closely follows the
model–view–controller Model–view–controller (MVC) is a software architectural pattern commonly used for developing user interfaces that divide the related program logic into three interconnected elements. This is done to separate internal representations of info ...
(MVC) architecture, and supports a number of experimental web patterns. It is written using
Moose The moose (in North America) or elk (in Eurasia) (''Alces alces'') is a member of the New World deer subfamily and is the only species in the genus ''Alces''. It is the largest and heaviest extant species in the deer family. Most adult ma ...
, a modern object system for Perl. Its design is heavily inspired by frameworks such as
Ruby on Rails Ruby on Rails (simplified as Rails) is a server-side web application framework written in Ruby under the MIT License. Rails is a model–view–controller (MVC) framework, providing default structures for a database, a web service, and we ...
,
Maypole A maypole is a tall wooden pole erected as a part of various European folk festivals, around which a maypole dance often takes place. The festivals may occur on 1 May or Pentecost (Whitsun), although in some countries it is instead erected at ...
, and
Spring Spring(s) may refer to: Common uses * Spring (season), a season of the year * Spring (device), a mechanical device that stores energy * Spring (hydrology), a natural source of water * Spring (mathematics), a geometric surface in the shape of a h ...
. A web application developer would use Catalyst to deal with code common to all web applications: it provides interfaces to web servers and receiving page requests, dispatching these into developer-written code to process and return the requests, and provides a standardised interface for data models, authentication, session management and other common web application elements. All of these elements are implemented as plugins to a set of common interfaces, allowing the developer to change the specific method used (e.g. a session storing in shared memory versus as a database table, or using FastCGI versus operating as an within Apache's mod_perl) by changing the configuration of Catalyst to use a different plugin without altering the application code. Catalyst is primarily distributed through the
CPAN 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 ei ...
, which is the official distribution channel for Perl libraries and applications.


History

Maypole was one of the first web application frameworks for the Perl programming language that was based on the MVC pattern; its principal author was Simon Cozens. Catalyst started as a
fork In cutlery or kitchenware, a fork (from la, furca 'pitchfork') is a utensil, now usually made of metal, whose long handle terminates in a head that branches into several narrow and often slightly curved tine (structural), tines with which one ...
of Maypole, intended to become Maypole 3.0. Development ceased on Maypole, however, with its most recent release in April 2008, and Catalyst became its modern supported equivalent. The first development release of Catalyst took place on 28 January 2005. The first official version was placed in CPAN on 16 February 2005. As of June 2011, Catalyst had 201 registered contributors.


Philosophy

Catalyst is based on a "
don't repeat yourself "Don't repeat yourself" (DRY) is a principle of software development aimed at reducing repetition of software patterns, replacing it with abstractions or using data normalization to avoid redundancy. The DRY principle is stated as "Every piece of ...
" (DRY) principle, which means that definitions should only have to be made once. Catalyst can be used with automatic class loading from the database through one of the many loader modules, thus requiring no code for the database layer. But, if you require the flexibility of manually doing everything, it's also an option. Another guiding principle of Catalyst is flexibility. Catalyst promotes the re-use of existing Perl modules that already handle common web application concerns well. * The ''Model'' part is handled through '' DBIx::Class'', ''Plucene'', ''Net::LDAP'' and other model classes. * The ''View'' layer is usually handled by ''
Template Toolkit 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 ...
'', ''Mason'', or ''HTML::Template'', among others. * The ''Controller'' layer is of course written by each application author. Large chunks of Controller functionality can usually be deferred to one of the many Catalyst plugins (e.g., Catalyst::Plugin::FormValidator, Catalyst::Plugin::Prototype, Catalyst::Plugin::Account::AutoDiscovery, etc.). * Finally, Catalyst offers a set of helpers to simplify flow control and mapping URLs to controller methods. Catalyst has a large selection of plugins. For example, it has JavaScript generation for
Ajax Ajax may refer to: Greek mythology and tragedy * Ajax the Great, a Greek mythological hero, son of King Telamon and Periboea * Ajax the Lesser, a Greek mythological hero, son of Oileus, the king of Locris * ''Ajax'' (play), by the ancient Gree ...
and
RIA A ria (; gl, ría) is a coastal inlet formed by the partial submergence of an unglaciated river valley. It is a drowned river valley that remains open to the sea. Definitions Typically rias have a dendritic, treelike outline although they ca ...
s using the Catalyst::Plugin::Prototype module (
prototype A prototype is an early sample, model, or release of a product built to test a concept or process. It is a term used in a variety of contexts, including semantics, design, electronics, and software programming. A prototype is generally used to ...
is an
Ajax framework Ajax may refer to: Greek mythology and tragedy * Ajax the Great, a Greek mythological hero, son of King Telamon and Periboea * Ajax the Lesser, a Greek mythological hero, son of Oileus, the king of Locris * ''Ajax'' (play), by the ancient Greek ...
). Plugins cover many areas, for example authentication, session management, HTTP negotiation and REST. Catalyst can also be used with other Ajax frameworks such as
jQuery jQuery is a JavaScript library designed to simplify HTML DOM tree traversal and manipulation, as well as event handling, CSS animation, and Ajax. It is free, open-source software using the permissive MIT License. As of Aug 2022, jQuery is u ...
or
YUI Yui may refer to: People * Yui (name), a Japanese name *Yui (singer) (born 1987), Japanese singer-songwriter, multi-instrumentalist, and actress * Yui people or Ibi, a Timucuan-speaking people in what now is Georgia, United States Places * Yui, Sh ...
, the
Yahoo! Yahoo! (, styled yahoo''!'' in its logo) is an American web services provider. It is headquartered in Sunnyvale, California and operated by the namesake company Yahoo Inc., which is 90% owned by investment funds managed by Apollo Global Mana ...
User Interface Library.


Web server support

For development and testing, Catalyst has a built-in simple HTTP server. For production use,
Apache The Apache () are a group of culturally related Native American tribes in the Southwestern United States, which include the Chiricahua, Jicarilla, Lipan, Mescalero, Mimbreño, Ndendahe (Bedonkohe or Mogollon and Nednhi or Carrizaleño a ...
,
lighttpd lighttpd (pronounced "lighty") is an open-source web server optimized for speed-critical environments while remaining standards-compliant, secure and flexible. It was originally written by Jan Kneschke as a proof-of-concept of the c10k problem ...
,
Hiawatha Hiawatha ( , also : ), also known as Ayenwathaaa or Aiionwatha, was a precolonial Native American leader and co-founder of the Iroquois Confederacy. He was a leader of the Onondaga people, the Mohawk people, or both. According to some account ...
,
Cherokee The Cherokee (; chr, ᎠᏂᏴᏫᏯᎢ, translit=Aniyvwiyaʔi or Anigiduwagi, or chr, ᏣᎳᎩ, links=no, translit=Tsalagi) are one of the indigenous peoples of the Southeastern Woodlands of the United States. Prior to the 18th century, th ...
or
Nginx Nginx (pronounced "engine x" ) is a web server that can also be used as a reverse proxy, load balancer, mail proxy and HTTP cache. The software was created by Igor Sysoev and publicly released in 2004. Nginx is free and open-source softw ...
with
FastCGI FastCGI is a binary protocol for interfacing interactive programs with a web server. It is a variation on the earlier Common Gateway Interface (CGI). FastCGI's main aim is to reduce the overhead related to interfacing between web server and CGI ...
or
mod_perl Mod, MOD or mods may refer to: Places * Modesto City–County Airport, Stanislaus County, California, US Arts, entertainment, and media Music * Mods (band), a Norwegian rock band * M.O.D. (Method of Destruction), a band from New York City, US ...
support is recommended, but any web server with CGI or FastCGI support will work. On Apache, mod_perl can help with performance considerably, though its use might be an issue because it can be unsafe to share multiple applications under mod_perl. Since early 2008, Catalyst applications can also be deployed using the HTTP::Prefork engine which provides for the deployment of high performance Catalyst applications without a separate web server. Starting with the release of Catalyst 5.9, Catalyst also outputs to the
PSGI 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 we ...
spec thus it can be run on any Plack server and along with any server or protocol that supports the PSGI spec, including Mongrel2.


Database support

Catalyst can run using any database supported by Perl's DBI (this means almost anything, even a CSV file), but a proper
RDBMS A relational database is a (most commonly digital) database based on the relational model of data, as proposed by E. F. Codd in 1970. A system used to maintain relational databases is a relational database management system (RDBMS). Many relatio ...
or ODBMS is recommended. The database access is entirely abstracted from the programmer's point of view and Catalyst, through one of its model classes, handles access to all databases automatically – though, if needed, using direct SQL queries is possible. This enables database-neutrality, application portability over different database systems, and usability of pre-existing databases for Catalyst application development as much as possible, though due to different feature sets of the RDBMSes, it is not completely guaranteed by the framework alone. Several different RDBMS systems are supported, including
MySQL MySQL () is an open-source relational database management system (RDBMS). Its name is a combination of "My", the name of co-founder Michael Widenius's daughter My, and "SQL", the acronym for Structured Query Language. A relational database ...
,
PostgreSQL PostgreSQL (, ), also known as Postgres, is a free and open-source relational database management system (RDBMS) emphasizing extensibility and SQL compliance. It was originally named POSTGRES, referring to its origins as a successor to the ...
,
SQLite SQLite (, ) is a database engine written in the C programming language. It is not a standalone app; rather, it is a library that software developers embed in their apps. As such, it belongs to the family of embedded databases. It is the mo ...
,
IBM Db2 Db2 is a family of data management products, including database servers, developed by IBM. It initially supported the relational model, but was extended to support object–relational features and non-relational structures like JSON a ...
,
Oracle An oracle is a person or agency considered to provide wise and insightful counsel or prophetic predictions, most notably including precognition of the future, inspired by deities. As such, it is a form of divination. Description The word ...
and
Microsoft SQL Server Microsoft SQL Server is a relational database management system developed by Microsoft. As a database server, it is a software product with the primary function of storing and retrieving data as requested by other software applications—which ...
. For ODBMSes, there is explicit support for KiokuDB via Catalyst::Model::KiokuDB. The
Model A model is an informative representation of an object, person or system. The term originally denoted the plans of a building in late 16th-century English, and derived via French and Italian ultimately from Latin ''modulus'', a measure. Models c ...
abstraction allows databases of any nature to be accessed via Catalyst::Model::Adaptor. Many Catalyst-based projects use DBIx::Class as the ORM layer, which provides further abstraction of SQL queries, using a resultset-based API with transparent support for arbitrary joins and other features.


Uses

Websites powered by Catalyst include Magazines.com, bbc.co.uk iPlayer backend, DuckDuckGo's Community Platform, http://flexibase.io and Tripwolf.com. The MojoMojo
wiki engine Wiki software (also known as a wiki engine or a wiki application), is collaborative software that runs a wiki, which allows the users to create and collaboratively edit pages or entries via a web browser. A wiki system is usually a web application ...
is written using Catalyst.
YouPorn YouPorn is a free pornographic video sharing website and one of the 100 most accessed websites in the world. Since launching in August 2006, it grew to become one of the most popular pornographic website on the internet, and, in November 200 ...
was powered by Catalyst until 2012.


See also

*
Comparison of web frameworks Two comparisons of web frameworks are available: * Comparison of JavaScript-based web frameworks (front-end) * Comparison of server-side web frameworks This is a comparison of notable web frameworks, software used to build and deploy web applic ...


References

*


External links


Archive of official Website

Catalyst Wiki

Catalyst on CPAN
{{DEFAULTSORT:Catalyst (Software) Free software programmed in Perl Perl software Web frameworks