Catalyst


Catalyst
eBook: $23.99
Formats: PDF, PacktLib, ePub and Mobi formats
$14.39
save 40%!
Print + free eBook + free PacktLib access to the book: $63.98    Print cover: $39.99
$39.99
save 37%!
Free Shipping!
UK, US, Europe and selected countries in Asia.
Also available on:
Overview
Table of Contents
Author
Support
Sample Chapters

 

  • Understand the Catalyst Framework and MVC architecture
  • Build and test a site with Catalyst
  • Detailed walkthroughs to create sample applications
  • Extend Catalyst through plug-ins

Book Details

Language : English
Paperback : 200 pages [ 235mm x 191mm ]
Release Date : December 2007
ISBN : 1847190952
ISBN 13 : 9781847190956
Author(s) : Jonathan Rockway
Topics and Technologies : All Books, Networking and Servers, Architecture & Analysis, Open Source

Back to BOOK PAGE

Table of Contents

Preface
Chapter 1: Introduction to Catalyst
Chapter 2: Creating a Catalyst Application
Chapter 3: Building a Real Application
Chapter 4: Expanding the Application
Chapter 5: Building a More Advanced Application
Chapter 6: Building Your Own Model
Chapter 7: Hot Web Topics
Chapter 8: Testing
Chapter 9: Deployment
Index
  • Chapter 1: Introduction to Catalyst
    • Catalyst Application Architecture
      • Extensibility
      • Reusability
      • Flexibility
      • Reliability
    • Installing Catalyst
      • CPAN
    • Where to go for Help?
    • Summary
  • Chapter 2: Creating a Catalyst Application
    • Creating the Application Skeleton
    • MyApp Directory Structure
      • Files in the MyApp Directory
      • Files in the lib Directory
      • Files in the root Directory
      • Files in the script Directory
      • Files in the t Directory
    • Adding a View
      • Using a Template To Render the Page
      • Some Technical Details
    • Adding a Database
      • Installing SQLite
      • Creating a Database Schema
      • Creating a Database Model for Catalyst
      • Using the Model
    • Summary
  • Chapter 3: Building a Real Application
    • Environment Setup
    • Database Design
    • Understanding the Interface to the Database
    • TTSite
      • Creating the Index Page
      • Creating a "Not Found" Page
    • Viewing People
    • Basic CRUD
    • Forms
    • Finishing Up
    • Summary
  • Using Components from Outside Catalyst
  • Searching and Paging
  • Authentication and Authorization
    • Authentication
    • Authorization
    • Adding Authentication and Authorization to the Address Book
  • Summary
  • Chapter 6: Building Your Own Model
    • Extending a DBIx::Class Model
      • Custom Methods Without Raw SQL
      • Calling Database Functions
    • Creating a Database Model from Scratch
    • Implementing a Filesystem Model
      • Tweaking the Model
      • Request Context Inside the Model
      • Maintainable Models
      • Other Components
    • Summary
  • Chapter 7: Hot Web Topics
    • REST
      • Getting some REST
        • REST Controller
        • REST Authentication
        • Adding an Entity
        • REST Easy
    • AJAX
      • Getting Started
        • Jemplate
      • Implementing AJAX
    • RSS
    • Summary
  • Chapter 8: Testing
    • Mechanics
    • Testing ChatStat
      • Testing a Database
      • Testing the Web Interface
    • Testing the Address Book
      • Logging In
      • Testing Forms
      • Testing JavaScript
    • Summary
  • Chapter 9: Deployment
    • Basics
      • PAR Deployment
      • Configuration Management
    • Configuring a Web Server
      • Apache
        • FastCGI
        • Static Content
        • mod_perl
        • Performance Considerations
      • Development Server and perlbal
    • Summary
Back to BOOK PAGE

Jonathan Rockway

Jonathan Rockway, a member of the Catalyst Core Team, has been programming Perl since his middle-school years. He became professionally involved with Perl when he was a desktop support minion at the University of Chicago and inherited a mod_perl application. He now works as a software developer at Infinity Interactive. In his spare time, he maintains a collection of modules on the CPAN and tries to speak at as many Perl conferences as possible.

