You are previewing Catalyst 5.8.
O'Reilly logo
Catalyst 5.8

Book Description

Build scalable and extendable web applications using the agile MVC framework

  • Increase reusability and empower the delivery of more complex design patterns by extending the MVC concept

  • Build an editable web interface

  • Extend Catalyst through plugins

  • Plenty of examples with detailed walkthroughs to create sample applications

  • Updated for the latest version, Catalyst 5.8

  • In Detail

    Many web applications are implemented in a way that makes developing them difficult and repetitive. Catalyst is an open source Perl-based Model-View-Controller framework that aims to solve this problem by reorganizing your web application to design and implement it in a natural, maintainable, and testable manner, making web development fun, fast, and rewarding.

    This book teaches you how to use Catalyst to weave the various components involved in a web application, using methods and tools you personally prefer along with recommendations and details on the most popularly used objects like the DBIX ORM, TT2 Template, and Moose.

    This book will take you from how the MVC pattern simplifies creating quality applications to how Catalyst allows you to tap this power instantly. It explains advanced design patterns and concludes with the improvements that Moose brings to all this. It also incorporates valuable suggestions and feedback received from the community members and our customers. By the end of the book, you will be able to build clean, scalable, and extendable web applications. This book embodies Catalyst's philosophies of Do It Yourself and Don't Repeat Yourself.

    Design, develop, test, and deploy applications rapidly with the open source MVC Catalyst framework

    Table of Contents

    1. Catalyst 5.8
      1. Catalyst 5.8
      2. Credits
      3. About the Author
      4. About the Reviewer
      5. Preface
        1. What this book covers
        2. What you need for this book
        3. Who this book is for
        4. Conventions
        5. Reader feedback
        6. Customer support
          1. Errata
          2. Piracy
          3. Questions
      6. 1. Introduction to Catalyst
        1. Catalyst application architecture
          1. Extensibility
          2. Reusability
          3. Flexibility
          4. Reliability
        2. Installing Catalyst
          1. CPAN
        3. Testing the installation
        4. Where to go for help?
        5. Summary
      7. 2. Creating a Catalyst Application
        1. Creating the application skeleton
        2. Latest helper scripts
        3. Files in the MyApp directory
        4. Files in the lib directory
        5. Files in the root directory
        6. Files in the script directory
        7. Files in the t directory
        8. Handling URL requests
        9. Adding a View
          1. More on Controller methods
          2. Some technical details
        10. Adding a database
          1. Installing SQLite
          2. Creating a database schema
          3. Creating a database model for Catalyst
          4. Using the Model
        11. Summary
      8. 3. Building a Real Application
        1. Environment setup
        2. Database design
        3. Understanding the interface to the database
        4. TTSite
          1. Creating the index page
          2. Creating a "Not Found" page
        5. Viewing people
        6. Basic CRUD
        7. Forms
        8. Finishing up
        9. Summary
      9. 4. Expanding the Application
        1. Configuration files
          1. Configuring the address book
        2. Sessions
          1. Adding sessions to the address book
          2. Sessions in the database
        3. Using components from outside Catalyst
        4. Searching and paging
        5. Authentication and authorization
          1. Authentication
          2. Authorization
          3. Adding authentication and authorization to the address book
        6. Summary
      10. 5. Building a More Advanced Application
        1. The application
          1. Background
        2. Creating the database
          1. Populating the database
        3. Extracting the data
          1. Chained resultsets
          2. Custom resultsets
        4. Putting the data on the Web
        5. Summary
      11. 6. Building Your Own Model
        1. Creating a database model from scratch
        2. Extending a DBIx::Class model
          1. Custom methods without raw SQL
          2. Calling database functions
        3. Implementing a Filesystem model
          1. Tweaking the model
          2. Request context inside the model
          3. Maintainable models
          4. Other components
        4. Summary
      12. 7. Hot Web Topics
        1. REST
          1. Getting some REST
            1. REST Controller
            2. REST authentication
            3. Adding an entity
            4. REST easy
        2. AJAX
          1. Getting started
            1. Jemplate
          2. Implementing AJAX
        3. RSS
        4. Summary
      13. 8. Moose
        1. Moose introduction
          1. OO in Perl
          2. OO in Moose
            1. Properties
            2. Class method
            3. Instantiating objects
          3. Inheritance
        2. Moose in Catalyst
          1. Controller
          2. CatalystX declare
          3. CatalystX
          4. Roles
          5. Types
          6. Model
          7. Immutable
        3. Summary
      14. 9. Deployment
        1. Basics
          1. PAR deployment
          2. Configuration management
        2. Configuring a web server
          1. Apache
            1. FastCGI
            2. Static content
            3. mod_perl
            4. Performance considerations
          2. Development server and perlbal
          3. Database
        3. Versioning code
        4. Summary
      15. 10. Testing
        1. Mechanics
        2. Testing ChatStat
          1. Testing a database
          2. Testing the web interface
        3. Testing the AddressBook
          1. Logging in
          2. Testing forms
          3. Testing JavaScript
        4. Summary