Page 1
Zend Framework from the Command Line
(Zend Framework Party Tricks)
Page 3
Three ways
The Easy Way
Page 4
Three ways
The Easy Way The Hard Way
Page 5
Three ways
The Easy Way The Hard Way The Stupid Way
Page 6
The Easy Way
curl, wget, etc. Handy tools
Page 7
The Easy Way
curl, wget, etc. Handy tools Easy to “cron” a process
Page 8
The Easy Way
curl, wget, etc. Handy tools Easy to “cron” a process Unnecessary overhead
Page 9
The Hard Way
Zend Tool Good tool for what it does
Page 10
The Hard Way
Zend Tool Good tool for what it does Easy to get started
Page 11
The Hard Way
Zend Tool Good tool for what it does Easy to get started Difficult to extend
Page 12
The Hard Way
Zend Tool Good tool for what it does Easy to get started Difficult to extend Not designed for the types of tasks we are
trying to solve.
Page 13
The Stupid Way
My Way
Page 14
The Stupid Way
My Way Real cli applications but written using
Zend Framework and MVC (Well, M&C, there’s not much V)
Page 15
Why My Way
No new skills to learn
Page 16
Why My Way
No new skills to learn All your favorite friends are there
Page 17
Why My Way
No new skills to learn All your favorite friends are there Easy to repurpose code
Page 18
Clearing the Cache
From the Masterwork “Guide to Programming with Zend Framework”
Page 19
Clearing the Cache
From the Masterwork “Guide to Programming with Zend Framework”
Using existing code and methods from the cli
Page 20
Clearing the Cache
From the Masterwork “Guide to Programming with Zend Framework”
Using existing code and methods from the cli
My first attempt at a cli using ZF.
Page 21
Show Code Here
clearCache.phpCal/Request/Cli.php
Cal/Router.php
Page 22
makeDomain
Scratches an itch
Page 23
makeDomain
Scratches an itch Must be run as root because it restarts
services
Page 24
makeDomain
Scratches an itch Must be run as root because it restarts
services Very specific tool but solves a specific
problem.
Page 25
Show Code Here
makeDomain.php
Page 27
Who Am I?
Cal EvansDirector of the PCE, Ibuildings
http://techportal.ibuildings.comhttp://blog.calevans.comhttp://twitter.com/[email protected] @calevans.comAIM:[email protected] : cevans-ibuildings