Sorry, we don't have any reviews for this title yet.

Code Downloads

Download the code and support files for this book.


Submit Errata

Please let us know if you have found any errors not listed on this list by completing our errata submission form. Our editors will check them and add them to this list. Thank you.


Errata

- 33 submitted: last submission 05 Jan 2012

Errata type: Typo | Page number: 9

In the first line under the heading CPAN,'pacakges' should read 'packages'.

 

Errata type: Others | Page number: 13

An extra node in the path:
created "MyApp/"MyApp/script"
should be:
created "MyApp/script"

 

Errata type: Code | Page number: 22

There is an unnecessary space between the quote and http in 'xmlns=" http://...'

 

Errata type: Text | Page number: 24

In the fifth paragraph,'(a final listing to check against what appears at the end of this section)' should have 'what' removed from the sentence.

 

Errata type: Text | Page number: 30

second paragraph, second line_'entires' should be 'entries'.

 

Errata type: Text | Page number: 33

comma in 'This will also allow functionality, like...' should be removed

 

Errata type: Technical | Page number: 35

'We do need to add one line to the bottom of the file manually.
' If you do that then the test throws an error.
What was meant to say was 'before the 1; at the bottom of the file' or something similar.

 

Errata type: Text | Page number: 36

'belongs-to relation' should be 'belongs-to'

 

Errata type: Technical | Page number: 37

Under the heading TTSite there is no mention of adding CATALYST_VAR => 'Catalyst', to __PACKAGE__->config in /lib/AddressBook/View/HTML.pm (the same spot the book tells us all we need to add is TEMPLATE_EXTENSION => '.tt2', before the TIMER => 0 line).

 

Errata type: Text | Page number: 44

second line: 'controller' should be 'Controller'

 

Errata type: Code | Page number: 44

In the /root/src/person/edit.tt2 code, it has to be '[% FormBuilder.render %]' instead '[% form.render %]'.

 

Errata type: Code | Page number: 45

$c->form should read $self->formbuilder throughout

 

Errata type: Code | Page number: 47

Instead of[% form.render %] it should be [% FormBuilder.render %]

 

Errata type: Code | Page number: 48

Catalyst::Controller::BindLex') should be Catalyst::Controller::BindLex)

 

Errata type: Code | Page number: 49

$c->form should read $self->formbuilder throughout.

 

Errata type: Language | Page number: 53

bottom of the page ...
"just rename the config file have an extension"
should be
"just rename the config file to have an extension"

 

Errata type: Others | Page number: 54

Bottom middle of page ...
"To get at the from inside" should be "To get at the form inside"

 

Errata type: Others | Page number: 67

there's an extra blank line in the code example (sub search_names)...
return $c->model('AddressDB::People')->
search(\@people_fields);

 

Errata type: Text | Page number: 69

4th line. 'res,' should be'req.'.

 

Errata type: Code | Page number: 78

The best way to use the authorization plugin (since it's been rewritten after the release of the book) is to do as suggested.
In the following lines :
__PACKAGE__->config->{authentication}{dbic} =
user_class => 'AddressDB::User',
user_field => 'username',
password_type => 'clear', # use salted-hash for real applications
}
there should be the following line above password_type:
password_field => 'password',
It works as written in the book too (as a compatibility layer built in to the new plugin).

 

Errata type: Code | Page number: 85

It should be '$ perl script/chatstat_create.pl model DBIC ...
dbi:SQLite:root/database'
instead of
'$ perl script/app_ircxory_create.pl_create.pl model DBIC ...
DBI:SQLite:root/database'

 

Errata type: Text | Page number: 88

'dynamically added data'should be 'dynamically adding data'.

 

Errata type: Text | Page number: 100

"person's information people" should be "person's information page".

 

Errata type: Text | Page number: 128

'(things like...') should be '(before things like...').

 

Errata type: Code | Page number: 139

5th line_$c->request->data to be $c->req->data.

 

Errata type: Text | Page number: 150

