Intro to Zend Framework

Post on 27-May-2015

1.245 views 0 download

Tags:

description

A basic introduction to the Zend Framework

Transcript of Intro to Zend Framework

04/12/2023Northwest Ohio PHP User Group 1

Zend Framework

E-mail: chris@ctankersley.comTwitter: @dragonmantank

04/12/2023Northwest Ohio PHP User Group 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

04/12/2023Northwest Ohio PHP User Group 3

What Is the Zend Framework?

04/12/2023Northwest Ohio PHP User Group 4

It’s Actually A Few Things

Full Stack Framework Component Library

04/12/2023Northwest Ohio PHP User Group 5

04/12/2023Northwest Ohio PHP User Group 6

Using The Components

Piece By Piece

04/12/2023Northwest Ohio PHP User Group 7

Pick and Choose

04/12/2023Northwest Ohio PHP User Group 8

Custom Packages with packageizer

http://epic.codeutopia.net/pack/

04/12/2023Northwest Ohio PHP User Group 9

Custom Packages with packageizer

http://epic.codeutopia.net/pack/

04/12/2023Northwest Ohio PHP User Group 10

Include and Enjoy

04/12/2023Northwest Ohio PHP User Group 11

Using EverythingSometimes We Need The Kitchen Sink

04/12/2023Northwest Ohio PHP User Group 12

Download and Install

http://framework.zend.com/download/latest

04/12/2023Northwest Ohio PHP User Group 13

What Do We Get?

04/12/2023Northwest Ohio PHP User Group 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

04/12/2023Northwest Ohio PHP User Group 15

We can use this…

Independently (for the most part)

Together as a whole

04/12/2023Northwest Ohio PHP User Group 16

Examples!Lets look at the 1’s and 0’s

04/12/2023Northwest Ohio PHP User Group 17

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

04/12/2023Northwest Ohio PHP User Group 18

Such a Zend_Tool

04/12/2023Northwest Ohio PHP User Group 19

The Next Slide Isn’t As Scary As It Looks

04/12/2023Northwest Ohio PHP User Group 20

04/12/2023Northwest Ohio PHP User Group 21

Kicking Off The Process

04/12/2023Northwest Ohio PHP User Group 22

Kicking Off The Process

04/12/2023Northwest Ohio PHP User Group 23

Kicking Off The Process

04/12/2023Northwest Ohio PHP User Group 24

Kicking Off The Process

Lots of Magic

04/12/2023Northwest Ohio PHP User Group 25

Parts of the MagicThis Magic Is The Good Kind

04/12/2023Northwest Ohio PHP User Group 26

The Autoloader

Automatically finds and loads a class when invoked

04/12/2023Northwest Ohio PHP User Group 27

The Configuration File

04/12/2023Northwest Ohio PHP User Group 28

The MVC System

URI is converted into a code resourcehttp://www.myapp.com/mycontroller/myaction

04/12/2023Northwest Ohio PHP User Group 29

The MVC System

Determines the View to usehttp://www.myapp.com/mycontroller/myaction

04/12/2023Northwest Ohio PHP User Group 30

Modules, Controllers, Actions

Oh My

04/12/2023Northwest Ohio PHP User Group 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

04/12/2023Northwest Ohio PHP User Group 32

04/12/2023Northwest Ohio PHP User Group 33

The DatabaseI couldn’t think of a clever tagline for this one

04/12/2023Northwest Ohio PHP User Group 34

Zend_Db and Zend_Db_Table

Automatically maps a table to an object

Abstracts the DB

04/12/2023Northwest Ohio PHP User Group 35

The Templating System

PHP is a template system!

04/12/2023Northwest Ohio PHP User Group 36

Zend_View

04/12/2023Northwest Ohio PHP User Group 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

04/12/2023Northwest Ohio PHP User Group 38

Other Useful PiecesBecause we’re probably running out of time

04/12/2023Northwest Ohio PHP User Group 39

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

04/12/2023Northwest Ohio PHP User Group 40

Questions?