Catalyst 1 Introduction

  • 2,318 views
Uploaded on

 

  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
No Downloads

Views

Total Views
2,318
On Slideshare
0
From Embeds
0
Number of Embeds
0

Actions

Shares
Downloads
25
Comments
0
Likes
2

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

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