请输入您要查询的百科知识:

 

词条 Catalyst (software)
释义

  1. History

  2. Philosophy

  3. Web server support

  4. Database support

  5. Uses

  6. See also

  7. References

  8. External links

{{for|the graphic driver software|AMD Catalyst}}{{multiple issues|{{lead rewrite|date=December 2012}}{{self-published|date=December 2012}}{{tone|date=December 2012}}{{unreliable sources|date=December 2012}}
}}{{Infobox software
| name = Catalyst
| logo = Catalyst logo3.png
| screenshot =
| caption =
| collapsible =
| author = Sebastian Riedel
| developer =
| released =
| latest release version = 5.90124
| latest release date = {{Start date and age|2019|01|18|df=yes}}[1]
| latest preview version =
| latest preview date =
| programming language = Perl
| operating system =
| platform =
| size =
| language =
| genre = Web application framework
| license = PAL and GPL
| website = {{URL|http://www.catalystframework.org/}}
}}

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.

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, 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.[2] Catalyst started as a fork of Maypole, intended to become Maypole 3.0.[3] Development ceased on Maypole, however, with its most recent release in April 2008,[4] 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.[5] As of June 2011, Catalyst had 201 registered contributors.[6]

Philosophy

Catalyst is based on a "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 :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.[7] For example, it has JavaScript generation for Ajax and RIAs using the Catalyst::Plugin::Prototype module (prototype is an Ajax framework). 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 or YUI, the Yahoo! User Interface Library.

Web server support

For development and testing, Catalyst has a built-in simple HTTP server. For production use, Apache, lighttpd, Hiawatha, Cherokee or Nginx with FastCGI or mod_perl 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[8] 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 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 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, PostgreSQL, SQLite, IBM DB2, Oracle and Microsoft SQL Server. For ODBMSes, there is explicit support for KiokuDB via Catalyst::Model::KiokuDB.[9] The Model abstraction allows databases of any nature to be accessed via Catalyst::Model::Adaptor.[10]

Many Catalyst-based projects use :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,[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

{{Portal|Free and open-source software}}
  • Comparison of web frameworks

References

  • {{cite book | isbn=978-1-4302-2365-8 | title=The Definitive Guide to Catalyst | first=Kieren | last=Diment | url=http://www.apress.com/book/view/9781430223658 | publisher=Apress | accessdate=2009-09-09}}
1. ^{{cite web |url=https://metacpan.org/release/Catalyst-Runtime|title=CPAN Module Release | publisher=Catalyst | accessdate=25 May 2018}}
2. ^{{cite web|url=https://www.perl.com/pub/2004/04/15/maypole.html|title=Rapid Web Application Deployment with Maypole|publisher=Perl|date=2004-04-22|author=Simon Cozens}}
3. ^{{cite book|title=The Definitive Guide to Catalyst|publisher=Apress|ISBN=978-1430223658|page=2|url=https://books.google.com/books?id=3Vizi8DiedgC&pg=PA2}}
4. ^{{cite web|url=https://metacpan.org/module/Maypole|title=Maypole|publisher=CPAN}}
5. ^{{cite web|url=http://cpansearch.perl.org/src/MRAMBERG/Catalyst-Runtime-5.71000/Changes|title=Catalyst Changes file|author=|date=|publisher=|accessdate=8 August 2018}}
6. ^{{cite web|title=Catalyst Framework - Contributors|url=https://www.ohloh.net/p/catalyst/contributors|publisher=Ohloh|accessdate=2011-06-06}}
7. ^{{cite web|url=https://metacpan.org/search?q=Catalyst::Plugin::|title=Search for "Catalyst::Plugin::" - metacpan.org|author=|date=|website=metacpan.org|accessdate=8 August 2018}}
8. ^{{cite web|url=https://metacpan.org/module/Catalyst::Engine::HTTP::Prefork|title=Catalyst::Engine::HTTP::Prefork - High-performance pre-forking Catalyst engine - metacpan.org|author=|date=|website=metacpan.org|accessdate=8 August 2018}}
9. ^{{cite web|url=https://metacpan.org/module/Catalyst::Model::KiokuDB|title=Catalyst::Model::KiokuDB - use KiokuDB in your Catalyst apps - metacpan.org|author=|date=|website=metacpan.org|accessdate=8 August 2018}}
10. ^{{cite web|url=https://metacpan.org/module/Catalyst::Model::Adaptor|title=Catalyst::Model::Adaptor - use a plain class as a Catalyst model - metacpan.org|author=|date=|website=metacpan.org|accessdate=8 August 2018}}
11. ^{{cite web |title="Catalyst/DBIC/eCommerce Developer job" posting |url=http://jobs.perl.org/job/14124 |accessdate=2011-06-06 |archiveurl=https://www.webcitation.org/5zEhApxpY?url=http://jobs.perl.org/job/14124 |archivedate=2011-06-06 |date=2011-05-08 |deadurl=yes |df= }}
12. ^{{cite web | url = http://www.bbc.co.uk/blogs/bbcinternet/2008/12/iplayer_day_performance_tricks.html | title = BBC's iPlayer is powered by a Perl software stack (including Catalyst) }}
13. ^{{cite book | last = Diment | first = Kieren |author2=Trout, Matt S | title = The Definitive Guide to Catalyst | publisher = Apress | year = 2009 | pages = 278–281 | chapter = Catalyst Cookbook | isbn = 978-1-4302-2365-8 | url = https://www.amazon.com/Definitive-Guide-Catalyst-Maintainable-Applications/dp/1430223650/}}
14. ^{{cite web|title=Biggest porn site on the web YouPorn powered by Perl/Catalyst (top 50 in alexa)|url=https://www.reddit.com/r/programming/comments/8cvlp/biggest_porn_site_on_the_web_youporn_powered_by/|publisher=reddit}}
15. ^{{cite web | url = http://highscalability.com/blog/2012/4/2/youporn-targeting-200-million-views-a-day-and-beyond.html | title = YouPorn software stack was originally written in Perl + Mysql }}

External links

  • {{Official website|http://www.catalystframework.org/}}
  • Catalyst Wiki
  • [https://metacpan.org/module/Catalyst::Runtime Catalyst on CPAN]
  • [https://web.archive.org/web/20060206030740/http://perl.net.au/wiki/Catalyst Catalyst on PerlNet]
  • [https://web.archive.org/web/20110525005357/http://www.appliedstacks.com/PoweredBy/Catalyst Websites powered by Catalyst]
{{Application frameworks}}{{Perl}}{{DEFAULTSORT:Catalyst (Software)}}

3 : Free software programmed in Perl|Perl software|Web frameworks

随便看

 

开放百科全书收录14589846条英语、德语、日语等多语种百科知识,基本涵盖了大多数领域的百科知识,是一部内容自由、开放的电子版国际百科全书。

 

Copyright © 2023 OENC.NET All Rights Reserved
京ICP备2021023879号 更新时间:2024/9/23 10:23:20