Catalyst 5.8: the Perl MVC Framework


Catalyst 5.8: the Perl MVC Framework
eBook: $23.99
Formats: PDF, PacktLib, ePub and Mobi formats
$20.39
save 15%!
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

 

  • 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 

Book Details

Language : English
Paperback : 244 pages [ 235mm x 191mm ]
Release Date : July 2010
ISBN : 1847199240
ISBN 13 : 9781847199249
Author(s) : Antano Solar John
Topics and Technologies : All Books, Application Development, Architecture & Analysis, Open Source


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: Moose
Chapter 9: Deployment
Chapter 10: Testing
Index
  • Chapter 1: Introduction to Catalyst
    • Catalyst application architecture
      • Extensibility
      • Reusability
      • Flexibility
      • Reliability
    • Installing Catalyst
      • CPAN
    • Testing the installation
    • Where to go for help?
    • Summary
  • Chapter 2: Creating a Catalyst Application
    • Creating the application skeleton
    • Latest helper scripts
    • 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
    • Handling URL requests
    • Adding a View
      • More on Controller methods
      • 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
  • Chapter 4: Expanding the Application
    • Configuration files
      • Configuring the address book
    • Sessions
      • Adding sessions to the address book
      • Sessions in the database
    • 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
    • Creating a database model from scratch
    • Extending a DBIx::Class model
      • Custom methods without raw SQL
      • Calling database functions
    • 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: Moose
    • Moose introduction
      • OO in Perl
      • OO in Moose
        • Properties
        • Class method
        • Instantiating objects
      • Inheritance
    • Moose in Catalyst
      • Controller
      • CatalystX declare
      • CatalystX
      • Roles
      • Types
      • Model
      • Immutable
    • 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
      • Database
    • Versioning code
    • Summary
  • Chapter 10: Testing
    • Mechanics
    • Testing ChatStat
      • Testing a database
      • Testing the web interface
    • Testing the AddressBook
      • Logging in
      • Testing forms
      • Testing JavaScript
    • Summary

Antano Solar John

Antano Solar is a techie to the core—a tech evangelist who is passionate about using technology to revolutionize the learning experience! Antano has contributed to the open source community in terms of documentation, code, and support, with a variety of platforms based on languages such as PHP, Perl, Lisp, Python, and Ruby. He loves to share his tech excitement with fellow techies and non-techies, and does so through publishing papers, books, and delivering seminars at colleges, universities such as the IIT, and corporate tech events. He has published a paper on enhancing wireless networks in an IEEE Journal. His paper on an engine helping machines understand objectives by meta-modeling, using Neurolinguistic Programming principles and Deep Structure, is considered a landmark. An avid hacker, Antano has won two Yahoo hack-day awards. He recently won the award for developing a Hybrid Search Engine from scratch in 24 hours that uses Machine Intelligence and Social Intelligence to identify, search, and present the information in the required format. Professionally, until recently, Antano was a Consultant and a Trainer providing IT solutions and sessions on VoIP, Networks and Software Plaforms, and Languages. He is currently the Chief Technology Officer at NuVeda Learning. In his current role, he is responsible for the development and deployment of Learning Management Systems that are used by large MNCs globally. He also plays the role of a Chief Architect in the research and development of technologies related to the understanding and measuring of Learning. He is excited by the challenges of using complex technologies such as Artificial Intelligence and Natural Language Processing. Occasionally, when Antano needs to take a "Tech" break, he likes to train and tell stories!
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

- 11 submitted: last submission 31 Oct 2013

Errata type: Code | Page number: 61

label: Mailing Address type: textarea
should be:
label: Mailing Address
type: textarea

 

Errata type: Code | Page number: 180

In the code examples on this page, 'Package' should be 'package' and 'Use Moose' should be 'use Moose'

 

Errata type: Code | Page number: 112

The code line:
my $nickname = $self->_get_nickname(action->who);
Should be:
my $nickname = $self->_get_nickname($action->who);

 

Errata type: Code | Page number: 31

The line:
"Run the server, as explained, by typing perl script/myapp_server.pl, and open the page http://localhost/hello."
should be:
"Run the server, as explained, by typing perl script/myapp_server.pl, and open the page http://localhost:3000/hello."

 

Errata type: Code | Page number: 43

The command line:
$ perl script/addressbook_create.pl model AddressDB DBIC::Schema AddressBook::Schema::AddressDB create=static dbi:SQLite:database
Should be:
$ perl script/addressbook_create.pl model AddressDB DBIC::Schema AddressBook::Schema::AddressDB create=static dbi:SQLite:tmp/database

 

Errata type: Code | Page number: 46

The line:
addresses => 'AddressBook::Schema::AddressDB::Result::Addresses',
Should be:
addresses => 'AddressBook::Schema::AddressDB::Result::Address',

 

Errata type: Code | Page number: 62

The line:
perl script/addressbook_create.pl Address
Should be:
perl script/address_create.pl controller Address

 

Errata type: Typo | Page number: 116 and 117

The code:
$ DBIC_TRACE=1 script/chatstat_repl.pl
> $s->karma_for('catalyst');
Should be :
$ DBIC_TRACE=1 script/chatstat_repl.pl
> $s->resultset('Opinions')->karma_for('catalyst');

 

Errata type: Code | Page number: 76

The line
my $config = Config::JFDI->new(path => $filename);
should read
my $config = Config::JFDI->new(file => $filename);

 

Errata type: Code | Page number: 69

The following code:
connect_info dbi:mysql:__HOME__database
should be:
connect_info dbi:SQLite:__HOME__/database

 

Errata type: Code | Page number: 82

The following code:
push@result, (map +{$column => {-like => "%$_%"}}, @$tokens);
should be:
push@result, (map {$column => {-like => "%$_%"}}, @$tokens);

 

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 5.8: the Perl MVC Framework +    Building Websites with Joomla! v1.0 =
50% Off
the second eBook
Price for both: £16.00

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

What you will learn from this book

 

  • Use the Template toolkit to generate HTML output
  • Design a database schema and access a SQLite database
  • Create a CRUD interface to a database
  • Use FormBuilder to define auto-generating and self-validating forms
  • Create easy-to-maintain configuration files
  • Import CSV files into a database
  • Paginate search results
  • Use the session plugin to add sessions to an application
  • Explore authentication and authorization, implementing page-level and record-level control
  • Use DBIC for easy handling of data
  • Add a REST API to allow other applications to access your application
  • Add AJAX interactivity to your application
  • Incorporate RSS feeds in your application
  • Automate testing and learn "Test-Driven Development"
  • Mix a procedural interface with a relational DBIx::Class interface
  • Write a database interface without DBIx::Class
  • Build a custom Model without using any database

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

Approach

The book is written in an exploratory style: try something and then understand how it works. It will guide you through the features of Catalyst using real-world examples and systematic code snippets.

Who this book is for

If you are a Perl Developer and want to strengthen your skill by understanding Web Application development using MVC principles, then this book is for you.

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