Zend Framework


                                    E-mail: chris@ctankersley.com
                                        Twitter: @dragonmantank
Northwest Ohio PHP User Group   1                            1/23/2012
Who Am I?
        Been Doing PHP for 8 Years

        Lots of projects no one uses, and a few that some do

        TL;DR https://github.com/dragonmantank




Northwest Ohio PHP User Group       2                          1/23/2012
What Is the Zend
                    Framework?




Northwest Ohio PHP User Group   3     1/23/2012
It’s Actually A Few Things




      Full Stack Framework          Component Library



Northwest Ohio PHP User Group   4                       1/23/2012
Northwest Ohio PHP User Group   5   1/23/2012
Using The Components
                                Piece By Piece




Northwest Ohio PHP User Group         6          1/23/2012
Pick and Choose




Northwest Ohio PHP User Group   7        1/23/2012
Custom Packages with
                      packageizer
                            http://epic.codeutopia.net/pack/




Northwest Ohio PHP User Group              8                   1/23/2012
Custom Packages with
                      packageizer
                            http://epic.codeutopia.net/pack/




Northwest Ohio PHP User Group              9                   1/23/2012
Include and Enjoy




Northwest Ohio PHP User Group   10        1/23/2012
Using Everything
                         Sometimes We Need The Kitchen Sink




Northwest Ohio PHP User Group            11                   1/23/2012
Download and Install
        http://framework.zend.com/download/latest




Northwest Ohio PHP User Group    12                 1/23/2012
What Do We Get?




Northwest Ohio PHP User Group   13   1/23/2012
In The Box…
        MVC Framework

        Templating System

        Database Abstraction and Interaction

        Command Line

        REST/SOAP Clients and Servers

        API Service Interfaces

        Form Generation System

        Lots, lots more


Northwest Ohio PHP User Group        14        1/23/2012
We can use this…
        Independently (for the most part)

        Together as a whole




Northwest Ohio PHP User Group      15       1/23/2012
Examples!
                                Lets look at the 1’s and 0’s




Northwest Ohio PHP User Group                16                1/23/2012
Lets Look At The Stack
        Most of the time, Zend Framework 1 will be used as a full
        stack

        Zend Framework 2 is better designed to be used in
        chunks




Northwest Ohio PHP User Group      17                          1/23/2012
Such a Zend_Tool




Northwest Ohio PHP User Group   18      1/23/2012
The Next Slide Isn’t As Scary
               As It Looks




Northwest Ohio PHP User Group   19   1/23/2012
Northwest Ohio PHP User Group   20   1/23/2012
Kicking Off The Process




Northwest Ohio PHP User Group   21   1/23/2012
Kicking Off The Process




Northwest Ohio PHP User Group   22   1/23/2012
Kicking Off The Process




Northwest Ohio PHP User Group   23   1/23/2012
Kicking Off The Process



                                     Lots of Magic




Northwest Ohio PHP User Group   24             1/23/2012
Parts of the Magic
                                This Magic Is The Good Kind



Northwest Ohio PHP User Group               25                1/23/2012
The Autoloader
        Automatically finds and loads a class when invoked




Northwest Ohio PHP User Group     26                         1/23/2012
The Configuration File




Northwest Ohio PHP User Group   27     1/23/2012
The MVC System
        URI is converted into a code resource
             http://www.myapp.com/mycontroller/myaction




Northwest Ohio PHP User Group        28                   1/23/2012
The MVC System
        Determines the View to use
             http://www.myapp.com/mycontroller/myaction




Northwest Ohio PHP User Group        29                   1/23/2012
Modules, Controllers,
                 Actions
                                Oh My




Northwest Ohio PHP User Group    30     1/23/2012
How It Works
    1. A URI specifies a controller and an action (and
       sometimes a module)

    2. The system instantiates the controller, and calls the
       action

    3. By default, the controller will render a view (HTML, XML,
       JSON) for the action

    4. This gets displayed to the browser




