Catalyst (software)
![]() | This article has multiple issues. Please help improve it or discuss these issues on the talk page. (Learn how and when to remove these messages)
|
![]() | |
Original author(s) | Sebastian Riedel |
---|---|
Stable release | 5.90131
/ 20 July 2023[1] |
Written in | GPL |
Website | http://catalyst.perl.org/ |
Catalyst is an
Catalyst can be used by web application developers to deal with code common to all web applications. It provides an interface for receiving page requests, dispatching page requests into developer-written code to process, and return of the requests. Catalyst also 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, 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
The first development release of Catalyst took place on 28 January 2005. The first official version was published on CPAN on 16 February 2005.[5] As of June 2011, Catalyst had 201 registered contributors.[6]
Philosophy
Catalyst is based on the "don't repeat yourself" (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, 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.
Catalyst can also be used with other Ajax frameworks such as
Web server support
For development and testing, Catalyst has a built-in simple HTTP server. For production use,
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
Database support
Catalyst can run using any database supported by
Many Catalyst-based projects use
Uses
Websites powered by Catalyst include Magazines.com,[11] bbc.co.uk iPlayer backend,[12] DuckDuckGo's Community Platform, http://flexibase.io and Tripwolf.com. The MojoMojo wiki engine is written using Catalyst.[13]
YouPorn was powered by Catalyst[14] until 2012.[15]
See also
References
- Diment, Kieren. The Definitive Guide to Catalyst. Apress. ISBN 978-1-4302-2365-8. Archived from the originalon 17 September 2009. Retrieved 9 September 2009.
- ^ "CPAN Module Release". Catalyst. Retrieved 15 August 2024.
- ^ Simon Cozens (22 April 2004). "Rapid Web Application Deployment with Maypole". Perl.
- ISBN 978-1430223658.
- ^ "Maypole". CPAN.
- ^ "Catalyst Changes file". Retrieved 8 August 2018.
- Ohloh. Retrieved 6 June 2011.
- ^ "Search for "Catalyst::Plugin::" - metacpan.org". metacpan.org. Retrieved 8 August 2018.
- ^ "Catalyst::Engine::HTTP::Prefork - High-performance pre-forking Catalyst engine - metacpan.org". metacpan.org. Retrieved 8 August 2018.
- ^ "Catalyst::Model::KiokuDB - use KiokuDB in your Catalyst apps - metacpan.org". metacpan.org. Retrieved 8 August 2018.
- ^ "Catalyst::Model::Adaptor - use a plain class as a Catalyst model - metacpan.org". metacpan.org. Retrieved 8 August 2018.
- ^ ""Catalyst/DBIC/eCommerce Developer job" posting". 8 May 2011. Archived from the original on 13 May 2011. Retrieved 6 June 2011.
- ^ "BBC's iPlayer is powered by a Perl software stack (including Catalyst)".
- ISBN 978-1-4302-2365-8.
- ^ "Biggest porn site on the web YouPorn powered by Perl/Catalyst (top 50 in alexa)". reddit.
- ^ "YouPorn software stack was originally written in Perl + Mysql".
External links