Integrating symfony and Zend Framework

2,835 views

Published on

The slides for my presentation on using symfony and Zend Framework together in the same project, as given at the phpBenelux September Meeting 2009

Published in: Technology
1 Comment
3 Likes
Statistics
Notes
No Downloads
Views
Total views
2,835
On SlideShare
0
From Embeds
0
Number of Embeds
7
Actions
Shares
0
Downloads
0
Comments
1
Likes
3
Embeds 0
No embeds

No notes for slide

Integrating symfony and Zend Framework

  1. 1. Integrating <ul><li>symfony and Zend Framework </li></ul>phpBenelux meeting, Tilburg, 29-09-2009
  2. 2. Welcome <ul><li>About frameworks </li></ul><ul><li>Zend Framework in symfony projects </li></ul><ul><li>symfony in Zend Framework projects </li></ul>
  3. 3. About me <ul><li>Stefan Koopmanschap </li></ul><ul><li>symfony Community Manager </li></ul><ul><li>Zend Framework Contributor </li></ul>
  4. 4. Frameworks <ul><li>Why? </li></ul><ul><li>Which? </li></ul>
  5. 5. symfony
  6. 6. Zend Framework
  7. 7. integrate
  8. 8. Zend Framework in symfony projects
  9. 9. Getting set up
  10. 10. Getting set up
  11. 11. A quick Twitter call away <ul><li>Blog application </li></ul><ul><li>New way of commenting: via Twitter </li></ul><ul><li>No sfTwitter class </li></ul><ul><li>But wait, there is Zend_Service_Twitter </li></ul>
  12. 12. Send comment
  13. 13. Send comment
  14. 14. Send comment
  15. 15. Comment
  16. 16. Show comments
  17. 17. Show comments
  18. 18. Show comments
  19. 19. Search
  20. 20. Search <ul><li>index my posts </li></ul><ul><li>provide search option </li></ul>
  21. 21. Zend Search Lucene
  22. 22. Index
  23. 23. Index
  24. 24. Index
  25. 25. Index
  26. 26. Search
  27. 27. Index
  28. 28. Search
  29. 29. Search
  30. 30. Search
  31. 31. Recycle <ul><li>Abstract into plugins </li></ul><ul><li>Plugins are PEAR packages </li></ul><ul><li>symfony CLI can install plugins easily </li></ul><ul><li>Many ZF-based plugins already available </li></ul>
  32. 32. Recycle <ul><li>Zend_Mail </li></ul><ul><li>Zend_OpenId </li></ul><ul><li>Zend_Cache </li></ul><ul><li>Zend_Search_Lucene </li></ul>
  33. 33. symfony in Zend Framework projects
  34. 34. Wait, huh? <ul><li>symfony (full stack framework) </li></ul><ul><li>symfony components </li></ul>
  35. 35. Introducing Symfony Components <ul><li>completely decoupled components </li></ul><ul><li>initial work for symfony 1.1 </li></ul><ul><li>now available as seperate libraries </li></ul>
  36. 36. YAML <ul><li>Yaml library </li></ul><ul><li>Yaml to PHP arrays </li></ul><ul><li>PHP arrays to Yaml </li></ul><ul><li>Advanced errors </li></ul>
  37. 37. YAML
  38. 38. YAML
  39. 39. Event Dispatcher <ul><li>Observer design pattern </li></ul><ul><li>Create events </li></ul><ul><li>Register actions </li></ul><ul><li>Actions get triggered </li></ul>
  40. 40. Event Dispatcher bootstrap code from http://www.survivethedeepend.com/
  41. 41. Event Dispatcher
  42. 42. Dependency Injection <ul><li>Dependency Injection container </li></ul><ul><li>Based on Spring framework </li></ul><ul><li>Can contain and instantiate objects </li></ul>
  43. 43. Dependency Injection Example from Ben Eberlei (he rocks!): http://www.whitewashing.de/blog/articles/118
  44. 44. Templating <ul><li>Common templating options </li></ul><ul><li>Object Oriented approach to views </li></ul><ul><li>Helpers, Template autoloading, rendering </li></ul>
  45. 45. Request Handler <ul><li>coming soon </li></ul>
  46. 46. More ... <ul><li>There is much more in the symfony stack </li></ul>
  47. 47. Integration <ul><li>No need to limit yourself </li></ul><ul><li>Pick the right base </li></ul><ul><li>Use external resources </li></ul>
  48. 48. Frameworks <ul><li>Zend Framework </li></ul><ul><li>Symfony Components </li></ul><ul><li>ezComponents </li></ul><ul><li>PEAR </li></ul><ul><li>Prado </li></ul><ul><li>Solar </li></ul><ul><li>many more ... </li></ul>
  49. 49. Questions?
  50. 50. <ul><li>http://www.leftontheweb.com </li></ul><ul><li>http://twitter.com/skoop </li></ul><ul><li>http://slideshare.net/skoop </li></ul>

×