2. ABOUT ME
• Software Engineer
• PHP, Ruby, Python, Java, JavaScript
• Mainly web applications
• Framework Experience
• Zend, CodeIgniter, Ruby on Rails, Struts, Drupal (CMS)
• Technology Blog
• http://blog.philipjting.com/
• Follow @philipjting
3. ZEND OVERVIEW
• Enterprise development
• Strong code base
• “It’s like Java for PHP”
• Modular – Use Zend in other applications
• Extensible – Use other applications in Zend
• Community – Active community
• Support – Zend Technologies, thorough
documentation
4. VERSIONS
• ZF1
• MVC (Model View Controller)
• Loosely coupled architecture (modular)
• Lots of plugins
• July 2007
• ZF2
• MOVE (Model Operations Views Events)
• Uses more PHP 5.3 concepts (late static binding, lambdas)
• September 2012 first stable release
5. COMPARISON
• CodeIgniter
• Better than Zend at small applications
• Simpler, smaller, faster, less dependencies
• Not as extensible
• CakePHP
• ZF1 is loosely coupled, CakePHP is less so by comparison
• CakePHP has more “magic”, ZF1 is more customizable
6. DATABASE AND MODEL
• ORM Documentation
• Propel
• Doctrine
• Support for many data stores
• MySQL, MongoDB, Hadoop, etc.
7. REAL WORLD APPLICATION
• Rolled Own Library
• Instead of using ORM
• Factory Pattern
• DBMapper
• Script for creating models
8. REAL WORLD APPLICATION
• Several Zend applications
• Public Facing, Internal applications
• Common shared library
• Models, DBMappers
• JS, CSS libraries
• Good for Enterprise
• Several developers split their work between the applications
• Shared library ensures code reuse
9. REAL WORLD APPLICATION
• PHPUnit Controller Tests
public function testIndexActionShouldContainLoginForm() {
$this->dispatch('/user');
$this->assertAction('index');
$this->assertQueryCount('form#loginForm', 1);
}
10. CONCLUSION
• Zend is great for Enterprise Development
• Extensible, Modular, Reliable
• ZF2 is very different from ZF1
• Not recommended for beginners