Catalyst::Manual::TutoUser(Contributed Perl DocumCatalyst::Manual::Tutorial(3)



NAME
       Catalyst::Manual::Tutorial - Catalyst Tutorial: Overview

DESCRIPTION
       The Catalyst framework is a flexible and comprehensive environment for
       quickly building high-functionality web applications.  This tutorial is
       designed to provide a rapid introduction to its basics and its most
       commonly used features while focusing on real-world best practices.

       We suggest that you read this introduction on the web.  Make sure you
       are reading the latest version of the tutorial by visiting
       <https://metacpan.org/module/Catalyst::Manual::Tutorial>.
       Alternatively you can use CPAN modules like Pod::Webserver,
       Pod::POM::Web, Pod::Browser (Catalyst based), or CPAN::Mini::Webserver
       to read a local copy of the tutorial.

       The tutorial is divided into the following sections:

       NOTE: CLICK THESE LINKS TO JUMP TO CHAPTERS (the index links above only
       navigate inside this page).

       1.  Introduction

       2.  Catalyst Basics

       3.  More Catalyst Basics

       4.  Basic CRUD

       5.  Authentication

       6.  Authorization

       7.  Debugging

       8.  Testing

       9.  Advanced CRUD

       10. Appendices

       Final code tarballs for each chapter of the tutorial are available at
       <http://dev.catalyst.perl.org/repos/Catalyst/trunk/examples/Tutorial/>.

Detailed Table of Contents
   Chapter 1: Intro
       Note: Click on the heading in the previous line to jump to the actual
       chapter. Below is a "table of contents" for this chapter.

       o   VERSIONS AND CONVENTIONS USED IN THIS TUTORIAL

       o   CATALYST INSTALLATION

       o   DATABASES

       o   WHERE TO GET WORKING CODE

   Chapter 2: Catalyst Basics
       Note: Click on the heading in the previous line to jump to the actual
       chapter. Below is a "table of contents" for this chapter.

       o   CREATE A CATALYST PROJECT

       o   HELLO WORLD

           o   The Simplest Way

           o   Hello, World! Using a View and a Template

       o   CREATE A SIMPLE CONTROLLER AND AN ACTION

   Chapter 3: More Catalyst Basics
       Note: Click on the heading in the previous line to jump to the actual
       chapter. Below is a "table of contents" for this chapter.

       o   CREATE A NEW APPLICATION

       o   EDIT THE LIST OF CATALYST PLUGINS

       o   CREATE A CATALYST CONTROLLER

       o   CATALYST VIEWS

           o   Create a Catalyst View

           o   Create a TT Template Page

           o   Test Run The Application

       o   CREATE A SQLITE DATABASE

       o   DATABASE ACCESS WITH DBIx::Class

           o   Create a Dynamic DBIC Model

       o   ENABLE THE MODEL IN THE CONTROLLER

           o   Test Run The Application

       o   CREATE A WRAPPER FOR THE VIEW

           o   Configure TT.pm For The Wrapper

           o   Create the Wrapper Template File and Stylesheet

           o   Test Run The Application

       o   A STATIC DATABASE MODEL WITH DBIx::Class

           o   Create Static DBIC Schema Files

           o   Updating the Generated DBIC Schema Files

           o   Run The Application

       o   UPDATING THE VIEW

       o   RUNNING THE APPLICATION FROM THE COMMAND LINE

       o   OPTIONAL INFORMATION

           o   Using RenderView for the Default View

           o   Using The Default Template Name

           o   Return To A Manually-Specified Template

   Chapter 4: Basic CRUD
       Note: Click on the heading in the previous line to jump to the actual
       chapter. Below is a "table of contents" for this chapter.

       o   FORMLESS SUBMISSION

           o   Include a Create Action in the Books Controller

           o   Include a Template for the url_create Action:

           o   Try the url_create Feature

       o   CONVERT TO A CHAINED ACTION

           o   Try the Chained Action

           o   Refactor to Use a "Base" Method to Start the Chains

       o   MANUALLY BUILDING A CREATE FORM

           o   Add a Method to Display the Form

           o   Add a Template for the Form

           o   Add Method to Process Form Values and Update Database

           o   Test Out the Form

       o   A SIMPLE DELETE FEATURE

           o   Include a Delete Link in the List

           o   Add a Common Method to Retrieve a Book for the Chain

           o   Add a Delete Action to the Controller

           o   Try the Delete Feature

           o   Fixing a Dangerous URL

           o   Try the Delete and Redirect Logic

           o   Using uri_for to Pass Query Parameters

           o   Try the Delete and Redirect With Query Param Logic

       o   EXPLORING THE POWER OF DBIC

           o   Add Datetime Columns to Our Existing Books Table

           o   Update DBIC to Automatically Handle the Datetime Columns

           o   Create a ResultSet Class

           o   Chaining ResultSets

           o   Adding Methods to Result Classes

   Chapter 5: Authentication
       Note: Click on the heading in the previous line to jump to the actual
       chapter. Below is a "table of contents" for this chapter.

       o   BASIC AUTHENTICATION

           o   Add Users and Roles to the Database

           o   Add User and Role Information to DBIC Schema

           o   Sanity-Check Reload of Development Server

           o   Include Authentication and Session Plugins

           o   Configure Authentication

           o   Add Login and Logout Controllers

           o   Add a Login Form TT Template Page

           o   Add Valid User Check

           o   Displaying Content Only to Authenticated Users

           o   Try Out Authentication

       o   USING PASSWORD HASHES

           o   Get a SHA-1 Hash for the Password

           o   Switch to SHA-1 Password Hashes in the Database

           o   Enable SHA-1 Hash Passwords in
               Catalyst::Plugin::Authentication::Store::DBIC

           o   Try Out the Hashed Passwords

       o   USING THE SESSION FOR FLASH

           o   Try Out Flash

           o   Switch To Flash-To-Stash

   Chapter 6: Authorization
       Note: Click on the heading in the previous line to jump to the actual
       chapter. Below is a "table of contents" for this chapter.

       o   BASIC AUTHORIZATION

           o   Update Plugins to Include Support for Authorization

           o   Add Config Information for Authorization

           o   Add Role-Specific Logic to the ``Book List'' Template

           o   Limit Books::add to admin Users

           o   Try Out Authentication And Authorization

       o   ENABLE MODEL-BASED AUTHORIZATION

   Chapter 7: Debugging
       Note: Click on the heading in the previous line to jump to the actual
       chapter. Below is a "table of contents" for this chapter.

       o   LOG STATEMENTS

       o   RUNNING CATALYST UNDER THE PERL DEBUGGER

       o   DEBUGGING MODULES FROM CPAN

       o   TT DEBUGGING

   Chapter 8: Testing
       Note: Click on the heading in the previous line to jump to the actual
       chapter. Below is a "table of contents" for this chapter.

       o   RUNNING THE "CANNED" CATALYST TESTS

       o   RUNNING A SINGLE TEST

       o   ADDING YOUR OWN TEST SCRIPT

       o   SUPPORTING BOTH PRODUCTION AND TEST DATABASES

   Chapter 9: Advanced CRUD
       Note: Click on the heading in the previous line to jump to the actual
       chapter. Below is a "table of contents" for this chapter.

       o   ADVANCED CRUD OPTIONS

   Chapter 10: Appendices
       Note: Click on the heading in the previous line to jump to the actual
       chapter. Below is a "table of contents" for this chapter.

       o   APPENDIX 1: CUT AND PASTE FOR POD-BASED EXAMPLES

           o   "Un-indenting" with Vi/Vim

           o   "Un-indenting" with Emacs

       o   APPENDIX 2: USING MYSQL AND POSTGRESQL

           o   MySQL

           o   PostgreSQL

       o   APPENDIX 3: IMPROVED HASHING SCRIPT

THANKS
       This tutorial would not have been possible without the input of many
       different people in the Catalyst community.  In particular, the primary
       author would like to thank:

       o   Sebastian Riedel for founding the Catalyst project.

       o   The members of the Catalyst Core Team for their tireless efforts to
           advance the Catalyst project.  Although all of the Core Team
           members have played a key role in this tutorial, it would have
           never been possible without the critical contributions of: Matt
           Trout, for his unfathomable knowledge of all things Perl and
           Catalyst (and his willingness to answer lots of my questions);
           Jesse Sheidlower, for his incredible skill with the written word
           and dedication to improving the Catalyst documentation; and Yuval
           Kogman, for his work on the Catalyst "Auth & Authz" plugins (the
           original focus of the tutorial) and other key Catalyst modules.

       o   Other Catalyst documentation folks like Kieren Diment, Gavin Henry,
           and Jess Robinson (including their work on the original Catalyst
           tutorial).

       o   Kieren Diment for his oversite of Catalyst-related documentation.

       o   Everyone on #catalyst and #catalyst-dev.

       o   Louis Moore (who thanks Marcello Romani and Tom Lanyon) for the
           PostgreSQL content in the Appendix.

       o   People who have emailed me with corrections and suggestions on the
           tutorial. As of the most recent release, this include: Florian
           Ragwitz, Mauro Andreolini, Jim Howard, Giovanni Gigante, William
           Moreno, Bryan Roach, Ashley Berlin, David Kamholz, Kevin Old,
           Henning Sprang, Jeremy Jones, David Kurtz, Ingo Wichmann, Shlomi
           Fish, Murray Walker, Adam Witney and xenoterracide (Caleb Cushing).
           Thanks to Devin Austin for coming up with an initial version of a
           non-TTSite wrapper page. Also, a huge thank you to Kiffin Gish for
           all the hard work on the "database depluralization" effort and
           Rafael Kitover for the work on updating the tutorial to include
           foreign key support for SQLite. I'm sure I am missing some names
           here... apologies for that (please let me know if you name should
           be here).

AUTHOR
       Kennedy Clark, "hkclark@gmail.com"

       Feel free to contact the author for any errors or suggestions, but the
       best way to report issues is via the CPAN RT Bug system at
       <https://rt.cpan.org/Public/Dist/Display.html?Name=Catalyst-Manual>.

       ***TODO: Update The most recent version of the Catalyst Tutorial can be
       found at
       http://dev.catalyst.perl.org/repos/Catalyst/Catalyst-Manual/5.80/trunk/lib/Catalyst/Manual/Tutorial/
       <http://dev.catalyst.perl.org/repos/Catalyst/Catalyst-
       Manual/5.80/trunk/lib/Catalyst/Manual/Tutorial/>.

       Copyright 2006-2010, Kennedy Clark, under the Creative Commons
       Attribution Share-Alike License Version 3.0
       (http://creativecommons.org/licenses/by-sa/3.0/us/
       <http://creativecommons.org/licenses/by-sa/3.0/us/>).



perl v5.16.3                      2011-09-02     Catalyst::Manual::Tutorial(3)
