Introduction To Catalyst - Part 1

18,246 views
17,924 views

Published on

Part 1 of "Introduction to Catalyst" talks about installing Catalyst, creating your first application, examining its structure, and how HTTP requests are dispatched.

Published in: Technology
0 Comments
10 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
18,246
On SlideShare
0
From Embeds
0
Number of Embeds
3
Actions
Shares
0
Downloads
228
Comments
0
Likes
10
Embeds 0
No embeds

No notes for slide

Introduction To Catalyst - Part 1

  1. 1. Introduction to Catalyst The Elegant Web Framework Dan Dascalescu (dandv)
  2. 2. What is Catalyst? <ul><li>“the” Perl web application framework </li></ul><ul><ul><li>Most actively developed (2005 – 2 wks ago) </li></ul></ul><ul><ul><li>Most widely used </li></ul></ul><ul><ul><li>Most flexible </li></ul></ul><ul><ul><li>Backward-compatible </li></ul></ul>
  3. 6. Catalyst philosophy <ul><li>TIMTOWTDI crystallized, DRY, glue </li></ul><ul><li>Model-View-Controller </li></ul><ul><li>“ Catalyst diet”: fat model, thin controller </li></ul><ul><li>Flexibility </li></ul><ul><ul><li>Models: DBIx::Class, KiokuDB, Net::LDAP, SVN etc. </li></ul></ul><ul><ul><li>Views: Template Toolkit, GraphViz, HTML::Seamstress, Mason, XSLT, PHP (!) etc. </li></ul></ul><ul><ul><li>Forms: HTML::FormFu, Reaction, FormBuilder </li></ul></ul><ul><ul><li>Deployment: built-in server, FastCGI, mod_perl </li></ul></ul><ul><ul><li>210 plugins on CPAN </li></ul></ul>
  4. 7. Production ready <ul><li>Support (built-in or plugins) for: </li></ul><ul><ul><li>Any database (via Perl’s DBI) </li></ul></ul><ul><ul><li>Any model (Catalyst::Model::Adaptor) </li></ul></ul><ul><ul><li>Authentication: Flickr, HTTP, OpenID etc. </li></ul></ul><ul><ul><li>Authorization: ACL, Roles </li></ul></ul><ul><ul><li>Cache: FastMmap, FileCache, BerkeleyDB, and Memcached </li></ul></ul><ul><ul><li>CAPTCHA </li></ul></ul><ul><ul><li>Compression (Bzip2, Gzip etc.) </li></ul></ul><ul><ul><li>Crypto </li></ul></ul><ul><ul><li>RIA: Dojo, Prototype </li></ul></ul><ul><ul><li>Sessions </li></ul></ul><ul><ul><li>Static file serving </li></ul></ul><ul><ul><li>Unicode </li></ul></ul><ul><ul><li>RPC: JSONRPC, XMLRPC; Catalyst::Action::REST </li></ul></ul>
  5. 8. From Perl to Catalyst in 15 minutes <ul><li>TinyURL app </li></ul><ul><li>See screencast at http:// bit.ly/dandv -catalyst </li></ul><ul><li>eq </li></ul><ul><li>http://wiki.dandascalescu.com/howtos/catalyst/introduction_to_catalyst </li></ul>
  6. 9. Helpers <ul><li>Built-in helpers to create: </li></ul><ul><ul><li>skeleton application: catalyst.pl MyApp </li></ul></ul><ul><ul><li>models: </li></ul></ul><ul><ul><ul><li>script inyurl_create.pl model DB DBIC::Schema TinyURL::Schema create=static &quot;dbi:SQLite:tinyurl.db&quot; </li></ul></ul></ul><ul><ul><li>AutoCRUD </li></ul></ul><ul><ul><li>views: </li></ul></ul><ul><ul><ul><li>script inyurl_create.pl view HTML TT </li></ul></ul></ul><ul><ul><li>controllers: </li></ul></ul><ul><ul><ul><li>script/myapp_create.pl controller Name </li></ul></ul></ul>
  7. 10. Resources <ul><li>Catalyst wiki (dogfood-powered by MojoMojo) : </li></ul><ul><ul><li>http://dev.catalystframework.org/wiki </li></ul></ul><ul><li>#catalyst on irc.perl.org </li></ul><ul><li>Catalyst mailing list </li></ul><ul><ul><li>http://snipurl.com/catalyst-mailing-list </li></ul></ul>

×