Zero to Zend Framework in 10 minutes
Upcoming SlideShare
Loading in...5
×
 

Zero to Zend Framework in 10 minutes

on

  • 2,859 views

 

Statistics

Views

Total Views
2,859
Views on SlideShare
2,859
Embed Views
0

Actions

Likes
2
Downloads
43
Comments
0

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as OpenOffice

Usage Rights

CC Attribution-ShareAlike LicenseCC Attribution-ShareAlike License

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Zero to Zend Framework in 10 minutes Zero to Zend Framework in 10 minutes Presentation Transcript

  • From Zero to Zend Framework in 10 Minutes
  • About Me Jeremy Kendall PHP Developer since 2001 Organizer Memphis PHP Contributor to FRAPI project (getfrapi.com) [email_address] @JeremyKendall http://jeremykendall.net
  • What is the Zend Framework?
  • Zend Framework http://framework.zend.com
    • A web application framework implemented in PHP 5.2.4+
    • Version 2.0 is currently in the works (PHP 5.3)
    • License is based on new BSD license
    • Allows for rapid application development
    • Integrates well with other frameworks
    • Can be used “a la carte”
    • Excellent documentation
  • Getting Started . . .
  • . . . can be a real PITA.
  • Maybe I'm just slow?
    • I always forget some important bit of configuration
    • How should I organize my project?
    • Didn't I fix this issue last time?
    • WORK, DAMMIT, WORK!
  • Zend Tool to the Rescue!
  • Zend Tool
    • CLI tooling component
    • Creates an MVC project with a single command
    • Implements best practices
    • Can add additional controllers, views, modules
    • Extensible, configurable
  • The Game Plan
    • Install the Zend Framework
    • Get Zend Tool up and running
    • Create a new Zend Framework Project
    • Create a virtual host
    • Celebrate victory!
  • Assumptions
    • Ubuntu (*nix)
    • PHP 5 (at least 5.2.4)
    • Apache with mod_rewrite
  • Installing the Zend Framework
    • As easy as downloading and extracting
      • Download the full version!
    • Can also checkout or export from SVN
    • Install to directory named for the ZF version
    • My install directory is: ~/phplib/ZendFramework-1.10.6
    • Tip: symlink the install folder to Zend
      • ln -s ZendFramework-<ver> Zend
  • Get Zend Tool Running
    • Multiple methods
      • Install via PEAR
      • Place ZF on include path
      • Link from include path to zf.sh
    • My favorite is a bash alias
      • zf='/home/jkendall/phplib/Zend/bin/zf.sh'
    • Test with zf --help
  • Create a new ZF Project
    • cd into your www root (I use ~/public_html)
    • zf create project ZeroToZF
    • Done!
  • Create your vhost
    • Your new ZF project requires a vhost
    • Use the example vhost from ZeroToZf/docs/README
    • cd into /etc/apache2/sites-available
    • gksudo gedit ZeroToZf.local
    • Copy vhost from README
    • sudo a2ensite ZeroToZf.local
  • Create your vhost
    • gksudo gedit /etc/hosts
    • Add 127.0.0.1 zerotozf.local
    • sudo /etc/init.d/apache2 reload
    • Success?
  • http://zerotozf.local
  • Oops
    • Zend Tool creates a new project
    • Zend Tool does not include the framework in your new project
    • Copy ZendFramework-<ver>/library/Zend into ZeroToZf/library
    • Full path to Zend Log should be:
    • ZeroToZf/library/Zend/Log.php
  • http://zerotozf.local
  • Woohoo!
  • We now have a functional Zend Framework project . . .
  • . . . that does absolutely nothing.
  • What Now?
    • Check out “Getting Started with Zend Framework”
      • http://akrabat.com/zend-framework-tutorial/
    • RTFM
      • http://framework.zend.com/manual/en/
    • Zend Framework Forum
      • http://bit.ly/ZFnabble
    • IRC
      • #zftalk on Freenode
  • Thanks!
      Blog post: http://bit.ly/ZeroToZf [email_address] @JeremyKendall http://jeremykendall.net