Northwest Ohio PHP User Group        31                        1/23/2012
Northwest Ohio PHP User Group   32   1/23/2012
The Database
                     I couldn’t think of a clever tagline for this one




Northwest Ohio PHP User Group               33                           1/23/2012
Zend_Db and Zend_Db_Table

        Automatically maps a table to an object




        Abstracts the DB




Northwest Ohio PHP User Group      34             1/23/2012
The Templating System
                                PHP is a template system!




Northwest Ohio PHP User Group              35               1/23/2012
Zend_View




Northwest Ohio PHP User Group       36      1/23/2012
Other Advantages
        Dynamic loading of CSS and JS

        Layout system, so each action only worries about it’s
        specific content

        Partials, so code can be reused (like table rows)

        Can be turned off when needed




Northwest Ohio PHP User Group      37                           1/23/2012
Other Useful Pieces
                     Because we’re probably running out of time




Northwest Ohio PHP User Group            38                       1/23/2012
Just To Name a Few
        Zend_Form for form generation and validation

        Zend_Filter for filtering user input

        Zend_Auth and Zend_Acl for authentication and access
        control

        Zend_Mail for dealing with sending (and receiving!) of e-
        mail




Northwest Ohio PHP User Group        39                         1/23/2012
Questions?




Northwest Ohio PHP User Group       40       1/23/2012
Credits
        http://www.flickr.com/photos/omegatron/666450803/sizes/l
        /in/photostream/
        http://www.flickr.com/photos/oskay/437341128/sizes/l/in/p
        hotostream/
        http://andigutmans.blogspot.com/2006/12/zend-
        framework-06-posted.html
        http://www.flickr.com/photos/billward/5046557642/sizes/l/i
        n/photostream/
        http://ffmux.savingthrow.org/wiki/images/c/c7/BlackMage.j
        pg

Northwest Ohio PHP User Group      41                           1/23/2012