'edit form, firebug'
perhaps to be 'edit form, with firebug'

 

Errata type: Text | Page number: 150

'showing AJAX' perhaps to be 'showing the AJAX'.

 

Errata type: Text | Page number: 155

'On the other end, the spectrum' should be 'The other end of the spectrum'

 

Errata type: Text | Page number: 155

'but you, still' should be 'but you still'

 

Errata type: Text | Page number: 156

the last sentence of the first paragraph_'Even though it seems like do actually you're wasting time' should read 'Even though it seems like you're wasting time'

 

Errata type: Code | Page number: 157

"Test::More.Test::More" should read "Test::More"

 

Errata type: Text | Page number: 177

'parl, not Perl' should be 'parl, not perl'

 

Errata type: Code | Page number: 178

"'hostname'" should read "`hostname`" (backticks instead of single quotes).

 

Sample chapters

You can view our sample chapters and prefaces of this title on PacktLib or download sample chapters in PDF format.

Frequently bought together

Catalyst +    Building Powerful and Robust Websites with Drupal 6 =
50% Off
the second eBook
Price for both: £10.19

Buy both these recommended eBooks together and get 50% off the cheapest eBook.

What you will learn from this book

  • Installing and setting up Catalyst
  • How MVC works in Catalyst, explained with a simple example
  • Using the Template toolkit to generate HTML output
  • Designing a database schema and accessing a SQLite database
  • Creating a CRUD interface to a database
  • Using FormBuilder to define auto-generating and self-validating forms
  • Creating easy-to-maintain configuration files
  • Importing CVS files into a database
  • Paginating search results
  • Using the session plug-in to add sessions to an application
  • Authentication and authorization, explored by implementing page-level and record-level control
  • Building an editable web interface
  • Features of DBIC for easy handling of data
  • Interfacing to your data:
  • Mixing a procedural interface with a relational DBIx::Class interface
  • Writing a database interface without DBIx::Class
  • Building a custom Model without using any database
  • Adding a REST API to allow other applications to access your application
  • Adding AJAX interactivity to your application
  • Incorporating RSS feeds in your application
  • Automated testing and the "Test-Driven Development" methodology, discussed in depth
  • Techniques to test your Catalyst application easily
  • Writing tests for applications developed in this book with Mechanize and Selenium
  • Packaging your application:
  • Manage dependencies and create packages easily using Makefile.PL
  • Create a unique configuration for each environment
  • How to set up for a variety of web servers
  • How to make your application a self-contained file (PAR)

In Detail

Many web applications are implemented in a way that makes developing them painful 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.

Everything that your web application needs to do is only written once; you connect to the database in one place, have configuration in one place, etc. Then, you just write actions for each URL that your application needs, without worrying about the database connections or HTML to produce. Catalyst will handle the details so you can worry about writing your application.

Catalyst is designed to be reliable. There are hundreds of production applications and thousands of users. The code is well-tested, and new releases almost always maintain compatibility with applications written for older versions. You don't have to worry about Catalyst breaking your application and slowing down your development. It just works.

Most importantly, Catalyst has a thriving community. You can ask a question on the IRC channel and get a response at almost any time of the day.
 
This book embodies Catalyst's philosophies of Do It Yourself and Don't Repeat Yourself.

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

Approach

This book will guide you through the features of Catalyst using real-world examples and systematic code snippets.

 

Who this book is for

This book is for web developers with basic Perl skills who are new to Catalyst. If you are excited by Ruby on Rails but would like the features of Rails with the familiarity of Perl, pick this book and get started.

Code Download and Errata
Packt Anytime, Anywhere
Register Books
Print Upgrades
eBook Downloads
Video Support
Contact Us
Awards Voting Nominations Previous Winners
Judges Open Source CMS Hall Of Fame CMS Most Promising Open Source Project Open Source E-Commerce Applications Open Source JavaScript Library Open Source Graphics Software
Resources
Open Source CMS Hall Of Fame CMS Most Promising Open Source Project Open Source E-Commerce Applications Open Source JavaScript Library Open Source Graphics Software