beyond frameworks
DESCRIPTION
The slides from my PHPUK 2011 conference talk on how to use an application framework without becoming a hostage to it.TRANSCRIPT
![Page 1: Beyond Frameworks](https://reader037.vdocuments.site/reader037/viewer/2022102510/546dbddaaf7959fb678b6dfe/html5/thumbnails/1.jpg)
[email protected] - http://blog.stuartherbert.com/php/
Stuart Herbert
Beyond Frameworks
Using Frameworks WithoutBecoming A Hostage To Them
Stuart Herbert
![Page 2: Beyond Frameworks](https://reader037.vdocuments.site/reader037/viewer/2022102510/546dbddaaf7959fb678b6dfe/html5/thumbnails/2.jpg)
Stuart Herbert - http://blog.stuartherbert.com/php/Beyond Frameworks
About Stuart
• Head of Engineering, Gradwell.com
• Co-author, Zend Certification Study Guide for PHP 4
• Open-source Contributor Since 1994
![Page 3: Beyond Frameworks](https://reader037.vdocuments.site/reader037/viewer/2022102510/546dbddaaf7959fb678b6dfe/html5/thumbnails/3.jpg)
Stuart Herbert - http://blog.stuartherbert.com/php/Beyond Frameworks
About Stuart
• Head of Engineering, Gradwell.com
• Co-author, Zend Certification Study Guide for PHP 4
• Open-source Contributor Since 1994
![Page 4: Beyond Frameworks](https://reader037.vdocuments.site/reader037/viewer/2022102510/546dbddaaf7959fb678b6dfe/html5/thumbnails/4.jpg)
Stuart Herbert - http://blog.stuartherbert.com/php/Beyond Frameworks
About Stuart
• Head of Engineering, Gradwell.com
• Co-author, Zend Certification Study Guide for PHP 4
• Open-source Contributor Since 1994
![Page 5: Beyond Frameworks](https://reader037.vdocuments.site/reader037/viewer/2022102510/546dbddaaf7959fb678b6dfe/html5/thumbnails/5.jpg)
Stuart Herbert - http://blog.stuartherbert.com/php/Beyond Frameworks
Contents
1
How Frameworks Have Held Us Hostage
![Page 6: Beyond Frameworks](https://reader037.vdocuments.site/reader037/viewer/2022102510/546dbddaaf7959fb678b6dfe/html5/thumbnails/6.jpg)
Stuart Herbert - http://blog.stuartherbert.com/php/Beyond Frameworks
Contents
2
Our Layered Architecture For PHP Applications
![Page 7: Beyond Frameworks](https://reader037.vdocuments.site/reader037/viewer/2022102510/546dbddaaf7959fb678b6dfe/html5/thumbnails/7.jpg)
Stuart Herbert - http://blog.stuartherbert.com/php/Beyond Frameworks
Contents
3What Makes A Good Component?
![Page 8: Beyond Frameworks](https://reader037.vdocuments.site/reader037/viewer/2022102510/546dbddaaf7959fb678b6dfe/html5/thumbnails/8.jpg)
Stuart Herbert - http://blog.stuartherbert.com/php/Beyond Frameworks
Contents
4
How Components Are Helping Gradwell
![Page 9: Beyond Frameworks](https://reader037.vdocuments.site/reader037/viewer/2022102510/546dbddaaf7959fb678b6dfe/html5/thumbnails/9.jpg)
Stuart Herbert - http://blog.stuartherbert.com/php/Beyond Frameworks
Questions
At The End, Please
![Page 10: Beyond Frameworks](https://reader037.vdocuments.site/reader037/viewer/2022102510/546dbddaaf7959fb678b6dfe/html5/thumbnails/10.jpg)
Stuart Herbert - http://blog.stuartherbert.com/php/Beyond Frameworks
Questions
For The Audience ...
![Page 11: Beyond Frameworks](https://reader037.vdocuments.site/reader037/viewer/2022102510/546dbddaaf7959fb678b6dfe/html5/thumbnails/11.jpg)
Stuart Herbert - http://blog.stuartherbert.com/php/
http://flic.kr/p/R33dr
Beyond Frameworks
Who Uses A Framework?
![Page 12: Beyond Frameworks](https://reader037.vdocuments.site/reader037/viewer/2022102510/546dbddaaf7959fb678b6dfe/html5/thumbnails/12.jpg)
Stuart Herbert - http://blog.stuartherbert.com/php/
http://flic.kr/p/qq6F1
Beyond Frameworks
Who Develops Software Products?
![Page 13: Beyond Frameworks](https://reader037.vdocuments.site/reader037/viewer/2022102510/546dbddaaf7959fb678b6dfe/html5/thumbnails/13.jpg)
Stuart Herbert - http://blog.stuartherbert.com/php/Beyond Frameworks
1: HostagesTo Frameworks
![Page 14: Beyond Frameworks](https://reader037.vdocuments.site/reader037/viewer/2022102510/546dbddaaf7959fb678b6dfe/html5/thumbnails/14.jpg)
Stuart Herbert - http://blog.stuartherbert.com/php/Beyond Frameworks
Stop Me If You’ve Heard This One Before ...
![Page 15: Beyond Frameworks](https://reader037.vdocuments.site/reader037/viewer/2022102510/546dbddaaf7959fb678b6dfe/html5/thumbnails/15.jpg)
Stuart Herbert - http://blog.stuartherbert.com/php/
http://flic.kr/p/7MmEiv
Beyond Frameworks
First generation apps are highly-coupled
Neat until you attempt to untangle them!
![Page 16: Beyond Frameworks](https://reader037.vdocuments.site/reader037/viewer/2022102510/546dbddaaf7959fb678b6dfe/html5/thumbnails/16.jpg)
Stuart Herbert - http://blog.stuartherbert.com/php/
http://flic.kr/p/7MmEiv
Beyond Frameworks
First generation apps are highly-coupled
Neat until you attempt to untangle them!
![Page 17: Beyond Frameworks](https://reader037.vdocuments.site/reader037/viewer/2022102510/546dbddaaf7959fb678b6dfe/html5/thumbnails/17.jpg)
Stuart Herbert - http://blog.stuartherbert.com/php/
http://flic.kr/p/4sK29V
Beyond Frameworks
Second generation app built on top of own framework
Developers enjoyed building it
But they hated completing it or maintaining it
![Page 18: Beyond Frameworks](https://reader037.vdocuments.site/reader037/viewer/2022102510/546dbddaaf7959fb678b6dfe/html5/thumbnails/18.jpg)
Stuart Herbert - http://blog.stuartherbert.com/php/
http://flic.kr/p/4sK29V
Beyond Frameworks
Second generation app built on top of own framework
Developers enjoyed building it
But they hated completing it or maintaining it
![Page 19: Beyond Frameworks](https://reader037.vdocuments.site/reader037/viewer/2022102510/546dbddaaf7959fb678b6dfe/html5/thumbnails/19.jpg)
Stuart Herbert - http://blog.stuartherbert.com/php/
http://flic.kr/p/4sK29V
Beyond Frameworks
Second generation app built on top of own framework
Developers enjoyed building it
But they hated completing it or maintaining it
![Page 20: Beyond Frameworks](https://reader037.vdocuments.site/reader037/viewer/2022102510/546dbddaaf7959fb678b6dfe/html5/thumbnails/20.jpg)
Stuart Herbert - http://blog.stuartherbert.com/php/Beyond Frameworks
So We Used A Popular Framework ...
![Page 21: Beyond Frameworks](https://reader037.vdocuments.site/reader037/viewer/2022102510/546dbddaaf7959fb678b6dfe/html5/thumbnails/21.jpg)
Stuart Herbert - http://blog.stuartherbert.com/php/Beyond Frameworks
... Or Two ...
![Page 22: Beyond Frameworks](https://reader037.vdocuments.site/reader037/viewer/2022102510/546dbddaaf7959fb678b6dfe/html5/thumbnails/22.jpg)
Stuart Herbert - http://blog.stuartherbert.com/php/
http://flic.kr/p/2k87DM
Beyond Frameworks
Third generation app easy to extend
... after the steep learning curve
![Page 23: Beyond Frameworks](https://reader037.vdocuments.site/reader037/viewer/2022102510/546dbddaaf7959fb678b6dfe/html5/thumbnails/23.jpg)
Stuart Herbert - http://blog.stuartherbert.com/php/
http://flic.kr/p/2k87DM
Beyond Frameworks
Third generation app easy to extend
... after the steep learning curve
![Page 24: Beyond Frameworks](https://reader037.vdocuments.site/reader037/viewer/2022102510/546dbddaaf7959fb678b6dfe/html5/thumbnails/24.jpg)
Stuart Herbert - http://blog.stuartherbert.com/php/
http://flic.kr/p/7132Wm
Beyond Frameworks
We couldn’t get the code out to re-use in other apps
:(
![Page 25: Beyond Frameworks](https://reader037.vdocuments.site/reader037/viewer/2022102510/546dbddaaf7959fb678b6dfe/html5/thumbnails/25.jpg)
Stuart Herbert - http://blog.stuartherbert.com/php/Beyond Frameworks
Framework
Your Code Plugins
What The Architecture Should Look Like
![Page 26: Beyond Frameworks](https://reader037.vdocuments.site/reader037/viewer/2022102510/546dbddaaf7959fb678b6dfe/html5/thumbnails/26.jpg)
Stuart Herbert - http://blog.stuartherbert.com/php/Beyond Frameworks
Your Code Plugins
Framework
What Happened In Reality :(
![Page 27: Beyond Frameworks](https://reader037.vdocuments.site/reader037/viewer/2022102510/546dbddaaf7959fb678b6dfe/html5/thumbnails/27.jpg)
Stuart Herbert - http://blog.stuartherbert.com/php/Beyond Frameworks
What Practical Challenges Does This Create?
![Page 28: Beyond Frameworks](https://reader037.vdocuments.site/reader037/viewer/2022102510/546dbddaaf7959fb678b6dfe/html5/thumbnails/28.jpg)
Stuart Herbert - http://blog.stuartherbert.com/php/
http://flic.kr/p/5Z6Arf
Beyond Frameworks
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?
![Page 29: Beyond Frameworks](https://reader037.vdocuments.site/reader037/viewer/2022102510/546dbddaaf7959fb678b6dfe/html5/thumbnails/29.jpg)
Stuart Herbert - http://blog.stuartherbert.com/php/
http://flic.kr/p/5Z6Arf
Beyond Frameworks
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?
![Page 30: Beyond Frameworks](https://reader037.vdocuments.site/reader037/viewer/2022102510/546dbddaaf7959fb678b6dfe/html5/thumbnails/30.jpg)
Stuart Herbert - http://blog.stuartherbert.com/php/
http://flic.kr/p/4Z8oZE
Beyond Frameworks
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?
![Page 31: Beyond Frameworks](https://reader037.vdocuments.site/reader037/viewer/2022102510/546dbddaaf7959fb678b6dfe/html5/thumbnails/31.jpg)
Stuart Herbert - http://blog.stuartherbert.com/php/
http://flic.kr/p/4Z8oZE
Beyond Frameworks
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?
![Page 32: Beyond Frameworks](https://reader037.vdocuments.site/reader037/viewer/2022102510/546dbddaaf7959fb678b6dfe/html5/thumbnails/32.jpg)
Stuart Herbert - http://blog.stuartherbert.com/php/
http://flic.kr/p/85jzRA
Beyond Frameworks
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?
![Page 33: Beyond Frameworks](https://reader037.vdocuments.site/reader037/viewer/2022102510/546dbddaaf7959fb678b6dfe/html5/thumbnails/33.jpg)
Stuart Herbert - http://blog.stuartherbert.com/php/
http://flic.kr/p/85jzRA
Beyond Frameworks
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?
![Page 34: Beyond Frameworks](https://reader037.vdocuments.site/reader037/viewer/2022102510/546dbddaaf7959fb678b6dfe/html5/thumbnails/34.jpg)
Stuart Herbert - http://blog.stuartherbert.com/php/
http://flic.kr/p/6GMfQc
Beyond Frameworks
How would you outsource some of your app development to teams around the world?
How would you accept the work delivered back to you?
![Page 35: Beyond Frameworks](https://reader037.vdocuments.site/reader037/viewer/2022102510/546dbddaaf7959fb678b6dfe/html5/thumbnails/35.jpg)
Stuart Herbert - http://blog.stuartherbert.com/php/
http://flic.kr/p/6GMfQc
Beyond Frameworks
How would you outsource some of your app development to teams around the world?
How would you accept the work delivered back to you?
![Page 36: Beyond Frameworks](https://reader037.vdocuments.site/reader037/viewer/2022102510/546dbddaaf7959fb678b6dfe/html5/thumbnails/36.jpg)
Stuart Herbert - http://blog.stuartherbert.com/php/Beyond Frameworks
Your Code Plugins
Framework
We Need To Change This ...
![Page 37: Beyond Frameworks](https://reader037.vdocuments.site/reader037/viewer/2022102510/546dbddaaf7959fb678b6dfe/html5/thumbnails/37.jpg)
Stuart Herbert - http://blog.stuartherbert.com/php/Beyond Frameworks
To What ...?
![Page 38: Beyond Frameworks](https://reader037.vdocuments.site/reader037/viewer/2022102510/546dbddaaf7959fb678b6dfe/html5/thumbnails/38.jpg)
Stuart Herbert - http://blog.stuartherbert.com/php/Beyond Frameworks
2: Layered Approach
![Page 39: Beyond Frameworks](https://reader037.vdocuments.site/reader037/viewer/2022102510/546dbddaaf7959fb678b6dfe/html5/thumbnails/39.jpg)
Stuart Herbert - http://blog.stuartherbert.com/php/Beyond Frameworks
Frameworks Your Code Plugins
Application
Let’s Take The Original Architecture ...
![Page 40: Beyond Frameworks](https://reader037.vdocuments.site/reader037/viewer/2022102510/546dbddaaf7959fb678b6dfe/html5/thumbnails/40.jpg)
Stuart Herbert - http://blog.stuartherbert.com/php/Beyond Frameworks
Frameworks App Code Plugins
Application
... And Make The App As Thin As Possible
![Page 41: Beyond Frameworks](https://reader037.vdocuments.site/reader037/viewer/2022102510/546dbddaaf7959fb678b6dfe/html5/thumbnails/41.jpg)
Stuart Herbert - http://blog.stuartherbert.com/php/Beyond Frameworks
Frameworks
Business Logic
App Code Plugins
Application
By Extracting Out ...
![Page 42: Beyond Frameworks](https://reader037.vdocuments.site/reader037/viewer/2022102510/546dbddaaf7959fb678b6dfe/html5/thumbnails/42.jpg)
Stuart Herbert - http://blog.stuartherbert.com/php/Beyond Frameworks
Frameworks
Business Logic Data Model
App Code Plugins
Application
By Extracting Out ...
![Page 43: Beyond Frameworks](https://reader037.vdocuments.site/reader037/viewer/2022102510/546dbddaaf7959fb678b6dfe/html5/thumbnails/43.jpg)
Stuart Herbert - http://blog.stuartherbert.com/php/Beyond Frameworks
Frameworks
Business Logic Data Model Utilities
App Code Plugins
Application
By Extracting Out ...
![Page 44: Beyond Frameworks](https://reader037.vdocuments.site/reader037/viewer/2022102510/546dbddaaf7959fb678b6dfe/html5/thumbnails/44.jpg)
Stuart Herbert - http://blog.stuartherbert.com/php/Beyond Frameworks
Frameworks
Business Logic Data Model Utilities
App Code Plugins
Application
Components
... Into Independent Libraries Of Code
![Page 45: Beyond Frameworks](https://reader037.vdocuments.site/reader037/viewer/2022102510/546dbddaaf7959fb678b6dfe/html5/thumbnails/45.jpg)
Stuart Herbert - http://blog.stuartherbert.com/php/Beyond Frameworks
Frameworks
Business Logic Data Model Utilities
App Code Plugins
Autoloader
Application
Components
Use An Autoloader To Pull In These New Components
![Page 46: Beyond Frameworks](https://reader037.vdocuments.site/reader037/viewer/2022102510/546dbddaaf7959fb678b6dfe/html5/thumbnails/46.jpg)
Stuart Herbert - http://blog.stuartherbert.com/php/Beyond Frameworks
Frameworks
Business Logic Data Model Utilities
App Code Plugins
Autoloader
Application
Components
This Gives You A Larger Set Of Reusable Code
![Page 47: Beyond Frameworks](https://reader037.vdocuments.site/reader037/viewer/2022102510/546dbddaaf7959fb678b6dfe/html5/thumbnails/47.jpg)
Stuart Herbert - http://blog.stuartherbert.com/php/Beyond Frameworks
The Frameworked AppBecomes A Thin Layer
On Top Of Framework-agnostic
Reusable Components
![Page 48: Beyond Frameworks](https://reader037.vdocuments.site/reader037/viewer/2022102510/546dbddaaf7959fb678b6dfe/html5/thumbnails/48.jpg)
Stuart Herbert - http://blog.stuartherbert.com/php/Beyond Frameworks
Layered Architecture
Frameworks
Business Logic Data Model Utilities
App Code Plugins
Autoloader
Application
Components
![Page 49: Beyond Frameworks](https://reader037.vdocuments.site/reader037/viewer/2022102510/546dbddaaf7959fb678b6dfe/html5/thumbnails/49.jpg)
Stuart Herbert - http://blog.stuartherbert.com/php/Beyond Frameworks
Layered ArchitectureApplication
Components
![Page 50: Beyond Frameworks](https://reader037.vdocuments.site/reader037/viewer/2022102510/546dbddaaf7959fb678b6dfe/html5/thumbnails/50.jpg)
Stuart Herbert - http://blog.stuartherbert.com/php/Beyond Frameworks
Why Components?
Business Logic
Data Model
Utilities
• Completely independent of the framework
• Built & tested in isolation of your app code
• Can be built by different teams
• Don’t have to change when the framework changes
![Page 51: Beyond Frameworks](https://reader037.vdocuments.site/reader037/viewer/2022102510/546dbddaaf7959fb678b6dfe/html5/thumbnails/51.jpg)
Stuart Herbert - http://blog.stuartherbert.com/php/Beyond Frameworks
Why Components?
Business Logic
Data Model
Utilities
• Completely independent of the framework
• Built & tested in isolation of your app code
• Can be built by different teams
• Don’t have to change when the framework changes
![Page 52: Beyond Frameworks](https://reader037.vdocuments.site/reader037/viewer/2022102510/546dbddaaf7959fb678b6dfe/html5/thumbnails/52.jpg)
Stuart Herbert - http://blog.stuartherbert.com/php/Beyond Frameworks
Why Components?
Business Logic
Data Model
Utilities
• Completely independent of the framework
• Built & tested in isolation of your app code
• Can be built by different teams
• Don’t have to change when the framework changes
![Page 53: Beyond Frameworks](https://reader037.vdocuments.site/reader037/viewer/2022102510/546dbddaaf7959fb678b6dfe/html5/thumbnails/53.jpg)
Stuart Herbert - http://blog.stuartherbert.com/php/Beyond Frameworks
Why Components?
Business Logic
Data Model
Utilities
• Completely independent of the framework
• Built & tested in isolation of your app code
• Can be built by different teams
• Don’t have to change when the framework changes
![Page 54: Beyond Frameworks](https://reader037.vdocuments.site/reader037/viewer/2022102510/546dbddaaf7959fb678b6dfe/html5/thumbnails/54.jpg)
Stuart Herbert - http://blog.stuartherbert.com/php/Beyond Frameworks
Why Components?
Business Logic
Data Model
Utilities
• Reduces the Big Ball of String Syndrome
• Mindset change to light apps on top of rich service layer
• Improves development in parallel of apps & services
• Injects additional discipline into development teams
![Page 55: Beyond Frameworks](https://reader037.vdocuments.site/reader037/viewer/2022102510/546dbddaaf7959fb678b6dfe/html5/thumbnails/55.jpg)
Stuart Herbert - http://blog.stuartherbert.com/php/Beyond Frameworks
Why Components?
Business Logic
Data Model
Utilities
• Reduces the Big Ball of String Syndrome
• Mindset change to light apps on top of rich service layer
• Improves development in parallel of apps & services
• Injects additional discipline into development teams
![Page 56: Beyond Frameworks](https://reader037.vdocuments.site/reader037/viewer/2022102510/546dbddaaf7959fb678b6dfe/html5/thumbnails/56.jpg)
Stuart Herbert - http://blog.stuartherbert.com/php/Beyond Frameworks
Why Components?
Business Logic
Data Model
Utilities
• Reduces the Big Ball of String Syndrome
• Mindset change to light apps on top of rich service layer
• Improves development in parallel of apps & services
• Injects additional discipline into development teams
![Page 57: Beyond Frameworks](https://reader037.vdocuments.site/reader037/viewer/2022102510/546dbddaaf7959fb678b6dfe/html5/thumbnails/57.jpg)
Stuart Herbert - http://blog.stuartherbert.com/php/Beyond Frameworks
Why Components?
Business Logic
Data Model
Utilities
• Reduces the Big Ball of String Syndrome
• Mindset change to light apps on top of rich service layer
• Improves development in parallel of apps & services
• Injects additional discipline into development teams
![Page 58: Beyond Frameworks](https://reader037.vdocuments.site/reader037/viewer/2022102510/546dbddaaf7959fb678b6dfe/html5/thumbnails/58.jpg)
Stuart Herbert - http://blog.stuartherbert.com/php/Beyond Frameworks
Others Already Do This
![Page 59: Beyond Frameworks](https://reader037.vdocuments.site/reader037/viewer/2022102510/546dbddaaf7959fb678b6dfe/html5/thumbnails/59.jpg)
Stuart Herbert - http://blog.stuartherbert.com/php/
http://flic.kr/p/5oewwy
Beyond Frameworks
Perl Has CPAN Modules
![Page 60: Beyond Frameworks](https://reader037.vdocuments.site/reader037/viewer/2022102510/546dbddaaf7959fb678b6dfe/html5/thumbnails/60.jpg)
Stuart Herbert - http://blog.stuartherbert.com/php/
http://flic.kr/p/uyMuU
Beyond Frameworks
Ruby Has Gems
![Page 61: Beyond Frameworks](https://reader037.vdocuments.site/reader037/viewer/2022102510/546dbddaaf7959fb678b6dfe/html5/thumbnails/61.jpg)
Stuart Herbert - http://blog.stuartherbert.com/php/Beyond Frameworks
What MakesA Good Component?
![Page 62: Beyond Frameworks](https://reader037.vdocuments.site/reader037/viewer/2022102510/546dbddaaf7959fb678b6dfe/html5/thumbnails/62.jpg)
Stuart Herbert - http://blog.stuartherbert.com/php/Beyond Frameworks
3: Good Components
![Page 63: Beyond Frameworks](https://reader037.vdocuments.site/reader037/viewer/2022102510/546dbddaaf7959fb678b6dfe/html5/thumbnails/63.jpg)
Stuart Herbert - http://blog.stuartherbert.com/php/Beyond Frameworks
Component Standards
• Common standards
• Reusable by many
• Interoperable
• Trustable
![Page 64: Beyond Frameworks](https://reader037.vdocuments.site/reader037/viewer/2022102510/546dbddaaf7959fb678b6dfe/html5/thumbnails/64.jpg)
Stuart Herbert - http://blog.stuartherbert.com/php/Beyond Frameworks
Component Standards
• Common standards
• Reusable by many
• Interoperable
• Trustable
![Page 65: Beyond Frameworks](https://reader037.vdocuments.site/reader037/viewer/2022102510/546dbddaaf7959fb678b6dfe/html5/thumbnails/65.jpg)
Stuart Herbert - http://blog.stuartherbert.com/php/Beyond Frameworks
Component Standards
• Common standards
• Reusable by many
• Interoperable
• Trustable
![Page 66: Beyond Frameworks](https://reader037.vdocuments.site/reader037/viewer/2022102510/546dbddaaf7959fb678b6dfe/html5/thumbnails/66.jpg)
Stuart Herbert - http://blog.stuartherbert.com/php/Beyond Frameworks
Component Standards
• Common standards
• Reusable by many
• Interoperable
• Trustable
![Page 67: Beyond Frameworks](https://reader037.vdocuments.site/reader037/viewer/2022102510/546dbddaaf7959fb678b6dfe/html5/thumbnails/67.jpg)
Stuart Herbert - http://blog.stuartherbert.com/php/Beyond Frameworks
Good Components ...
• Autoload
• Are well tested
• Are well documented
• Are easy to install
• Don’t break backwards compatibility by surprise
![Page 68: Beyond Frameworks](https://reader037.vdocuments.site/reader037/viewer/2022102510/546dbddaaf7959fb678b6dfe/html5/thumbnails/68.jpg)
Stuart Herbert - http://blog.stuartherbert.com/php/Beyond Frameworks
Good Components ...
• Autoload
• Are well tested
• Are well documented
• Are easy to install
• Don’t break backwards compatibility by surprise
![Page 69: Beyond Frameworks](https://reader037.vdocuments.site/reader037/viewer/2022102510/546dbddaaf7959fb678b6dfe/html5/thumbnails/69.jpg)
Stuart Herbert - http://blog.stuartherbert.com/php/Beyond Frameworks
Good Components ...
• Autoload
• Are well tested
• Are well documented
• Are easy to install
• Don’t break backwards compatibility by surprise
![Page 70: Beyond Frameworks](https://reader037.vdocuments.site/reader037/viewer/2022102510/546dbddaaf7959fb678b6dfe/html5/thumbnails/70.jpg)
Stuart Herbert - http://blog.stuartherbert.com/php/Beyond Frameworks
Good Components ...
• Autoload
• Are well tested
• Are well documented
• Are easy to install
• Don’t break backwards compatibility by surprise
![Page 71: Beyond Frameworks](https://reader037.vdocuments.site/reader037/viewer/2022102510/546dbddaaf7959fb678b6dfe/html5/thumbnails/71.jpg)
Stuart Herbert - http://blog.stuartherbert.com/php/Beyond Frameworks
Good Components ...
• Autoload
• Are well tested
• Are well documented
• Are easy to install
• Don’t break backwards compatibility by surprise
![Page 72: Beyond Frameworks](https://reader037.vdocuments.site/reader037/viewer/2022102510/546dbddaaf7959fb678b6dfe/html5/thumbnails/72.jpg)
Stuart Herbert - http://blog.stuartherbert.com/php/Beyond Frameworks
Frameworks
Business Logic Data Model Utilities
App Code Plugins
Application
Components
Keep Components Outside Of Your App
![Page 73: Beyond Frameworks](https://reader037.vdocuments.site/reader037/viewer/2022102510/546dbddaaf7959fb678b6dfe/html5/thumbnails/73.jpg)
Stuart Herbert - http://blog.stuartherbert.com/php/Beyond Frameworks
Frameworks
Business Logic Data Model Utilities
App Code Plugins
Autoloader
Application
Components
Use An Autoloader To Pull In Components
![Page 74: Beyond Frameworks](https://reader037.vdocuments.site/reader037/viewer/2022102510/546dbddaaf7959fb678b6dfe/html5/thumbnails/74.jpg)
Stuart Herbert - http://blog.stuartherbert.com/php/Beyond Frameworks
Frameworks
Business Logic Data Model Utilities
App Code Plugins
Autoloader
Application
Components
Why Use An Autoloader?
![Page 75: Beyond Frameworks](https://reader037.vdocuments.site/reader037/viewer/2022102510/546dbddaaf7959fb678b6dfe/html5/thumbnails/75.jpg)
Stuart Herbert - http://blog.stuartherbert.com/php/Beyond Frameworks
Frameworks
Business Logic Data Model Utilities
App Code Plugins
Autoloader
Application
Components
Autoloading Makes Life Easy!
![Page 76: Beyond Frameworks](https://reader037.vdocuments.site/reader037/viewer/2022102510/546dbddaaf7959fb678b6dfe/html5/thumbnails/76.jpg)
Stuart Herbert - http://blog.stuartherbert.com/php/Beyond Frameworks
• 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 approach
One True Autoloader
![Page 77: Beyond Frameworks](https://reader037.vdocuments.site/reader037/viewer/2022102510/546dbddaaf7959fb678b6dfe/html5/thumbnails/77.jpg)
Stuart Herbert - http://blog.stuartherbert.com/php/Beyond Frameworks
• 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 approach
One True Autoloader
![Page 78: Beyond Frameworks](https://reader037.vdocuments.site/reader037/viewer/2022102510/546dbddaaf7959fb678b6dfe/html5/thumbnails/78.jpg)
Stuart Herbert - http://blog.stuartherbert.com/php/Beyond Frameworks
• 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 approach
One True Autoloader
![Page 79: Beyond Frameworks](https://reader037.vdocuments.site/reader037/viewer/2022102510/546dbddaaf7959fb678b6dfe/html5/thumbnails/79.jpg)
Stuart Herbert - http://blog.stuartherbert.com/php/Beyond Frameworks
• 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 approach
One True Autoloader
![Page 80: Beyond Frameworks](https://reader037.vdocuments.site/reader037/viewer/2022102510/546dbddaaf7959fb678b6dfe/html5/thumbnails/80.jpg)
Stuart Herbert - http://blog.stuartherbert.com/php/Beyond Frameworks
• 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 disk
PSR0 Autoloader
![Page 81: Beyond Frameworks](https://reader037.vdocuments.site/reader037/viewer/2022102510/546dbddaaf7959fb678b6dfe/html5/thumbnails/81.jpg)
Stuart Herbert - http://blog.stuartherbert.com/php/Beyond Frameworks
• 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 disk
PSR0 Autoloader
![Page 82: Beyond Frameworks](https://reader037.vdocuments.site/reader037/viewer/2022102510/546dbddaaf7959fb678b6dfe/html5/thumbnails/82.jpg)
Stuart Herbert - http://blog.stuartherbert.com/php/Beyond Frameworks
• 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 disk
PSR0 Autoloader
![Page 83: Beyond Frameworks](https://reader037.vdocuments.site/reader037/viewer/2022102510/546dbddaaf7959fb678b6dfe/html5/thumbnails/83.jpg)
Stuart Herbert - http://blog.stuartherbert.com/php/Beyond Frameworks
• 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 disk
PSR0 Autoloader
![Page 84: Beyond Frameworks](https://reader037.vdocuments.site/reader037/viewer/2022102510/546dbddaaf7959fb678b6dfe/html5/thumbnails/84.jpg)
Stuart Herbert - http://blog.stuartherbert.com/php/Beyond Frameworks
Autoloader Examples
• Phin_Project\ExtenderLib\FileLoader ->Phin_Project/ExtenderLib/FileLoader.php
• Phin_Project\Console\Std_Out ->Phin_Project/Console/Std/Out.php
![Page 85: Beyond Frameworks](https://reader037.vdocuments.site/reader037/viewer/2022102510/546dbddaaf7959fb678b6dfe/html5/thumbnails/85.jpg)
Stuart Herbert - http://blog.stuartherbert.com/php/Beyond Frameworks
Autoloader Examples
• Phin_Project\ExtenderLib\FileLoader ->Phin_Project/ExtenderLib/FileLoader.php
• Phin_Project\Console\Std_Out ->Phin_Project/Console/Std/Out.php
![Page 86: Beyond Frameworks](https://reader037.vdocuments.site/reader037/viewer/2022102510/546dbddaaf7959fb678b6dfe/html5/thumbnails/86.jpg)
Stuart Herbert - http://blog.stuartherbert.com/php/Beyond Frameworks
Autoloader Component
• pear channel-discover pear.gradwell.com
• pear install Gradwell/Autoloader
![Page 87: Beyond Frameworks](https://reader037.vdocuments.site/reader037/viewer/2022102510/546dbddaaf7959fb678b6dfe/html5/thumbnails/87.jpg)
Stuart Herbert - http://blog.stuartherbert.com/php/Beyond Frameworks
Autoloader Component
• pear channel-discover pear.gradwell.com
• pear install Gradwell/Autoloader
![Page 88: Beyond Frameworks](https://reader037.vdocuments.site/reader037/viewer/2022102510/546dbddaaf7959fb678b6dfe/html5/thumbnails/88.jpg)
Stuart Herbert - http://blog.stuartherbert.com/php/
http://flic.kr/p/3c2W8q
Beyond Frameworks
Testing
![Page 89: Beyond Frameworks](https://reader037.vdocuments.site/reader037/viewer/2022102510/546dbddaaf7959fb678b6dfe/html5/thumbnails/89.jpg)
Stuart Herbert - http://blog.stuartherbert.com/php/Beyond Frameworks
PHPUnit
• De-facto standard for unit-testing PHP code
• Supported by leading IDEs
• Supported by CI environments
• Perfect for use with components
![Page 90: Beyond Frameworks](https://reader037.vdocuments.site/reader037/viewer/2022102510/546dbddaaf7959fb678b6dfe/html5/thumbnails/90.jpg)
Stuart Herbert - http://blog.stuartherbert.com/php/Beyond Frameworks
PHPUnit
• De-facto standard for unit-testing PHP code
• Supported by leading IDEs
• Supported by CI environments
• Perfect for use with components
![Page 91: Beyond Frameworks](https://reader037.vdocuments.site/reader037/viewer/2022102510/546dbddaaf7959fb678b6dfe/html5/thumbnails/91.jpg)
Stuart Herbert - http://blog.stuartherbert.com/php/Beyond Frameworks
PHPUnit
• De-facto standard for unit-testing PHP code
• Supported by leading IDEs
• Supported by CI environments
• Perfect for use with components
![Page 92: Beyond Frameworks](https://reader037.vdocuments.site/reader037/viewer/2022102510/546dbddaaf7959fb678b6dfe/html5/thumbnails/92.jpg)
Stuart Herbert - http://blog.stuartherbert.com/php/Beyond Frameworks
PHPUnit
• De-facto standard for unit-testing PHP code
• Supported by leading IDEs
• Supported by CI environments
• Perfect for use with components
![Page 93: Beyond Frameworks](https://reader037.vdocuments.site/reader037/viewer/2022102510/546dbddaaf7959fb678b6dfe/html5/thumbnails/93.jpg)
Stuart Herbert - http://blog.stuartherbert.com/php/Beyond Frameworks
Good Tests ...
• Document supported behaviour
• Have separate tests for reported bugs
• Cover 100% of the component’s code
• Ship with the component
![Page 94: Beyond Frameworks](https://reader037.vdocuments.site/reader037/viewer/2022102510/546dbddaaf7959fb678b6dfe/html5/thumbnails/94.jpg)
Stuart Herbert - http://blog.stuartherbert.com/php/Beyond Frameworks
Good Tests ...
• Document supported behaviour
• Have separate tests for reported bugs
• Cover 100% of the component’s code
• Ship with the component
![Page 95: Beyond Frameworks](https://reader037.vdocuments.site/reader037/viewer/2022102510/546dbddaaf7959fb678b6dfe/html5/thumbnails/95.jpg)
Stuart Herbert - http://blog.stuartherbert.com/php/Beyond Frameworks
Good Tests ...
• Document supported behaviour
• Have separate tests for reported bugs
• Cover 100% of the component’s code
• Ship with the component
![Page 96: Beyond Frameworks](https://reader037.vdocuments.site/reader037/viewer/2022102510/546dbddaaf7959fb678b6dfe/html5/thumbnails/96.jpg)
Stuart Herbert - http://blog.stuartherbert.com/php/Beyond Frameworks
Good Tests ...
• Document supported behaviour
• Have separate tests for reported bugs
• Cover 100% of the component’s code
• Ship with the component
![Page 97: Beyond Frameworks](https://reader037.vdocuments.site/reader037/viewer/2022102510/546dbddaaf7959fb678b6dfe/html5/thumbnails/97.jpg)
Stuart Herbert - http://blog.stuartherbert.com/php/Beyond Frameworks
Getting PHPUnit
• Visit www.phpunit.de
![Page 98: Beyond Frameworks](https://reader037.vdocuments.site/reader037/viewer/2022102510/546dbddaaf7959fb678b6dfe/html5/thumbnails/98.jpg)
Stuart Herbert - http://blog.stuartherbert.com/php/
http://flic.kr/p/6wuB99
Beyond Frameworks
Documentation
![Page 99: Beyond Frameworks](https://reader037.vdocuments.site/reader037/viewer/2022102510/546dbddaaf7959fb678b6dfe/html5/thumbnails/99.jpg)
Stuart Herbert - http://blog.stuartherbert.com/php/Beyond Frameworks
The PHP ManualIs One Of
PHP’s Killer Features
![Page 100: Beyond Frameworks](https://reader037.vdocuments.site/reader037/viewer/2022102510/546dbddaaf7959fb678b6dfe/html5/thumbnails/100.jpg)
Stuart Herbert - http://blog.stuartherbert.com/php/Beyond Frameworks
Make Your Documentation At Least As Good!
![Page 101: Beyond Frameworks](https://reader037.vdocuments.site/reader037/viewer/2022102510/546dbddaaf7959fb678b6dfe/html5/thumbnails/101.jpg)
Stuart Herbert - http://blog.stuartherbert.com/php/Beyond Frameworks
• Explain how to load the component
• Describe how you intend it to be used
• Give several (non-trivial!) examples
• Capture notes / FAQs
Good Documentation
![Page 102: Beyond Frameworks](https://reader037.vdocuments.site/reader037/viewer/2022102510/546dbddaaf7959fb678b6dfe/html5/thumbnails/102.jpg)
Stuart Herbert - http://blog.stuartherbert.com/php/Beyond Frameworks
• Explain how to load the component
• Describe how you intend it to be used
• Give several (non-trivial!) examples
• Capture notes / FAQs
Good Documentation
![Page 103: Beyond Frameworks](https://reader037.vdocuments.site/reader037/viewer/2022102510/546dbddaaf7959fb678b6dfe/html5/thumbnails/103.jpg)
Stuart Herbert - http://blog.stuartherbert.com/php/Beyond Frameworks
• Explain how to load the component
• Describe how you intend it to be used
• Give several (non-trivial!) examples
• Capture notes / FAQs
Good Documentation
![Page 104: Beyond Frameworks](https://reader037.vdocuments.site/reader037/viewer/2022102510/546dbddaaf7959fb678b6dfe/html5/thumbnails/104.jpg)
Stuart Herbert - http://blog.stuartherbert.com/php/Beyond Frameworks
• Explain how to load the component
• Describe how you intend it to be used
• Give several (non-trivial!) examples
• Capture notes / FAQs
Good Documentation
![Page 105: Beyond Frameworks](https://reader037.vdocuments.site/reader037/viewer/2022102510/546dbddaaf7959fb678b6dfe/html5/thumbnails/105.jpg)
Stuart Herbert - http://blog.stuartherbert.com/php/Beyond Frameworks
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 efforts
![Page 106: Beyond Frameworks](https://reader037.vdocuments.site/reader037/viewer/2022102510/546dbddaaf7959fb678b6dfe/html5/thumbnails/106.jpg)
Stuart Herbert - http://blog.stuartherbert.com/php/Beyond Frameworks
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 efforts
![Page 107: Beyond Frameworks](https://reader037.vdocuments.site/reader037/viewer/2022102510/546dbddaaf7959fb678b6dfe/html5/thumbnails/107.jpg)
Stuart Herbert - http://blog.stuartherbert.com/php/Beyond Frameworks
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 efforts
![Page 108: Beyond Frameworks](https://reader037.vdocuments.site/reader037/viewer/2022102510/546dbddaaf7959fb678b6dfe/html5/thumbnails/108.jpg)
Stuart Herbert - http://blog.stuartherbert.com/php/Beyond Frameworks
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 efforts
![Page 109: Beyond Frameworks](https://reader037.vdocuments.site/reader037/viewer/2022102510/546dbddaaf7959fb678b6dfe/html5/thumbnails/109.jpg)
Stuart Herbert - http://blog.stuartherbert.com/php/
www.phpunit.de/manual/3.5/en/
Beyond Frameworks
Docbook a la PHPUnit
![Page 110: Beyond Frameworks](https://reader037.vdocuments.site/reader037/viewer/2022102510/546dbddaaf7959fb678b6dfe/html5/thumbnails/110.jpg)
Stuart Herbert - http://blog.stuartherbert.com/php/Beyond Frameworks
What About phpDoc?
• Useful for IDE code auto-completion
• Useful as a summary of a method’s purpose
• Reference documentation, not a manual
![Page 111: Beyond Frameworks](https://reader037.vdocuments.site/reader037/viewer/2022102510/546dbddaaf7959fb678b6dfe/html5/thumbnails/111.jpg)
Stuart Herbert - http://blog.stuartherbert.com/php/Beyond Frameworks
What About phpDoc?
• Useful for IDE code auto-completion
• Useful as a summary of a method’s purpose
• Reference documentation, not a manual
![Page 112: Beyond Frameworks](https://reader037.vdocuments.site/reader037/viewer/2022102510/546dbddaaf7959fb678b6dfe/html5/thumbnails/112.jpg)
Stuart Herbert - http://blog.stuartherbert.com/php/Beyond Frameworks
What About phpDoc?
• Useful for IDE code auto-completion
• Useful as a summary of a method’s purpose
• Reference documentation, not a manual
![Page 113: Beyond Frameworks](https://reader037.vdocuments.site/reader037/viewer/2022102510/546dbddaaf7959fb678b6dfe/html5/thumbnails/113.jpg)
Stuart Herbert - http://blog.stuartherbert.com/php/
http://flic.kr/p/41vMUJ
Beyond Frameworks
Packaging & Installation
![Page 114: Beyond Frameworks](https://reader037.vdocuments.site/reader037/viewer/2022102510/546dbddaaf7959fb678b6dfe/html5/thumbnails/114.jpg)
Stuart Herbert - http://blog.stuartherbert.com/php/Beyond Frameworks
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 repo
![Page 115: Beyond Frameworks](https://reader037.vdocuments.site/reader037/viewer/2022102510/546dbddaaf7959fb678b6dfe/html5/thumbnails/115.jpg)
Stuart Herbert - http://blog.stuartherbert.com/php/Beyond Frameworks
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 repo
![Page 116: Beyond Frameworks](https://reader037.vdocuments.site/reader037/viewer/2022102510/546dbddaaf7959fb678b6dfe/html5/thumbnails/116.jpg)
Stuart Herbert - http://blog.stuartherbert.com/php/Beyond Frameworks
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 repo
![Page 117: Beyond Frameworks](https://reader037.vdocuments.site/reader037/viewer/2022102510/546dbddaaf7959fb678b6dfe/html5/thumbnails/117.jpg)
Stuart Herbert - http://blog.stuartherbert.com/php/Beyond Frameworks
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 repo
![Page 118: Beyond Frameworks](https://reader037.vdocuments.site/reader037/viewer/2022102510/546dbddaaf7959fb678b6dfe/html5/thumbnails/118.jpg)
Stuart Herbert - http://blog.stuartherbert.com/php/
http://www.pirum-project.org/
Beyond Frameworks
Pirum
![Page 119: Beyond Frameworks](https://reader037.vdocuments.site/reader037/viewer/2022102510/546dbddaaf7959fb678b6dfe/html5/thumbnails/119.jpg)
Stuart Herbert - http://blog.stuartherbert.com/php/
pear channel-discover pear.gradwell.com
Beyond Frameworks
Your Own PEAR Channel
![Page 120: Beyond Frameworks](https://reader037.vdocuments.site/reader037/viewer/2022102510/546dbddaaf7959fb678b6dfe/html5/thumbnails/120.jpg)
Stuart Herbert - http://blog.stuartherbert.com/php/
github.com/Gradwell/phix
Beyond Frameworks
Phix For Making Components
![Page 121: Beyond Frameworks](https://reader037.vdocuments.site/reader037/viewer/2022102510/546dbddaaf7959fb678b6dfe/html5/thumbnails/121.jpg)
Stuart Herbert - http://blog.stuartherbert.com/php/
http://flic.kr/p/5aK8jA
Beyond Frameworks
Backwards Compatible
![Page 122: Beyond Frameworks](https://reader037.vdocuments.site/reader037/viewer/2022102510/546dbddaaf7959fb678b6dfe/html5/thumbnails/122.jpg)
Stuart Herbert - http://blog.stuartherbert.com/php/Beyond Frameworks
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 scales
![Page 123: Beyond Frameworks](https://reader037.vdocuments.site/reader037/viewer/2022102510/546dbddaaf7959fb678b6dfe/html5/thumbnails/123.jpg)
Stuart Herbert - http://blog.stuartherbert.com/php/Beyond Frameworks
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 scales
![Page 124: Beyond Frameworks](https://reader037.vdocuments.site/reader037/viewer/2022102510/546dbddaaf7959fb678b6dfe/html5/thumbnails/124.jpg)
Stuart Herbert - http://blog.stuartherbert.com/php/Beyond Frameworks
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 scales
![Page 125: Beyond Frameworks](https://reader037.vdocuments.site/reader037/viewer/2022102510/546dbddaaf7959fb678b6dfe/html5/thumbnails/125.jpg)
Stuart Herbert - http://blog.stuartherbert.com/php/Beyond Frameworks
Transparent Versions
• X.Y.Z scheme
• X == Major version / API / ABI version
• Y == Minor new features
• Z == Bug fixes
![Page 126: Beyond Frameworks](https://reader037.vdocuments.site/reader037/viewer/2022102510/546dbddaaf7959fb678b6dfe/html5/thumbnails/126.jpg)
Stuart Herbert - http://blog.stuartherbert.com/php/Beyond Frameworks
Transparent Versions
• X.Y.Z scheme
• X == Major version / API / ABI version
• Y == Minor new features
• Z == Bug fixes
![Page 127: Beyond Frameworks](https://reader037.vdocuments.site/reader037/viewer/2022102510/546dbddaaf7959fb678b6dfe/html5/thumbnails/127.jpg)
Stuart Herbert - http://blog.stuartherbert.com/php/Beyond Frameworks
Transparent Versions
• X.Y.Z scheme
• X == Major version / API / ABI version
• Y == Minor new features
• Z == Bug fixes
![Page 128: Beyond Frameworks](https://reader037.vdocuments.site/reader037/viewer/2022102510/546dbddaaf7959fb678b6dfe/html5/thumbnails/128.jpg)
Stuart Herbert - http://blog.stuartherbert.com/php/Beyond Frameworks
Transparent Versions
• X.Y.Z scheme
• X == Major version / API / ABI version
• Y == Minor new features
• Z == Bug fixes
![Page 129: Beyond Frameworks](https://reader037.vdocuments.site/reader037/viewer/2022102510/546dbddaaf7959fb678b6dfe/html5/thumbnails/129.jpg)
Stuart Herbert - http://blog.stuartherbert.com/php/Beyond Frameworks
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 harm
![Page 130: Beyond Frameworks](https://reader037.vdocuments.site/reader037/viewer/2022102510/546dbddaaf7959fb678b6dfe/html5/thumbnails/130.jpg)
Stuart Herbert - http://blog.stuartherbert.com/php/Beyond Frameworks
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 harm
![Page 131: Beyond Frameworks](https://reader037.vdocuments.site/reader037/viewer/2022102510/546dbddaaf7959fb678b6dfe/html5/thumbnails/131.jpg)
Stuart Herbert - http://blog.stuartherbert.com/php/Beyond Frameworks
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 harm
![Page 132: Beyond Frameworks](https://reader037.vdocuments.site/reader037/viewer/2022102510/546dbddaaf7959fb678b6dfe/html5/thumbnails/132.jpg)
Stuart Herbert - http://blog.stuartherbert.com/php/Beyond Frameworks
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 harm
![Page 133: Beyond Frameworks](https://reader037.vdocuments.site/reader037/viewer/2022102510/546dbddaaf7959fb678b6dfe/html5/thumbnails/133.jpg)
Stuart Herbert - http://blog.stuartherbert.com/php/Beyond Frameworks
To Recap ...
![Page 134: Beyond Frameworks](https://reader037.vdocuments.site/reader037/viewer/2022102510/546dbddaaf7959fb678b6dfe/html5/thumbnails/134.jpg)
Stuart Herbert - http://blog.stuartherbert.com/php/Beyond Frameworks
Good Components ...
• Autoload
• Are well tested
• Are well documented
• Are easy to install
• Don’t break backwards compatibility by surprise
![Page 135: Beyond Frameworks](https://reader037.vdocuments.site/reader037/viewer/2022102510/546dbddaaf7959fb678b6dfe/html5/thumbnails/135.jpg)
Stuart Herbert - http://blog.stuartherbert.com/php/Beyond Frameworks
Good Components ...
• Autoload
• Are well tested
• Are well documented
• Are easy to install
• Don’t break backwards compatibility by surprise
![Page 136: Beyond Frameworks](https://reader037.vdocuments.site/reader037/viewer/2022102510/546dbddaaf7959fb678b6dfe/html5/thumbnails/136.jpg)
Stuart Herbert - http://blog.stuartherbert.com/php/Beyond Frameworks
Good Components ...
• Autoload
• Are well tested
• Are well documented
• Are easy to install
• Don’t break backwards compatibility by surprise
![Page 137: Beyond Frameworks](https://reader037.vdocuments.site/reader037/viewer/2022102510/546dbddaaf7959fb678b6dfe/html5/thumbnails/137.jpg)
Stuart Herbert - http://blog.stuartherbert.com/php/Beyond Frameworks
Good Components ...
• Autoload
• Are well tested
• Are well documented
• Are easy to install
• Don’t break backwards compatibility by surprise
![Page 138: Beyond Frameworks](https://reader037.vdocuments.site/reader037/viewer/2022102510/546dbddaaf7959fb678b6dfe/html5/thumbnails/138.jpg)
Stuart Herbert - http://blog.stuartherbert.com/php/Beyond Frameworks
Good Components ...
• Autoload
• Are well tested
• Are well documented
• Are easy to install
• Don’t break backwards compatibility by surprise
![Page 139: Beyond Frameworks](https://reader037.vdocuments.site/reader037/viewer/2022102510/546dbddaaf7959fb678b6dfe/html5/thumbnails/139.jpg)
Stuart Herbert - http://blog.stuartherbert.com/php/Beyond Frameworks
... If They ...
• PSR0 - compliant autoloading
• PHPUnit tests
• Docbook manual
• Packages installed via PEAR installer
• Transparent version numbers
![Page 140: Beyond Frameworks](https://reader037.vdocuments.site/reader037/viewer/2022102510/546dbddaaf7959fb678b6dfe/html5/thumbnails/140.jpg)
Stuart Herbert - http://blog.stuartherbert.com/php/Beyond Frameworks
... If They ...
• PSR0 - compliant autoloading
• PHPUnit tests
• Docbook manual
• Packages installed via PEAR installer
• Transparent version numbers
![Page 141: Beyond Frameworks](https://reader037.vdocuments.site/reader037/viewer/2022102510/546dbddaaf7959fb678b6dfe/html5/thumbnails/141.jpg)
Stuart Herbert - http://blog.stuartherbert.com/php/Beyond Frameworks
... If They ...
• PSR0 - compliant autoloading
• PHPUnit tests
• Docbook manual
• Packages installed via PEAR installer
• Transparent version numbers
![Page 142: Beyond Frameworks](https://reader037.vdocuments.site/reader037/viewer/2022102510/546dbddaaf7959fb678b6dfe/html5/thumbnails/142.jpg)
Stuart Herbert - http://blog.stuartherbert.com/php/Beyond Frameworks
... If They ...
• PSR0 - compliant autoloading
• PHPUnit tests
• Docbook manual
• Packages installed via PEAR installer
• Transparent version numbers
![Page 143: Beyond Frameworks](https://reader037.vdocuments.site/reader037/viewer/2022102510/546dbddaaf7959fb678b6dfe/html5/thumbnails/143.jpg)
Stuart Herbert - http://blog.stuartherbert.com/php/Beyond Frameworks
... If They ...
• PSR0 - compliant autoloading
• PHPUnit tests
• Docbook manual
• Packages installed via PEAR installer
• Transparent version numbers
![Page 144: Beyond Frameworks](https://reader037.vdocuments.site/reader037/viewer/2022102510/546dbddaaf7959fb678b6dfe/html5/thumbnails/144.jpg)
Stuart Herbert - http://blog.stuartherbert.com/php/Beyond Frameworks
4: An Example
![Page 145: Beyond Frameworks](https://reader037.vdocuments.site/reader037/viewer/2022102510/546dbddaaf7959fb678b6dfe/html5/thumbnails/145.jpg)
Stuart Herbert - http://blog.stuartherbert.com/php/Beyond Frameworks
Sales Pitch
Sales Website
Product Specs
AvailabilityChecker
We Sell Broadband Via Our Sales Website ...
![Page 146: Beyond Frameworks](https://reader037.vdocuments.site/reader037/viewer/2022102510/546dbddaaf7959fb678b6dfe/html5/thumbnails/146.jpg)
Stuart Herbert - http://blog.stuartherbert.com/php/Beyond Frameworks
Sales Pitch
Sales Website
Product Specs
AvailabilityChecker
Customer Account
Control Panel
Invoicing
AvailabilityChecker
And Our Customer Control Panel
![Page 147: Beyond Frameworks](https://reader037.vdocuments.site/reader037/viewer/2022102510/546dbddaaf7959fb678b6dfe/html5/thumbnails/147.jpg)
Stuart Herbert - http://blog.stuartherbert.com/php/Beyond Frameworks
Sales Pitch
Sales Website
Product Specs
AvailabilityChecker
Customer Account
Control Panel
Invoicing
AvailabilityChecker
iFrame
The Control Panel Holds The Code HostageThe Sales Site Relies On An iFrame
![Page 148: Beyond Frameworks](https://reader037.vdocuments.site/reader037/viewer/2022102510/546dbddaaf7959fb678b6dfe/html5/thumbnails/148.jpg)
Stuart Herbert - http://blog.stuartherbert.com/php/Beyond Frameworks
Sales Pitch
Sales Website
Product Specs
AvailabilityChecker
Customer Account
Control Panel
Invoicing
AvailabilityChecker
Provisioning
Third Party
Faults
AvailabilityChecker
... And The Control Panel TalksTo The Third Party Who Provides Our Broadband
SOAPiFrame
![Page 149: Beyond Frameworks](https://reader037.vdocuments.site/reader037/viewer/2022102510/546dbddaaf7959fb678b6dfe/html5/thumbnails/149.jpg)
Stuart Herbert - http://blog.stuartherbert.com/php/Beyond Frameworks
Sales Pitch
Sales Website
Product Specs
AvailabilityChecker
Customer Account
Control Panel
Invoicing
AvailabilityChecker
Provisioning
Third Party
Faults
AvailabilityChecker
We Wanted To Sell Exciting New Broadband ProductsFrom An Alternative Third Party As Well
SOAPiFrame
![Page 150: Beyond Frameworks](https://reader037.vdocuments.site/reader037/viewer/2022102510/546dbddaaf7959fb678b6dfe/html5/thumbnails/150.jpg)
Stuart Herbert - http://blog.stuartherbert.com/php/Beyond Frameworks
Sales Pitch
Sales Website
Product Specs
AvailabilityChecker
Customer Account
Control Panel
Invoicing
AvailabilityChecker
Provisioning
Third Party
Faults
AvailabilityChecker
Changing The Control PanelWas Going To Be Expensive ...
SOAPiFrame
![Page 151: Beyond Frameworks](https://reader037.vdocuments.site/reader037/viewer/2022102510/546dbddaaf7959fb678b6dfe/html5/thumbnails/151.jpg)
Stuart Herbert - http://blog.stuartherbert.com/php/Beyond Frameworks
Sales Pitch
Sales Website
Product Specs
AvailabilityChecker
Customer Account
Control Panel
Invoicing
AvailabilityChecker
Provisioning
Third Party
Faults
AvailabilityChecker
... But Was The Only WayTo Change The Sales Website
SOAPiFrame
![Page 152: Beyond Frameworks](https://reader037.vdocuments.site/reader037/viewer/2022102510/546dbddaaf7959fb678b6dfe/html5/thumbnails/152.jpg)
Stuart Herbert - http://blog.stuartherbert.com/php/Beyond Frameworks
Sales Pitch
Sales Website
Product Specs
AvailabilityChecker
Customer Account
Control Panel
Invoicing
AvailabilityChecker
Provisioning
Third Party
Faults
AvailabilityChecker
Problem Is ...We Are Due To Retire This Control Panel
![Page 153: Beyond Frameworks](https://reader037.vdocuments.site/reader037/viewer/2022102510/546dbddaaf7959fb678b6dfe/html5/thumbnails/153.jpg)
Stuart Herbert - http://blog.stuartherbert.com/php/Beyond Frameworks
Sales Pitch
Sales Website
Product Specs
AvailabilityChecker
AvailabilityChecker
Provisioning
Third Party
Faults
AvailabilityChecker
We Separated Out The Business LogicOf The Availability Checker
SOAP
![Page 154: Beyond Frameworks](https://reader037.vdocuments.site/reader037/viewer/2022102510/546dbddaaf7959fb678b6dfe/html5/thumbnails/154.jpg)
Stuart Herbert - http://blog.stuartherbert.com/php/Beyond Frameworks
Sales Pitch
Sales Website
Product Specs
AvailabilityChecker
Customer Account
Control Panel
Invoicing
AvailabilityChecker
Provisioning
Third Party
Faults
AvailabilityChecker
Sales Can Now Improve Their WebsiteWithout Having To Rely On Control Panel’s Roadmap
SOAP
![Page 155: Beyond Frameworks](https://reader037.vdocuments.site/reader037/viewer/2022102510/546dbddaaf7959fb678b6dfe/html5/thumbnails/155.jpg)
Stuart Herbert - http://blog.stuartherbert.com/php/Beyond Frameworks
Sales Pitch
Sales Website
Product Specs
AvailabilityChecker
Customer Account
Control Panel
Invoicing
AvailabilityChecker
Provisioning
Third Party
Faults
AvailabilityChecker
Allowing Engineering To RetireThis Version Of The Control Panel
![Page 156: Beyond Frameworks](https://reader037.vdocuments.site/reader037/viewer/2022102510/546dbddaaf7959fb678b6dfe/html5/thumbnails/156.jpg)
Stuart Herbert - http://blog.stuartherbert.com/php/Beyond Frameworks
Sales Pitch
Sales Website
Product Specs
AvailabilityChecker
Customer Account
Control Panel 2
Invoicing
AvailabilityChecker
Provisioning
Third Party
Faults
AvailabilityChecker
And The New Control PanelWill Simply Re-use The Component Before Launch
![Page 157: Beyond Frameworks](https://reader037.vdocuments.site/reader037/viewer/2022102510/546dbddaaf7959fb678b6dfe/html5/thumbnails/157.jpg)
Stuart Herbert - http://blog.stuartherbert.com/php/Beyond Frameworks
• 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 apps
Moving To Components
![Page 158: Beyond Frameworks](https://reader037.vdocuments.site/reader037/viewer/2022102510/546dbddaaf7959fb678b6dfe/html5/thumbnails/158.jpg)
Stuart Herbert - http://blog.stuartherbert.com/php/Beyond Frameworks
• 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 apps
Moving To Components
![Page 159: Beyond Frameworks](https://reader037.vdocuments.site/reader037/viewer/2022102510/546dbddaaf7959fb678b6dfe/html5/thumbnails/159.jpg)
Stuart Herbert - http://blog.stuartherbert.com/php/Beyond Frameworks
• 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 apps
Moving To Components
![Page 160: Beyond Frameworks](https://reader037.vdocuments.site/reader037/viewer/2022102510/546dbddaaf7959fb678b6dfe/html5/thumbnails/160.jpg)
Stuart Herbert - http://blog.stuartherbert.com/php/Beyond Frameworks
• 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 apps
Moving To Components
![Page 161: Beyond Frameworks](https://reader037.vdocuments.site/reader037/viewer/2022102510/546dbddaaf7959fb678b6dfe/html5/thumbnails/161.jpg)
Stuart Herbert - http://blog.stuartherbert.com/php/Beyond Frameworks
• 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 apps
Moving To Components
![Page 162: Beyond Frameworks](https://reader037.vdocuments.site/reader037/viewer/2022102510/546dbddaaf7959fb678b6dfe/html5/thumbnails/162.jpg)
[email protected] - http://blog.stuartherbert.com/php/
Stuart Herbert
Thanks For Your Time
Feedback welcome!
I’d love to hear your stories
![Page 163: Beyond Frameworks](https://reader037.vdocuments.site/reader037/viewer/2022102510/546dbddaaf7959fb678b6dfe/html5/thumbnails/163.jpg)
[email protected] - http://blog.stuartherbert.com/php/
Stuart Herbert
This photo: http://flic.kr/p/3PU451