Zero to Zend Framework in 10 minutes
-
Upload
jeremy-kendall -
Category
Technology
-
view
2.243 -
download
4
Transcript of Zero to Zend Framework in 10 minutes
- 1. From Zero toZend Frameworkin 10 Minutes
2. About Me Jeremy Kendall PHP Developer since 2001 Organizer Memphis PHP Contributor to FRAPI project (getfrapi.com) [email_address] @JeremyKendall http://jeremykendall.net 3. What is the Zend Framework? 4. Zend Framework http://framework.zend.com
- A web application framework implemented in PHP 5.2.4+
5. Version 2.0 is currently in the works (PHP 5.3) 6. License is based on new BSD license 7. Allows for rapid application development 8. Integrates well with other frameworks 9. Can be used a la carte 10. Excellent documentation 11. Getting Started . . . 12. . . . can be a real PITA. 13. Maybe I'm just slow?
- I always forget some important bit of configuration
14. How should I organize my project? 15. Didn't I fix this issue last time? 16. WORK, DAMMIT, WORK! 17. Zend Tool to the Rescue! 18. Zend Tool
- CLI tooling component
19. Creates an MVC project with a single command 20. Implements best practices 21. Can add additional controllers, views, modules 22. Extensible, configurable 23. The Game Plan
- Install the Zend Framework
24. Get Zend Tool up and running 25. Create a new Zend Framework Project 26. Create a virtual host 27. Celebrate victory! 28. Assumptions
- Ubuntu (*nix)
29. PHP 5 (at least 5.2.4) 30. Apache with mod_rewrite 31. Installing the Zend Framework
- As easy as downloading and extracting
- Download the full version!
Can also checkout or export from SVN 32. Install to directory named for the ZF version 33. My install directory is:~/phplib/ZendFramework-1.10.6 34. Tip: symlink the install folder to Zend
- ln -s ZendFramework- Zend
35. Get Zend Tool Running
- Multiple methods
- Install via PEAR
36. Place ZF on include path 37. Link from include path to zf.sh My favorite is a bash alias
- zf='/home/jkendall/phplib/Zend/bin/zf.sh'
Test withzf --help 38. Create a new ZF Project
- cd into your www root (I use ~/public_html)
39. zf create project ZeroToZF 40. Done! 41. Create your vhost
- Your new ZF project requires a vhost
42. Use the example vhost fromZeroToZf/docs/README 43. cd into/etc/apache2/sites-available 44. gksudo gedit ZeroToZf.local 45. Copy vhost from README 46. sudo a2ensite ZeroToZf.local 47. Create your vhost
- gksudo gedit /etc/hosts
48. Add127.0.0.1 zerotozf.local 49. sudo /etc/init.d/apache2 reload 50. Success? 51. http://zerotozf.local 52. Oops
- Zend Tool creates a new project
53. Zend Tooldoes notinclude the framework in your new project 54. CopyZendFramework-/library/ZendintoZeroToZf/library 55. Full path to Zend Log should be: 56. ZeroToZf/library/Zend/Log.php 57. http://zerotozf.local 58. Woohoo! 59. We now have a functional Zend Framework project . . . 60. . . . that does absolutely nothing. 61. 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
62. Thanks!
- Blog post:http://bit.ly/ZeroToZf [email_address] @JeremyKendall http://jeremykendall.net