Zend Framework...without inhaling

2,016 views

Published on

Have you been reviewing all Zend Framework has to offer but aren't sure how to integrate it with your existing code? How can you begin taking advantage of Zend Framework without having to fully adopt the MVC architecture? What do you do when you later want to being using MVC? Hint: You don't have to throw away any of your code! This session will present ideas and examples on how you can integrate Zend Framework alongside your existing code base with minimal need for future re-factoring.

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
2,016
On SlideShare
0
From Embeds
0
Number of Embeds
5
Actions
Shares
0
Downloads
0
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide













  • Load http://dtf1.jeremy.local -> Currency conversion



  • A lot of home-grown systems (those not using a framework) have their own autoloaders they are using.


  • Load http://dtf2.jeremy.local



  • Building models
  • Very good thing.
    MVC is an implementation of it.

  • Load http://dtf3.jeremy.local

  • 2nd bullet caveat - on a per-functionality basis (such as “Comments” in this presentation’s example)
  • 2nd bullet caveat - on a per-functionality basis (such as “Comments” in this presentation’s example)
  • Jumping feet first


  • Load http://dtf3.jeremy.local





  • Zend Framework...without inhaling

    1. 1. Zend Framework ...without inhaling Dallas TechFest 2010 Jeremy Brown
    2. 2. About Me Zend Certified Engineer Coding PHP since 1999 (PHP 3) Using Zend Framework since 2008 (ver. 1.0.4) All-around cool guy
    3. 3. About Me Zend Certified Engineer Coding PHP since 1999 (PHP 3) Using Zend Framework since 2008 (ver. 1.0.4) All-around cool guy image source: http://i78.photobucket.com/albums/j86/Goku1983d/cover-fonz.jpg
    4. 4. Contact Me Blog: http://www.notmessenger.com Twitter: @notmessenger Email: jeremy@notmessenger.com IRC: #zftalk #dallasphp (irc.freenode.net)
    5. 5. Contact Me Blog: http://www.notmessenger.com Twitter: @notmessenger Email: jeremy@notmessenger.com IRC: #zftalk #dallasphp (irc.freenode.net) image source: http://i71.photobucket.com/albums/i159/tekkaus/Tekkaus-msn-chatsleep.jpg
    6. 6. About This Presentation Slides, code examples and video recording at notmessenger.com/presentations Provide feedback via Joind.in at http://joind.in/talk/view/1782
    7. 7. About You
    8. 8. About You How many of you have played with or used Zend Framework before?
    9. 9. About You How many of you have played with or used Zend Framework before? How many of you have heard of Zend Framework before?
    10. 10. About You How many of you have played with or used Zend Framework before? How many of you have heard of Zend Framework before? How many of you realize you’re in the wrong session? image source: http://www.mind-body-science.com/images/frantic.jpg
    11. 11. Absolute easiest way
    12. 12. Absolute easiest way image source: http://www.quantum360.co.uk/Portals/0/images/easy%20image.jpg
    13. 13. Use-at-will architecture Loosely-coupled components Minimal interdependencies
    14. 14. image source: http://www.pulpinternational.com/images/postimg/intermission%2002.jpg
    15. 15. image source: http://oneparticularwave.files.wordpress.com/2006/09/color_bars.jpg
    16. 16. Recap Can easily use a Zend_? module as needed Simply add Zend Framework to include path Zend_Loader_Autoloader does all the work for you
    17. 17. Recap Can easily use a Zend_? module as needed Simply add Zend Framework to include path Zend_Loader_Autoloader does all the work for you image source: http://www.quantum360.co.uk/Portals/0/images/easy%20image.jpg
    18. 18. Add new functionality to existing codebase image source: http://aimeegd.files.wordpress.com/2009/04/bricks2.jpg
    19. 19. How does it play with existing auto loaders?
    20. 20. How does it play with existing auto loaders? Nicely!
    21. 21. How does it play with existing auto loaders? Nicely! That’s it. Better than ‘horribly’, right?
    22. 22. image source: http://www.pulpinternational.com/images/postimg/intermission%2002.jpg
    23. 23. image source: http://oneparticularwave.files.wordpress.com/2006/09/color_bars.jpg
    24. 24. Recap Can continue to use own autoloader. Zend Framework’s autoloader can also be used. Result? Can easily add new functionality implementing Zend Framework code into existing codebase.
    25. 25. Recap Can continue to use own autoloader. Zend Framework’s autoloader can also be used. Result? Can easily add new functionality implementing Zend Framework code into existing codebase. image source: http://www.quantum360.co.uk/Portals/0/images/easy%20image.jpg
    26. 26. Planning Ahead image source: http://www.gapingvoid.com/we%20had%20a%20plan.jpg
    27. 27. Separation of concerns Previous examples had none or very little Model, View, Controller (MVC) Models == data and/or business logic In Zend Framework, Models are implemented as objects
    28. 28. image source: http://www.pulpinternational.com/images/postimg/intermission%2002.jpg
    29. 29. image source: http://oneparticularwave.files.wordpress.com/2006/09/color_bars.jpg
    30. 30. Recap Write all new functionality as objects - you will need them in Zend Framework A large part of the “M” in “MVC” (Model) already coded - less work later Easy to later separate the “VC” parts of “MVC” (View-Controller)
    31. 31. Recap Write all new functionality as objects - you will need them in Zend Framework A large part of the “M” in “MVC” (Model) already coded - less work later Easy to later separate the “VC” parts of “MVC” (View-Controller) image source: http://www.quantum360.co.uk/Portals/0/images/easy%20image.jpg
    32. 32. Migrate existing site
    33. 33. Migrate existing site image source: http://farm1.static.flickr.com/100/308786610_f147876c71_o.jpg
    34. 34. Never stop developing Apache mod_rewrite rules (and IIS equivalents) All requests get routed to/through the Front Controller Leverage this to convert specific pages or sections at a time
    35. 35. image source: http://www.pulpinternational.com/images/postimg/intermission%2002.jpg
    36. 36. image source: http://oneparticularwave.files.wordpress.com/2006/09/color_bars.jpg
    37. 37. Recap Rewrite rules make it very easy to convert existing sites to Zend Framework Existing pages or sections can be migrated at own pace Old and new code can be maintained simultaneously
    38. 38. Recap Rewrite rules make it very easy to convert existing sites to Zend Framework Existing pages or sections can be migrated at own pace Old and new code can be maintained simultaneously Now that was easy! image source: http://www.quantum360.co.uk/Portals/0/images/easy%20image.jpg
    39. 39. Thank you Slides, code examples and video recording at notmessenger.com/presentations Provide feedback via Joind.in at http://joind.in/talk/view/1782

    ×