Intro to Zend Framework

  • 1.
    Zend Framework E-mail: chris@ctankersley.com Twitter: @dragonmantank Northwest Ohio PHP User Group 1 1/23/2012
  • 2.
    Who Am I? Been Doing PHP for 8 Years Lots of projects no one uses, and a few that some do TL;DR https://github.com/dragonmantank Northwest Ohio PHP User Group 2 1/23/2012
  • 3.
    What Is theZend Framework? Northwest Ohio PHP User Group 3 1/23/2012
  • 4.
    It’s Actually AFew Things Full Stack Framework Component Library Northwest Ohio PHP User Group 4 1/23/2012
  • 5.
    Northwest Ohio PHPUser Group 5 1/23/2012
  • 6.
    Using The Components Piece By Piece Northwest Ohio PHP User Group 6 1/23/2012
  • 7.
    Pick and Choose NorthwestOhio PHP User Group 7 1/23/2012
  • 8.
    Custom Packages with packageizer http://epic.codeutopia.net/pack/ Northwest Ohio PHP User Group 8 1/23/2012
  • 9.
    Custom Packages with packageizer http://epic.codeutopia.net/pack/ Northwest Ohio PHP User Group 9 1/23/2012
  • 10.
    Include and Enjoy NorthwestOhio PHP User Group 10 1/23/2012
  • 11.
    Using Everything Sometimes We Need The Kitchen Sink Northwest Ohio PHP User Group 11 1/23/2012
  • 12.
    Download and Install http://framework.zend.com/download/latest Northwest Ohio PHP User Group 12 1/23/2012
  • 13.
    What Do WeGet? Northwest Ohio PHP User Group 13 1/23/2012
  • 14.
    In The Box… MVC Framework Templating System Database Abstraction and Interaction Command Line REST/SOAP Clients and Servers API Service Interfaces Form Generation System Lots, lots more Northwest Ohio PHP User Group 14 1/23/2012
  • 15.
    We can usethis… Independently (for the most part) Together as a whole Northwest Ohio PHP User Group 15 1/23/2012
  • 16.
    Examples! Lets look at the 1’s and 0’s Northwest Ohio PHP User Group 16 1/23/2012
  • 17.
    Lets Look AtThe Stack Most of the time, Zend Framework 1 will be used as a full stack Zend Framework 2 is better designed to be used in chunks Northwest Ohio PHP User Group 17 1/23/2012
  • 18.
    Such a Zend_Tool NorthwestOhio PHP User Group 18 1/23/2012
  • 19.
    The Next SlideIsn’t As Scary As It Looks Northwest Ohio PHP User Group 19 1/23/2012
  • 20.
    Northwest Ohio PHPUser Group 20 1/23/2012
  • 21.
    Kicking Off TheProcess Northwest Ohio PHP User Group 21 1/23/2012
  • 22.
    Kicking Off TheProcess Northwest Ohio PHP User Group 22 1/23/2012
  • 23.
    Kicking Off TheProcess Northwest Ohio PHP User Group 23 1/23/2012
  • 24.
    Kicking Off TheProcess Lots of Magic Northwest Ohio PHP User Group 24 1/23/2012
  • 25.
    Parts of theMagic This Magic Is The Good Kind Northwest Ohio PHP User Group 25 1/23/2012
  • 26.
    The Autoloader Automatically finds and loads a class when invoked Northwest Ohio PHP User Group 26 1/23/2012
  • 27.
    The Configuration File NorthwestOhio PHP User Group 27 1/23/2012
  • 28.
    The MVC System URI is converted into a code resource http://www.myapp.com/mycontroller/myaction Northwest Ohio PHP User Group 28 1/23/2012
  • 29.
    The MVC System Determines the View to use http://www.myapp.com/mycontroller/myaction Northwest Ohio PHP User Group 29 1/23/2012
  • 30.
    Modules, Controllers, Actions Oh My Northwest Ohio PHP User Group 30 1/23/2012
  • 31.
    How It Works 1. A URI specifies a controller and an action (and sometimes a module) 2. The system instantiates the controller, and calls the action 3. By default, the controller will render a view (HTML, XML, JSON) for the action 4. This gets displayed to the browser Northwest Ohio PHP User Group 31 1/23/2012
  • 32.
    Northwest Ohio PHPUser Group 32 1/23/2012
  • 33.
    The Database I couldn’t think of a clever tagline for this one Northwest Ohio PHP User Group 33 1/23/2012
  • 34.
    Zend_Db and Zend_Db_Table Automatically maps a table to an object Abstracts the DB Northwest Ohio PHP User Group 34 1/23/2012
  • 35.
    The Templating System PHP is a template system! Northwest Ohio PHP User Group 35 1/23/2012
  • 36.
    Zend_View Northwest Ohio PHPUser Group 36 1/23/2012
  • 37.
    Other Advantages Dynamic loading of CSS and JS Layout system, so each action only worries about it’s specific content Partials, so code can be reused (like table rows) Can be turned off when needed Northwest Ohio PHP User Group 37 1/23/2012
  • 38.
    Other Useful Pieces Because we’re probably running out of time Northwest Ohio PHP User Group 38 1/23/2012
  • 39.
    Just To Namea Few Zend_Form for form generation and validation Zend_Filter for filtering user input Zend_Auth and Zend_Acl for authentication and access control Zend_Mail for dealing with sending (and receiving!) of e- mail Northwest Ohio PHP User Group 39 1/23/2012
  • 40.
    Questions? Northwest Ohio PHPUser Group 40 1/23/2012
  • 41.
    Credits http://www.flickr.com/photos/omegatron/666450803/sizes/l /in/photostream/ http://www.flickr.com/photos/oskay/437341128/sizes/l/in/p hotostream/ http://andigutmans.blogspot.com/2006/12/zend- framework-06-posted.html http://www.flickr.com/photos/billward/5046557642/sizes/l/i n/photostream/ http://ffmux.savingthrow.org/wiki/images/c/c7/BlackMage.j pg Northwest Ohio PHP User Group 41 1/23/2012