Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Catalyst 1 Introduction


Published on

Published in: Economy & Finance, Technology
  • Be the first to comment

Catalyst 1 Introduction

  1. 1. Catalyst Intro I short introduction to what catalyst is.
  2. 2. Introduction <ul><li>A complete web site framework for Perl. </li></ul><ul><li>Comparable to Ruby on Rails and Java Struts. </li></ul><ul><li>Robust and proven. </li></ul><ul><li>Uses and enforces the MVC design pattern. </li></ul>
  3. 3. MVC <ul><li>MVC is a design pattern that was originally designed for interactive application development, like Visual Basic. </li></ul><ul><li>M is the Model and is generally the database layer. </li></ul><ul><li>V is the View and in web development it normally consists of HTML. </li></ul><ul><li>C is the Controller which contains all of the business logic written in Perl/Ruby/PHP/etc. </li></ul>
  4. 4. View <ul><li>The view provides an interface for the user to interact with the system. </li></ul><ul><li>The view contains minimal business logic. </li></ul><ul><li>The view never modifies the model directly, but it may read from the model directly. </li></ul>
  5. 5. Controller <ul><li>The controller implements all of the business logic. </li></ul><ul><li>The controller prepares information from the model and passes it to the view. </li></ul><ul><li>The controller take data from the view and passes it to the model. </li></ul>
  6. 6. Model <ul><li>The model stores the current state of the application. </li></ul><ul><li>The model is manipulated by the controller. </li></ul>
  7. 7. Structure <ul><li>A Catalyst app consists of a set of perl modules that all reside under a namespace for that app, such as “MyApp”. </li></ul><ul><ul><li>MyApp This module holds all of the configuration information about the application. </li></ul></ul><ul><ul><li>MyApp::Model::* Contains a class for each type of model being used in this application. </li></ul></ul><ul><ul><li>MyApp::View::* Contains a class for each type of view being used. </li></ul></ul><ul><ul><li>MyApp::Controller::* Contains a class for each controller. </li></ul></ul>
  8. 8. Basic Request Cycle <ul><li>A request is made for: </li></ul><ul><li>Catalyst finds a handler: Controller::Inventory::Purchase->index() or, if not found, it looks for: Controller::Inventory->purchase() </li></ul><ul><li>Auto-handlers are executed. </li></ul><ul><li>Requested handler is executed. </li></ul><ul><ul><li>Data is gathered from the model. </li></ul></ul><ul><ul><li>Model is updated with any changes. </li></ul></ul><ul><li>Handler turns control over to the view. </li></ul>
  9. 9. More on Catalyst <ul><li>Supports whatever model classes you want to use such as: Class::DBI, Rose::DB, DBI, DBIx::Class, LDAP </li></ul><ul><li>Supports many different view classes such as: Mason, TT, PHP, EmbPerl </li></ul><ul><li>Has a extensive library of plugins on CPAN. </li></ul><ul><li>Large community of users and contributors. </li></ul><ul><li>New features in active development (Combust, Moose). </li></ul>
  10. 10. Resources <ul><li>MVC @ Wikipedia </li></ul><ul><li>Catalyst Manual @ CPAN </li></ul>