Beyond Frameworks

  • 8,308 views
Uploaded on

The slides from my PHPUK 2011 conference talk on how to use an application framework without becoming a hostage to it.

The slides from my PHPUK 2011 conference talk on how to use an application framework without becoming a hostage to it.

More in: Technology
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
  • This is a nice presentation. I actually use those component models without using a framework actually. And it has been quite nice so far. It very much makes sense to decouple and to layer out codes.
    Are you sure you want to
    Your message goes here
  • Fala da importância de se separar os componentes para não ficar preso a frameworks.
    Are you sure you want to
    Your message goes here
  • awesome
    Are you sure you want to
    Your message goes here
No Downloads

Views

Total Views
8,308
On Slideshare
0
From Embeds
0
Number of Embeds
7

Actions

Shares
Downloads
243
Comments
3
Likes
26

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. Beyond FrameworksUsing Frameworks WithoutBecoming A Hostage To Them Stuart Herbert stuart@stuartherbert.com - http://blog.stuartherbert.com/php/
  • 2. About Stuart • Head of Engineering, Gradwell.com • Co-author, Zend Certification Study Guide for PHP 4 • Open-source Contributor Since 1994Beyond Frameworks Stuart Herbert - http://blog.stuartherbert.com/php/
  • 3. About Stuart • Head of Engineering, Gradwell.com • Co-author, Zend Certification Study Guide for PHP 4 • Open-source Contributor Since 1994Beyond Frameworks Stuart Herbert - http://blog.stuartherbert.com/php/
  • 4. About Stuart • Head of Engineering, Gradwell.com • Co-author, Zend Certification Study Guide for PHP 4 • Open-source Contributor Since 1994Beyond Frameworks Stuart Herbert - http://blog.stuartherbert.com/php/
  • 5. Contents How Frameworks 1 Have Held Us HostageBeyond Frameworks Stuart Herbert - http://blog.stuartherbert.com/php/
  • 6. Contents Our Layered Architecture 2 For PHP ApplicationsBeyond Frameworks Stuart Herbert - http://blog.stuartherbert.com/php/
  • 7. Contents What Makes 3 A Good Component?Beyond Frameworks Stuart Herbert - http://blog.stuartherbert.com/php/
  • 8. Contents How Components 4 Are Helping GradwellBeyond Frameworks Stuart Herbert - http://blog.stuartherbert.com/php/
  • 9. Questions At The End, PleaseBeyond Frameworks Stuart Herbert - http://blog.stuartherbert.com/php/
  • 10. Questions For The Audience ...Beyond Frameworks Stuart Herbert - http://blog.stuartherbert.com/php/
  • 11. http://flic.kr/p/R33dr Who Uses A Framework?Beyond Frameworks Stuart Herbert - http://blog.stuartherbert.com/php/
  • 12. http://flic.kr/p/qq6F1 Who Develops Software Products?Beyond Frameworks Stuart Herbert - http://blog.stuartherbert.com/php/
  • 13. 1: Hostages To FrameworksBeyond Frameworks Stuart Herbert - http://blog.stuartherbert.com/php/
  • 14. Stop Me If You’ve Heard This One Before ...Beyond Frameworks Stuart Herbert - http://blog.stuartherbert.com/php/
  • 15. First generation apps are highly-coupled Neat until you attempt to untangle them! http://flic.kr/p/7MmEivBeyond Frameworks Stuart Herbert - http://blog.stuartherbert.com/php/
  • 16. First generation apps are highly-coupled Neat until you attempt to untangle them! http://flic.kr/p/7MmEivBeyond Frameworks Stuart Herbert - http://blog.stuartherbert.com/php/
  • 17. Second generation app built on top of own framework Developers enjoyed building it But they hated completing it or maintaining it http://flic.kr/p/4sK29VBeyond Frameworks Stuart Herbert - http://blog.stuartherbert.com/php/
  • 18. Second generation app built on top of own framework Developers enjoyed building it But they hated completing it or maintaining it http://flic.kr/p/4sK29VBeyond Frameworks Stuart Herbert - http://blog.stuartherbert.com/php/
  • 19. Second generation app built on top of own framework Developers enjoyed building it But they hated completing it or maintaining it http://flic.kr/p/4sK29VBeyond Frameworks Stuart Herbert - http://blog.stuartherbert.com/php/
  • 20. So We Used A Popular Framework ...Beyond Frameworks Stuart Herbert - http://blog.stuartherbert.com/php/
  • 21. ... Or Two ...Beyond Frameworks Stuart Herbert - http://blog.stuartherbert.com/php/
  • 22. Third generation app easy to extend ... after the steep learning curve http://flic.kr/p/2k87DMBeyond Frameworks Stuart Herbert - http://blog.stuartherbert.com/php/
  • 23. Third generation app easy to extend ... after the steep learning curve http://flic.kr/p/2k87DMBeyond Frameworks Stuart Herbert - http://blog.stuartherbert.com/php/
  • 24. We couldn’t get the code out to re-use in other apps :( http://flic.kr/p/7132WmBeyond Frameworks Stuart Herbert - http://blog.stuartherbert.com/php/
  • 25. What The Architecture Should Look Like Framework Your Code PluginsBeyond Frameworks Stuart Herbert - http://blog.stuartherbert.com/php/
  • 26. What Happened In Reality :( Framework Your Code PluginsBeyond Frameworks Stuart Herbert - http://blog.stuartherbert.com/php/
  • 27. What Practical Challenges Does This Create?Beyond Frameworks Stuart Herbert - http://blog.stuartherbert.com/php/
  • 28. How long would it take to upgrade your app to the next major version of the framework? Would you do the upgrade, or stick with the current framework version? http://flic.kr/p/5Z6ArfBeyond Frameworks Stuart Herbert - http://blog.stuartherbert.com/php/
  • 29. How long would it take to upgrade your app to the next major version of the framework? Would you do the upgrade, or stick with the current framework version? http://flic.kr/p/5Z6ArfBeyond Frameworks Stuart Herbert - http://blog.stuartherbert.com/php/
  • 30. What would it take to switch your app to a different framework? Could you port your code, or would you be forced to rewrite all or most of it? http://flic.kr/p/4Z8oZEBeyond Frameworks Stuart Herbert - http://blog.stuartherbert.com/php/
  • 31. What would it take to switch your app to a different framework? Could you port your code, or would you be forced to rewrite all or most of it? http://flic.kr/p/4Z8oZEBeyond Frameworks Stuart Herbert - http://blog.stuartherbert.com/php/
  • 32. How would you re-use some of your app’s code in a different app? Especially if the other app doesn’t use the same framework? http://flic.kr/p/85jzRABeyond Frameworks Stuart Herbert - http://blog.stuartherbert.com/php/
  • 33. How would you re-use some of your app’s code in a different app? Especially if the other app doesn’t use the same framework? http://flic.kr/p/85jzRABeyond Frameworks Stuart Herbert - http://blog.stuartherbert.com/php/
  • 34. How would you outsource some of your app development to teams around the world? How would you accept the work delivered back to you? http://flic.kr/p/6GMfQcBeyond Frameworks Stuart Herbert - http://blog.stuartherbert.com/php/
  • 35. How would you outsource some of your app development to teams around the world? How would you accept the work delivered back to you? http://flic.kr/p/6GMfQcBeyond Frameworks Stuart Herbert - http://blog.stuartherbert.com/php/
  • 36. We Need To Change This ... Framework Your Code PluginsBeyond Frameworks Stuart Herbert - http://blog.stuartherbert.com/php/
  • 37. To What ...?Beyond Frameworks Stuart Herbert - http://blog.stuartherbert.com/php/
  • 38. 2: Layered ApproachBeyond Frameworks Stuart Herbert - http://blog.stuartherbert.com/php/
  • 39. Let’s Take The Original Architecture ... Application Frameworks Your Code PluginsBeyond Frameworks Stuart Herbert - http://blog.stuartherbert.com/php/
  • 40. ... And Make The App As Thin As Possible Application Frameworks App Code PluginsBeyond Frameworks Stuart Herbert - http://blog.stuartherbert.com/php/
  • 41. By Extracting Out ... Application Frameworks App Code Plugins Business LogicBeyond Frameworks Stuart Herbert - http://blog.stuartherbert.com/php/
  • 42. By Extracting Out ... Application Frameworks App Code Plugins Business Logic Data ModelBeyond Frameworks Stuart Herbert - http://blog.stuartherbert.com/php/
  • 43. By Extracting Out ... Application Frameworks App Code Plugins Business Logic Data Model UtilitiesBeyond Frameworks Stuart Herbert - http://blog.stuartherbert.com/php/
  • 44. ... Into Independent Libraries Of Code Application Frameworks App Code Plugins Components Business Logic Data Model UtilitiesBeyond Frameworks Stuart Herbert - http://blog.stuartherbert.com/php/
  • 45. Use An Autoloader To Pull In These New Components Application Frameworks App Code Plugins Autoloader Components Business Logic Data Model UtilitiesBeyond Frameworks Stuart Herbert - http://blog.stuartherbert.com/php/
  • 46. This Gives You A Larger Set Of Reusable Code Application Frameworks App Code Plugins Autoloader Components Business Logic Data Model UtilitiesBeyond Frameworks Stuart Herbert - http://blog.stuartherbert.com/php/
  • 47. The Frameworked App Becomes A Thin Layer On Top Of Framework-agnostic Reusable ComponentsBeyond Frameworks Stuart Herbert - http://blog.stuartherbert.com/php/
  • 48. Layered Architecture Application Frameworks App Code Plugins Autoloader Components Business Logic Data Model UtilitiesBeyond Frameworks Stuart Herbert - http://blog.stuartherbert.com/php/
  • 49. Layered Architecture Application ComponentsBeyond Frameworks Stuart Herbert - http://blog.stuartherbert.com/php/
  • 50. Why Components? • Completely independent of Business Logic the framework • Built & tested in isolation of your app code Data Model • Can be built by different teams • Don’t have to change when Utilities the framework changesBeyond Frameworks Stuart Herbert - http://blog.stuartherbert.com/php/
  • 51. Why Components? • Completely independent of Business Logic the framework • Built & tested in isolation of your app code Data Model • Can be built by different teams • Don’t have to change when Utilities the framework changesBeyond Frameworks Stuart Herbert - http://blog.stuartherbert.com/php/
  • 52. Why Components? • Completely independent of Business Logic the framework • Built & tested in isolation of your app code Data Model • Can be built by different teams • Don’t have to change when Utilities the framework changesBeyond Frameworks Stuart Herbert - http://blog.stuartherbert.com/php/
  • 53. Why Components? • Completely independent of Business Logic the framework • Built & tested in isolation of your app code Data Model • Can be built by different teams • Don’t have to change when Utilities the framework changesBeyond Frameworks Stuart Herbert - http://blog.stuartherbert.com/php/
  • 54. Why Components? • Reduces the Big Ball of Business Logic String Syndrome • Mindset change to light apps on top of rich service layer Data Model • Improves development in parallel of apps & services • Injects additional discipline Utilities into development teamsBeyond Frameworks Stuart Herbert - http://blog.stuartherbert.com/php/
  • 55. Why Components? • Reduces the Big Ball of Business Logic String Syndrome • Mindset change to light apps on top of rich service layer Data Model • Improves development in parallel of apps & services • Injects additional discipline Utilities into development teamsBeyond Frameworks Stuart Herbert - http://blog.stuartherbert.com/php/
  • 56. Why Components? • Reduces the Big Ball of Business Logic String Syndrome • Mindset change to light apps on top of rich service layer Data Model • Improves development in parallel of apps & services • Injects additional discipline Utilities into development teamsBeyond Frameworks Stuart Herbert - http://blog.stuartherbert.com/php/
  • 57. Why Components? • Reduces the Big Ball of Business Logic String Syndrome • Mindset change to light apps on top of rich service layer Data Model • Improves development in parallel of apps & services • Injects additional discipline Utilities into development teamsBeyond Frameworks Stuart Herbert - http://blog.stuartherbert.com/php/
  • 58. Others Already Do ThisBeyond Frameworks Stuart Herbert - http://blog.stuartherbert.com/php/
  • 59. http://flic.kr/p/5oewwy Perl Has CPAN ModulesBeyond Frameworks Stuart Herbert - http://blog.stuartherbert.com/php/
  • 60. http://flic.kr/p/uyMuU Ruby Has GemsBeyond Frameworks Stuart Herbert - http://blog.stuartherbert.com/php/
  • 61. What Makes A Good Component?Beyond Frameworks Stuart Herbert - http://blog.stuartherbert.com/php/
  • 62. 3: Good ComponentsBeyond Frameworks Stuart Herbert - http://blog.stuartherbert.com/php/
  • 63. Component Standards • Common standards • Reusable by many • Interoperable • TrustableBeyond Frameworks Stuart Herbert - http://blog.stuartherbert.com/php/
  • 64. Component Standards • Common standards • Reusable by many • Interoperable • TrustableBeyond Frameworks Stuart Herbert - http://blog.stuartherbert.com/php/
  • 65. Component Standards • Common standards • Reusable by many • Interoperable • TrustableBeyond Frameworks Stuart Herbert - http://blog.stuartherbert.com/php/
  • 66. Component Standards • Common standards • Reusable by many • Interoperable • TrustableBeyond Frameworks Stuart Herbert - http://blog.stuartherbert.com/php/
  • 67. Good Components ... • Autoload • Are well tested • Are well documented • Are easy to install • Don’t break backwards compatibility by surpriseBeyond Frameworks Stuart Herbert - http://blog.stuartherbert.com/php/
  • 68. Good Components ... • Autoload • Are well tested • Are well documented • Are easy to install • Don’t break backwards compatibility by surpriseBeyond Frameworks Stuart Herbert - http://blog.stuartherbert.com/php/
  • 69. Good Components ... • Autoload • Are well tested • Are well documented • Are easy to install • Don’t break backwards compatibility by surpriseBeyond Frameworks Stuart Herbert - http://blog.stuartherbert.com/php/
  • 70. Good Components ... • Autoload • Are well tested • Are well documented • Are easy to install • Don’t break backwards compatibility by surpriseBeyond Frameworks Stuart Herbert - http://blog.stuartherbert.com/php/
  • 71. Good Components ... • Autoload • Are well tested • Are well documented • Are easy to install • Don’t break backwards compatibility by surpriseBeyond Frameworks Stuart Herbert - http://blog.stuartherbert.com/php/
  • 72. Keep Components Outside Of Your App Application Frameworks App Code Plugins Components Business Logic Data Model UtilitiesBeyond Frameworks Stuart Herbert - http://blog.stuartherbert.com/php/
  • 73. Use An Autoloader To Pull In Components Application Frameworks App Code Plugins Autoloader Components Business Logic Data Model UtilitiesBeyond Frameworks Stuart Herbert - http://blog.stuartherbert.com/php/
  • 74. Why Use An Autoloader? Application Frameworks App Code Plugins Autoloader Components Business Logic Data Model UtilitiesBeyond Frameworks Stuart Herbert - http://blog.stuartherbert.com/php/
  • 75. Autoloading Makes Life Easy! Application Frameworks App Code Plugins Autoloader Components Business Logic Data Model UtilitiesBeyond Frameworks Stuart Herbert - http://blog.stuartherbert.com/php/
  • 76. One True Autoloader • Who has heard of PSR0? • http://groups.google.com/group/php- standards/web/psr-0-final-proposal • Backed by leading names in the community • Perfect for a component approachBeyond Frameworks Stuart Herbert - http://blog.stuartherbert.com/php/
  • 77. One True Autoloader • Who has heard of PSR0? • http://groups.google.com/group/php- standards/web/psr-0-final-proposal • Backed by leading names in the community • Perfect for a component approachBeyond Frameworks Stuart Herbert - http://blog.stuartherbert.com/php/
  • 78. One True Autoloader • Who has heard of PSR0? • http://groups.google.com/group/php- standards/web/psr-0-final-proposal • Backed by leading names in the community • Perfect for a component approachBeyond Frameworks Stuart Herbert - http://blog.stuartherbert.com/php/
  • 79. One True Autoloader • Who has heard of PSR0? • http://groups.google.com/group/php- standards/web/psr-0-final-proposal • Backed by leading names in the community • Perfect for a component approachBeyond Frameworks Stuart Herbert - http://blog.stuartherbert.com/php/
  • 80. PSR0 Autoloader • Namespace separators ‘’ become DIRECTORY_SEPARATOR • Underscore in class names ‘_’ become DIRECTORY_SEPARATOR • Top namespace is your organisation • Achieves 1:1 mapping from classname to filename on diskBeyond Frameworks Stuart Herbert - http://blog.stuartherbert.com/php/
  • 81. PSR0 Autoloader • Namespace separators ‘’ become DIRECTORY_SEPARATOR • Underscore in class names ‘_’ become DIRECTORY_SEPARATOR • Top namespace is your organisation • Achieves 1:1 mapping from classname to filename on diskBeyond Frameworks Stuart Herbert - http://blog.stuartherbert.com/php/
  • 82. PSR0 Autoloader • Namespace separators ‘’ become DIRECTORY_SEPARATOR • Underscore in class names ‘_’ become DIRECTORY_SEPARATOR • Top namespace is your organisation • Achieves 1:1 mapping from classname to filename on diskBeyond Frameworks Stuart Herbert - http://blog.stuartherbert.com/php/
  • 83. PSR0 Autoloader • Namespace separators ‘’ become DIRECTORY_SEPARATOR • Underscore in class names ‘_’ become DIRECTORY_SEPARATOR • Top namespace is your organisation • Achieves 1:1 mapping from classname to filename on diskBeyond Frameworks Stuart Herbert - http://blog.stuartherbert.com/php/
  • 84. Autoloader Examples • Phin_ProjectExtenderLibFileLoader -> Phin_Project/ExtenderLib/FileLoader.php • Phin_ProjectConsoleStd_Out -> Phin_Project/Console/Std/Out.phpBeyond Frameworks Stuart Herbert - http://blog.stuartherbert.com/php/
  • 85. Autoloader Examples • Phin_ProjectExtenderLibFileLoader -> Phin_Project/ExtenderLib/FileLoader.php • Phin_ProjectConsoleStd_Out -> Phin_Project/Console/Std/Out.phpBeyond Frameworks Stuart Herbert - http://blog.stuartherbert.com/php/
  • 86. Autoloader Component • pear channel-discover pear.gradwell.com • pear install Gradwell/AutoloaderBeyond Frameworks Stuart Herbert - http://blog.stuartherbert.com/php/
  • 87. Autoloader Component • pear channel-discover pear.gradwell.com • pear install Gradwell/AutoloaderBeyond Frameworks Stuart Herbert - http://blog.stuartherbert.com/php/
  • 88. Testing http://flic.kr/p/3c2W8qBeyond Frameworks Stuart Herbert - http://blog.stuartherbert.com/php/
  • 89. PHPUnit • De-facto standard for unit-testing PHP code • Supported by leading IDEs • Supported by CI environments • Perfect for use with componentsBeyond Frameworks Stuart Herbert - http://blog.stuartherbert.com/php/
  • 90. PHPUnit • De-facto standard for unit-testing PHP code • Supported by leading IDEs • Supported by CI environments • Perfect for use with componentsBeyond Frameworks Stuart Herbert - http://blog.stuartherbert.com/php/
  • 91. PHPUnit • De-facto standard for unit-testing PHP code • Supported by leading IDEs • Supported by CI environments • Perfect for use with componentsBeyond Frameworks Stuart Herbert - http://blog.stuartherbert.com/php/
  • 92. PHPUnit • De-facto standard for unit-testing PHP code • Supported by leading IDEs • Supported by CI environments • Perfect for use with componentsBeyond Frameworks Stuart Herbert - http://blog.stuartherbert.com/php/
  • 93. Good Tests ... • Document supported behaviour • Have separate tests for reported bugs • Cover 100% of the component’s code • Ship with the componentBeyond Frameworks Stuart Herbert - http://blog.stuartherbert.com/php/
  • 94. Good Tests ... • Document supported behaviour • Have separate tests for reported bugs • Cover 100% of the component’s code • Ship with the componentBeyond Frameworks Stuart Herbert - http://blog.stuartherbert.com/php/
  • 95. Good Tests ... • Document supported behaviour • Have separate tests for reported bugs • Cover 100% of the component’s code • Ship with the componentBeyond Frameworks Stuart Herbert - http://blog.stuartherbert.com/php/
  • 96. Good Tests ... • Document supported behaviour • Have separate tests for reported bugs • Cover 100% of the component’s code • Ship with the componentBeyond Frameworks Stuart Herbert - http://blog.stuartherbert.com/php/
  • 97. Getting PHPUnit • Visit www.phpunit.deBeyond Frameworks Stuart Herbert - http://blog.stuartherbert.com/php/
  • 98. Documentation http://flic.kr/p/6wuB99Beyond Frameworks Stuart Herbert - http://blog.stuartherbert.com/php/
  • 99. The PHP Manual Is One Of PHP’s Killer FeaturesBeyond Frameworks Stuart Herbert - http://blog.stuartherbert.com/php/
  • 100. Make Your Documentation At Least As Good!Beyond Frameworks Stuart Herbert - http://blog.stuartherbert.com/php/
  • 101. Good Documentation • Explain how to load the component • Describe how you intend it to be used • Give several (non-trivial!) examples • Capture notes / FAQsBeyond Frameworks Stuart Herbert - http://blog.stuartherbert.com/php/
  • 102. Good Documentation • Explain how to load the component • Describe how you intend it to be used • Give several (non-trivial!) examples • Capture notes / FAQsBeyond Frameworks Stuart Herbert - http://blog.stuartherbert.com/php/
  • 103. Good Documentation • Explain how to load the component • Describe how you intend it to be used • Give several (non-trivial!) examples • Capture notes / FAQsBeyond Frameworks Stuart Herbert - http://blog.stuartherbert.com/php/
  • 104. Good Documentation • Explain how to load the component • Describe how you intend it to be used • Give several (non-trivial!) examples • Capture notes / FAQsBeyond Frameworks Stuart Herbert - http://blog.stuartherbert.com/php/
  • 105. Write It Down ... • ... so you don’t have to remember • ... so you don’t have to keep explaining it to others • ... so you don’t have to read the source • ... so that others are more likely to reuse your effortsBeyond Frameworks Stuart Herbert - http://blog.stuartherbert.com/php/
  • 106. Write It Down ... • ... so you don’t have to remember • ... so you don’t have to keep explaining it to others • ... so you don’t have to read the source • ... so that others are more likely to reuse your effortsBeyond Frameworks Stuart Herbert - http://blog.stuartherbert.com/php/
  • 107. Write It Down ... • ... so you don’t have to remember • ... so you don’t have to keep explaining it to others • ... so you don’t have to read the source • ... so that others are more likely to reuse your effortsBeyond Frameworks Stuart Herbert - http://blog.stuartherbert.com/php/
  • 108. Write It Down ... • ... so you don’t have to remember • ... so you don’t have to keep explaining it to others • ... so you don’t have to read the source • ... so that others are more likely to reuse your effortsBeyond Frameworks Stuart Herbert - http://blog.stuartherbert.com/php/
  • 109. Docbook a la PHPUnit www.phpunit.de/manual/3.5/en/Beyond Frameworks Stuart Herbert - http://blog.stuartherbert.com/php/
  • 110. What About phpDoc? • Useful for IDE code auto-completion • Useful as a summary of a method’s purpose • Reference documentation, not a manualBeyond Frameworks Stuart Herbert - http://blog.stuartherbert.com/php/
  • 111. What About phpDoc? • Useful for IDE code auto-completion • Useful as a summary of a method’s purpose • Reference documentation, not a manualBeyond Frameworks Stuart Herbert - http://blog.stuartherbert.com/php/
  • 112. What About phpDoc? • Useful for IDE code auto-completion • Useful as a summary of a method’s purpose • Reference documentation, not a manualBeyond Frameworks Stuart Herbert - http://blog.stuartherbert.com/php/
  • 113. Packaging & Installation http://flic.kr/p/41vMUJBeyond Frameworks Stuart Herbert - http://blog.stuartherbert.com/php/
  • 114. PEAR Installer • Love it or hate it, PEAR package format is a community-created solution • PEAR installer found on most computers • Supports installing both system-wide and into a sandbox • Simple to publish your own package repoBeyond Frameworks Stuart Herbert - http://blog.stuartherbert.com/php/
  • 115. PEAR Installer • Love it or hate it, PEAR package format is a community-created solution • PEAR installer found on most computers • Supports installing both system-wide and into a sandbox • Simple to publish your own package repoBeyond Frameworks Stuart Herbert - http://blog.stuartherbert.com/php/
  • 116. PEAR Installer • Love it or hate it, PEAR package format is a community-created solution • PEAR installer found on most computers • Supports installing both system-wide and into a sandbox • Simple to publish your own package repoBeyond Frameworks Stuart Herbert - http://blog.stuartherbert.com/php/
  • 117. PEAR Installer • Love it or hate it, PEAR package format is a community-created solution • PEAR installer found on most computers • Supports installing both system-wide and into a sandbox • Simple to publish your own package repoBeyond Frameworks Stuart Herbert - http://blog.stuartherbert.com/php/
  • 118. Pirum http://www.pirum-project.org/Beyond Frameworks Stuart Herbert - http://blog.stuartherbert.com/php/
  • 119. Your Own PEAR Channel pear channel-discover pear.gradwell.comBeyond Frameworks Stuart Herbert - http://blog.stuartherbert.com/php/
  • 120. Phix For Making Components github.com/Gradwell/phixBeyond Frameworks Stuart Herbert - http://blog.stuartherbert.com/php/
  • 121. Backwards Compatible http://flic.kr/p/5aK8jABeyond Frameworks Stuart Herbert - http://blog.stuartherbert.com/php/
  • 122. Why It Matters • Isolating code into components reduces amount of code that is affected by change • Backwards-compatibility breaks immediately negate that advantage • The more apps use a component, the worse the b/c breakage cost scalesBeyond Frameworks Stuart Herbert - http://blog.stuartherbert.com/php/
  • 123. Why It Matters • Isolating code into components reduces amount of code that is affected by change • Backwards-compatibility breaks immediately negate that advantage • The more apps use a component, the worse the b/c breakage cost scalesBeyond Frameworks Stuart Herbert - http://blog.stuartherbert.com/php/
  • 124. Why It Matters • Isolating code into components reduces amount of code that is affected by change • Backwards-compatibility breaks immediately negate that advantage • The more apps use a component, the worse the b/c breakage cost scalesBeyond Frameworks Stuart Herbert - http://blog.stuartherbert.com/php/
  • 125. Transparent Versions • X.Y.Z scheme • X == Major version / API / ABI version • Y == Minor new features • Z == Bug fixesBeyond Frameworks Stuart Herbert - http://blog.stuartherbert.com/php/
  • 126. Transparent Versions • X.Y.Z scheme • X == Major version / API / ABI version • Y == Minor new features • Z == Bug fixesBeyond Frameworks Stuart Herbert - http://blog.stuartherbert.com/php/
  • 127. Transparent Versions • X.Y.Z scheme • X == Major version / API / ABI version • Y == Minor new features • Z == Bug fixesBeyond Frameworks Stuart Herbert - http://blog.stuartherbert.com/php/
  • 128. Transparent Versions • X.Y.Z scheme • X == Major version / API / ABI version • Y == Minor new features • Z == Bug fixesBeyond Frameworks Stuart Herbert - http://blog.stuartherbert.com/php/
  • 129. You Can Break B/C • Just don’t do it by surprise! • Don’t be afraid to increment X in X.Y.Z • Google Chrome is already on 10.y.z ... • ... and it hasn’t done it any harmBeyond Frameworks Stuart Herbert - http://blog.stuartherbert.com/php/
  • 130. You Can Break B/C • Just don’t do it by surprise! • Don’t be afraid to increment X in X.Y.Z • Google Chrome is already on 10.y.z ... • ... and it hasn’t done it any harmBeyond Frameworks Stuart Herbert - http://blog.stuartherbert.com/php/
  • 131. You Can Break B/C • Just don’t do it by surprise! • Don’t be afraid to increment X in X.Y.Z • Google Chrome is already on 10.y.z ... • ... and it hasn’t done it any harmBeyond Frameworks Stuart Herbert - http://blog.stuartherbert.com/php/
  • 132. You Can Break B/C • Just don’t do it by surprise! • Don’t be afraid to increment X in X.Y.Z • Google Chrome is already on 10.y.z ... • ... and it hasn’t done it any harmBeyond Frameworks Stuart Herbert - http://blog.stuartherbert.com/php/
  • 133. To Recap ...Beyond Frameworks Stuart Herbert - http://blog.stuartherbert.com/php/
  • 134. Good Components ... • Autoload • Are well tested • Are well documented • Are easy to install • Don’t break backwards compatibility by surpriseBeyond Frameworks Stuart Herbert - http://blog.stuartherbert.com/php/
  • 135. Good Components ... • Autoload • Are well tested • Are well documented • Are easy to install • Don’t break backwards compatibility by surpriseBeyond Frameworks Stuart Herbert - http://blog.stuartherbert.com/php/
  • 136. Good Components ... • Autoload • Are well tested • Are well documented • Are easy to install • Don’t break backwards compatibility by surpriseBeyond Frameworks Stuart Herbert - http://blog.stuartherbert.com/php/
  • 137. Good Components ... • Autoload • Are well tested • Are well documented • Are easy to install • Don’t break backwards compatibility by surpriseBeyond Frameworks Stuart Herbert - http://blog.stuartherbert.com/php/
  • 138. Good Components ... • Autoload • Are well tested • Are well documented • Are easy to install • Don’t break backwards compatibility by surpriseBeyond Frameworks Stuart Herbert - http://blog.stuartherbert.com/php/
  • 139. ... If They ... • PSR0 - compliant autoloading • PHPUnit tests • Docbook manual • Packages installed via PEAR installer • Transparent version numbersBeyond Frameworks Stuart Herbert - http://blog.stuartherbert.com/php/
  • 140. ... If They ... • PSR0 - compliant autoloading • PHPUnit tests • Docbook manual • Packages installed via PEAR installer • Transparent version numbersBeyond Frameworks Stuart Herbert - http://blog.stuartherbert.com/php/
  • 141. ... If They ... • PSR0 - compliant autoloading • PHPUnit tests • Docbook manual • Packages installed via PEAR installer • Transparent version numbersBeyond Frameworks Stuart Herbert - http://blog.stuartherbert.com/php/
  • 142. ... If They ... • PSR0 - compliant autoloading • PHPUnit tests • Docbook manual • Packages installed via PEAR installer • Transparent version numbersBeyond Frameworks Stuart Herbert - http://blog.stuartherbert.com/php/
  • 143. ... If They ... • PSR0 - compliant autoloading • PHPUnit tests • Docbook manual • Packages installed via PEAR installer • Transparent version numbersBeyond Frameworks Stuart Herbert - http://blog.stuartherbert.com/php/
  • 144. 4: An ExampleBeyond Frameworks Stuart Herbert - http://blog.stuartherbert.com/php/
  • 145. We Sell Broadband Via Our Sales Website ... Sales Website Sales Pitch Product Specs Availability CheckerBeyond Frameworks Stuart Herbert - http://blog.stuartherbert.com/php/
  • 146. And Our Customer Control Panel Sales Website Control Panel Customer Sales Pitch Account Product Specs Invoicing Availability Availability Checker CheckerBeyond Frameworks Stuart Herbert - http://blog.stuartherbert.com/php/
  • 147. The Control Panel Holds The Code Hostage The Sales Site Relies On An iFrame Sales Website Control Panel Customer Sales Pitch Account Product Specs Invoicing iFrame Availability Availability Checker CheckerBeyond Frameworks Stuart Herbert - http://blog.stuartherbert.com/php/
  • 148. ... And The Control Panel Talks To The Third Party Who Provides Our BroadbandSales Website Control Panel Third Party Customer Sales Pitch Provisioning Account Product Specs Invoicing Faults Availability iFrame Availability SOAP Availability Checker Checker CheckerBeyond Frameworks Stuart Herbert - http://blog.stuartherbert.com/php/
  • 149. We Wanted To Sell Exciting New Broadband Products From An Alternative Third Party As WellSales Website Control Panel Third Party Customer Sales Pitch Provisioning Account Product Specs Invoicing Faults Availability iFrame Availability SOAP Availability Checker Checker CheckerBeyond Frameworks Stuart Herbert - http://blog.stuartherbert.com/php/
  • 150. Changing The Control Panel Was Going To Be Expensive ...Sales Website Control Panel Third Party Customer Sales Pitch Provisioning Account Product Specs Invoicing Faults Availability iFrame Availability SOAP Availability Checker Checker CheckerBeyond Frameworks Stuart Herbert - http://blog.stuartherbert.com/php/
  • 151. ... But Was The Only Way To Change The Sales WebsiteSales Website Control Panel Third Party Customer Sales Pitch Provisioning Account Product Specs Invoicing Faults Availability iFrame Availability SOAP Availability Checker Checker CheckerBeyond Frameworks Stuart Herbert - http://blog.stuartherbert.com/php/
  • 152. Problem Is ... We Are Due To Retire This Control PanelSales Website Control Panel Third Party Customer Sales Pitch Provisioning Account Product Specs Invoicing Faults Availability Availability Availability Checker Checker CheckerBeyond Frameworks Stuart Herbert - http://blog.stuartherbert.com/php/
  • 153. We Separated Out The Business Logic Of The Availability CheckerSales Website Third Party Sales Pitch Provisioning Product Specs Faults Availability Availability SOAP Availability Checker Checker CheckerBeyond Frameworks Stuart Herbert - http://blog.stuartherbert.com/php/
  • 154. Sales Can Now Improve Their Website Without Having To Rely On Control Panel’s RoadmapSales Website Control Panel Third Party Customer Sales Pitch Provisioning Account Product Specs Invoicing Faults Availability Availability SOAP Availability Checker Checker CheckerBeyond Frameworks Stuart Herbert - http://blog.stuartherbert.com/php/
  • 155. Allowing Engineering To Retire This Version Of The Control PanelSales Website Control Panel Third Party Customer Sales Pitch Provisioning Account Product Specs Invoicing Faults Availability Availability Availability Checker Checker CheckerBeyond Frameworks Stuart Herbert - http://blog.stuartherbert.com/php/
  • 156. And The New Control Panel Will Simply Re-use The Component Before LaunchSales Website Control Panel 2 Third Party Customer Sales Pitch Provisioning Account Product Specs Invoicing Faults Availability Availability Availability Checker Checker CheckerBeyond Frameworks Stuart Herbert - http://blog.stuartherbert.com/php/
  • 157. Moving To Components • Our customer profile has changed • We have outgrown our old applications • We are refactoring all of the needed logic from our old applications • Allows Sales and Engineering roadmaps to move without major log jams • Allows more features (especially internal ones) to be shared across more of our appsBeyond Frameworks Stuart Herbert - http://blog.stuartherbert.com/php/
  • 158. Moving To Components • Our customer profile has changed • We have outgrown our old applications • We are refactoring all of the needed logic from our old applications • Allows Sales and Engineering roadmaps to move without major log jams • Allows more features (especially internal ones) to be shared across more of our appsBeyond Frameworks Stuart Herbert - http://blog.stuartherbert.com/php/
  • 159. Moving To Components • Our customer profile has changed • We have outgrown our old applications • We are refactoring all of the needed logic from our old applications • Allows Sales and Engineering roadmaps to move without major log jams • Allows more features (especially internal ones) to be shared across more of our appsBeyond Frameworks Stuart Herbert - http://blog.stuartherbert.com/php/
  • 160. Moving To Components • Our customer profile has changed • We have outgrown our old applications • We are refactoring all of the needed logic from our old applications • Allows Sales and Engineering roadmaps to move without major log jams • Allows more features (especially internal ones) to be shared across more of our appsBeyond Frameworks Stuart Herbert - http://blog.stuartherbert.com/php/
  • 161. Moving To Components • Our customer profile has changed • We have outgrown our old applications • We are refactoring all of the needed logic from our old applications • Allows Sales and Engineering roadmaps to move without major log jams • Allows more features (especially internal ones) to be shared across more of our appsBeyond Frameworks Stuart Herbert - http://blog.stuartherbert.com/php/
  • 162. Thanks For Your TimeFeedback welcome!I’d love to hear your stories Stuart Herbert stuart@stuartherbert.com - http://blog.stuartherbert.com/php/
  • 163. This photo: http://flic.kr/p/3PU451 Stuart Herbertstuart@stuartherbert.com - http://blog.stuartherbert.com/php/