sd php zend framework

10
ZEND FRAMEWORK

Upload: philipjting

Post on 26-May-2015

632 views

Category:

Technology


1 download

TRANSCRIPT

Page 1: SD PHP Zend Framework

ZEND FRAMEWORK

Page 2: SD PHP Zend Framework

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

Page 3: SD PHP Zend Framework

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

Page 4: SD PHP Zend Framework

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

Page 5: SD PHP Zend Framework

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

Page 6: SD PHP Zend Framework

DATABASE AND MODEL

• ORM Documentation• Propel• Doctrine

• Support for many data stores• MySQL, MongoDB, Hadoop, etc.

Page 7: SD PHP Zend Framework

REAL WORLD APPLICATION

• Rolled Own Library• Instead of using ORM• Factory Pattern• DBMapper• Script for creating models

Page 8: SD PHP Zend Framework

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

Page 9: SD PHP Zend Framework

REAL WORLD APPLICATION

• PHPUnit Controller Tests

public function testIndexActionShouldContainLoginForm() { $this->dispatch('/user'); $this->assertAction('index'); $this->assertQueryCount('form#loginForm', 1); }

Page 10: SD PHP Zend Framework

CONCLUSION

• Zend is great for Enterprise Development• Extensible, Modular, Reliable

• ZF2 is very different from ZF1• Not recommended for beginners