SlideShare a Scribd company logo
Shahar Evron, Zend Technologies BUILDING SCALABLE DEVELOPMENT ENVIRONMENTS
Prologue Who am I ? Shahar – Pronunciation is not important! Working for Zend Technologies for the last 2½ years Spend much of my time watching others work ;) Who are you ? Executives ? Project / Product Managers ?  Development / Testing Team leaders?  Developers?
Prologue What is this all about ? A semi-technical checklist of good development practices No exciting news – most of you probably know / read about / applied some of these practices Aimed at helping you build a healthy development environment What is this  not  ? In any way related to application or server performance A technical guide An introduction to specific development or testing methodologies (RAD, XP, Scrum, etc.)
Scalability ? “ scalability is a desirable property of a system, a network, or a process, which indicates its ability to either handle growing amounts of work in a graceful manner, or to be readily enlarged.” André B. Bondi, Characteristics of scalability and their impact on performance
Develop Fast Produce maintainable code Avoid introducing new bugs Be able to easily refactor  as needed  (optimize and secure) Basically, be able to react to market (ing)  demands Scalability in development ?
The Basics: Always-True Best Practices As close as you can to production setup, but: E_STRICT | E_NOTICE compatibility Restrictive php.ini  short_open_tags, register_long_vars memory_limit register_globals, magic_quotes_gpc display_errors On
Standard Programming Style Unified coding standards help developers “get into the code” faster Less chance of typos that introduce bugs Clean Code == Good Code Matter of taste, but some basic rules apply to all No need to reinvent the wheel:  PEAR Coding Standards The Zend Framework PHP Code Standards If you create your own standards, document them
Standard Programming Style Always-true bug-reducing standards: Avoid short open tags Skip closing tag ( ?> ) when not required (you also save a couple of bytes on disk!) Use meaningful labels Document! Be E_NOTICE and E_STRICT compliant: <?php    echo  $info [ VERSION ];  // No good!    echo  $info [ 'VERSION' ];  // Better!  ?>
Standard Programming Style Readability is  extremely  important // Create the HTTP Client and send the request  $client =new  Zend_Http_Client ( 'http://www.example.com/' ,array(    'adapter' => 'Zend_Http_Client_Adapter_Proxy' , 'proxy_host' = '10.1.2.3' ,  'proxy_user' => 'shahar' , 'proxy_pass' => 'secret' ));  $client -> request ();  // Prepare HTTP client  $config  = array( 'adapter'  =>  'Zend_Http_Client_Adapter_Proxy' ,    'proxy_host'  =  '10.1.2.3' ,    'proxy_user'  =>  'shahar' ,    'proxy_pass'  =>  'secret' );  $client  = new  Zend_Http_Client ( 'http://www.example.com/' ,  $config );  // Send HTTP request  $client -> request ();
Peer-Review and Peer-Training Maintain high standards Make sure nobody leaves with all your in-house knowhow Encourage your developers' natural desire to learn and evolve Make architects out of code-monkeys ;)
Source / Revision Control Not just for rolling back your mistakes Allows your developers to work on the same modules without interfering with each other's work  Use advanced features: Tag before you release and when testing Branch major versions and when working on experimental changes Work on trunk, merge into production branches when needed, tag from branches, deploy from tags
Source / Revision Control Enforce good SCM practices: Update before you start working Run tests before committing Commit often After fixing a single bug or implementing a single feature Daily (?) Always use descriptive commit log entries Developers who commit broken code should be punished! Requires some discipline at first  ...but is well worth it!
Source / Revision Control “Classic” Branching Model Maintain a separate branch for each major version Merge relevant bug fixes to maintenance branch(es) after committing them to TRUNK.  You can also work on a maintenance branch without changing TRUNK.
Source / Revision Control “Release Once” Branching Model One release, lots of merges from TRUNK to  “Live”  branch Probably more suitable for the web No distinct major versions No back-porting of bug fixes (no maintenance branch) You can play with “Experimental” features on a separate branch
Bug Tracking Goes hand in hand with SCM Everything should be reported Nothing should fall between the cracks  BTS != TODO list Manage versions and targets Organize tasks according to their priorities Assign tasks to developers Make sure bugs are tested after they are “fixed”
Benchmarking and Testing Unit Testing Generally executed by the developers during the development phase (eg. Before committing) Usually PHPUnit or SimpleTest Generate code coverage reports New bug == new test Functional Testing Generally executed by testers during the testing phase Build scenarios and test plans Be organized as much as you can
Benchmarking and Testing
Benchmarking and Testing Benchmarking Build (at least one) typical user browsing scenario How many visitors are you expecting? Set up your load targets according to your business plans Make sure you can withstand those targets If not –  profile  and optimize Benchmarking tools: AB Apache Flood JMeter WebLoad
Putting It All Together Typical “healthy” development environments are organized in 3 tiers: Development Staging / Testing Production
Putting It All Together – Tier 1 Allow all developers to conveniently work on the entire project without “blocking” each other Each developer with it's own working copy, virtual host and DB snapshot However the server setup (PHP environment) should be identical and close to production setup A single “HEAD” virtual host, auto-updated on each commit will allow you to see “clean” progress Once a milestone is reached, it is tagged and pushed into the  testing environment
Putting It All Together – Tier 1
Putting It All Together – Tier 2 Staging should be identical in setup to production If you plan to run benchmarks on it, it should also have similar (or comparable) hardware  Test on static code snapshots (== tags), with some meaningful DB data snapshot Report all issues into a BTS with clear tag / target tracking If release objectives are not met, send back to developers for another RC Once you have a good RC tag it again and move to production
Putting It All Together – Tier 2
Putting It All Together – Tier 3 Nobody  should have access to production code It might be a good idea to do a quick run over the current issues in the BTS, to make sure nothing was left out Even minor fixes to production should be versioned and tagged before deployment Plan properly for production deployment Roll-back procedures, downtime etc. Is a DB schema going to change?
Putting It All Together – Tier 3
Epilogue Further Reading: Development Methodologies: Scrum, XP, FDD and Agile methodologies in general Source Control: Eric Sink's Source Control Howto The Subversion Book Bug Tracking Simon Tatham's “How to Report Bugs Effectively” Testing Context Driven Testing School
Thank You! ﺷﻜﺮﺍﹰ Qagaasakuq Grazie Tak Dank U Dankon Kiitos დიდი მადლობა Danke Qujanaq ευχαριστώ Merci どうも Рахмет 감사합니다 سوپاس Баярлалаа aahéhee' Takk Fyrir تشكر Dzięki спасибо Gracias asanteni ขอบคุณ teşekkürler дякую אַ  דאַנק ngiyabona תודה 多謝 謝謝 (Any Questions?)

More Related Content

PPTX
Topic production code
PPTX
Test Driven Development
PDF
Test driven development_continuous_integration
PDF
10 Benefits of Automated Testing
PPTX
Test automation
PDF
Testing practicies not only in scala
PPT
Scrum and Test-driven development
PPT
How to Build and Maintain Quality Drupal Sites with Automated Testing
Topic production code
Test Driven Development
Test driven development_continuous_integration
10 Benefits of Automated Testing
Test automation
Testing practicies not only in scala
Scrum and Test-driven development
How to Build and Maintain Quality Drupal Sites with Automated Testing

What's hot (20)

PPTX
How to Add Test Automation to your Quality Assurance Toolbelt
PPT
Automation testing IBM RFT - Rational Functional Tester
PPTX
Agile test practices
PDF
Mastering Test Automation: How to Use Selenium Successfully
PPTX
Continuous Test Automation via CI (CodeMash 2012) - Automating the Agile way
PDF
Test Driven Development
PDF
Project Management: Burn-Down Chart / OrangeHRM Project MOD (eng)
PPTX
A year of SonarQube and TFS/VSTS
PDF
Model-based Testing: Taking BDD/ATDD to the Next Level
PPTX
Functional & Performance Test Automation with CI
PDF
Serenity-BDD training
PPTX
Java Code Quality Tools
PPTX
Lessons Learned in Software Development: QA Infrastructure – Maintaining Rob...
PPTX
Tools for Software Testing
PPS
Final Automation Testing
PPTX
Unit tests benefits
ODP
Performance Regression Analysis: Accomplishments and Challenges
PDF
Testing automation in agile environment
PPTX
Improving Software Quality- 2-day Tester Training
PPT
Presentation_TDD
How to Add Test Automation to your Quality Assurance Toolbelt
Automation testing IBM RFT - Rational Functional Tester
Agile test practices
Mastering Test Automation: How to Use Selenium Successfully
Continuous Test Automation via CI (CodeMash 2012) - Automating the Agile way
Test Driven Development
Project Management: Burn-Down Chart / OrangeHRM Project MOD (eng)
A year of SonarQube and TFS/VSTS
Model-based Testing: Taking BDD/ATDD to the Next Level
Functional & Performance Test Automation with CI
Serenity-BDD training
Java Code Quality Tools
Lessons Learned in Software Development: QA Infrastructure – Maintaining Rob...
Tools for Software Testing
Final Automation Testing
Unit tests benefits
Performance Regression Analysis: Accomplishments and Challenges
Testing automation in agile environment
Improving Software Quality- 2-day Tester Training
Presentation_TDD
Ad

Viewers also liked (6)

PDF
Content Indexing with Zend_Search_Lucene
PPT
Sermon Aug 24
PPT
Sermon Aug 31
PDF
Zend Framework Components for non-framework Development
PPT
Pendrive Linux
Content Indexing with Zend_Search_Lucene
Sermon Aug 24
Sermon Aug 31
Zend Framework Components for non-framework Development
Pendrive Linux
Ad

Similar to Building Scalable Development Environments (20)

ODP
Kelly potvin nosurprises_odtug_oow12
PDF
Software Development Standard Operating Procedure
PPT
Presentation 1 open source tools in continuous integration environment v1.0
PDF
Ci tips and_tricks_linards_liepins
ODP
Best practice adoption (and lack there of)
ODP
Jbossworld Presentation
PPTX
CucumberSeleniumWD
PPTX
Agile & DevOps - It's all about project success
PDF
The "Holy Grail" of Dev/Ops
PPT
How to run an Enterprise PHP Shop
PPTX
Adrian marinica continuous integration in the visual studio world
PPTX
DevOps and Build Automation
PPT
Part 2 improving your software development v1.0
PPT
Waterfallacies V1 1
PPT
Effective Software Release Management
PDF
Confoo-Montreal-2016: Controlling Your Environments using Infrastructure as Code
PDF
Introducing TDD to your project
ODP
Intro To Version Control
PDF
Achieving Full Stack DevOps at Colonial Life
PDF
Adm Initial Proposal
Kelly potvin nosurprises_odtug_oow12
Software Development Standard Operating Procedure
Presentation 1 open source tools in continuous integration environment v1.0
Ci tips and_tricks_linards_liepins
Best practice adoption (and lack there of)
Jbossworld Presentation
CucumberSeleniumWD
Agile & DevOps - It's all about project success
The "Holy Grail" of Dev/Ops
How to run an Enterprise PHP Shop
Adrian marinica continuous integration in the visual studio world
DevOps and Build Automation
Part 2 improving your software development v1.0
Waterfallacies V1 1
Effective Software Release Management
Confoo-Montreal-2016: Controlling Your Environments using Infrastructure as Code
Introducing TDD to your project
Intro To Version Control
Achieving Full Stack DevOps at Colonial Life
Adm Initial Proposal

More from Shahar Evron (10)

PDF
Best Practices in PHP Application Deployment
PDF
Amazon Cloud Services and Zend Framework
PPTX
PHP and Zend Framework on Windows
PDF
Zend Server: A Guided Tour
PDF
Zend Server: Scalability & Performance
PDF
Intro To Couch Db
ODP
Scaling PHP Applications with Zend Platform
PDF
PHP ואבטחה - חלק שני
PDF
PHP ואבטחה - חלק ראשון
PDF
PHP - עבר הווה ועתיד
Best Practices in PHP Application Deployment
Amazon Cloud Services and Zend Framework
PHP and Zend Framework on Windows
Zend Server: A Guided Tour
Zend Server: Scalability & Performance
Intro To Couch Db
Scaling PHP Applications with Zend Platform
PHP ואבטחה - חלק שני
PHP ואבטחה - חלק ראשון
PHP - עבר הווה ועתיד

Recently uploaded (20)

PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
Encapsulation_ Review paper, used for researhc scholars
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PPT
Teaching material agriculture food technology
PPTX
Big Data Technologies - Introduction.pptx
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PPTX
A Presentation on Artificial Intelligence
PDF
NewMind AI Monthly Chronicles - July 2025
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
Approach and Philosophy of On baking technology
PDF
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
KodekX | Application Modernization Development
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
Building Integrated photovoltaic BIPV_UPV.pdf
Encapsulation_ Review paper, used for researhc scholars
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
NewMind AI Weekly Chronicles - August'25 Week I
Teaching material agriculture food technology
Big Data Technologies - Introduction.pptx
Understanding_Digital_Forensics_Presentation.pptx
A Presentation on Artificial Intelligence
NewMind AI Monthly Chronicles - July 2025
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Spectral efficient network and resource selection model in 5G networks
Advanced methodologies resolving dimensionality complications for autism neur...
Approach and Philosophy of On baking technology
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
Network Security Unit 5.pdf for BCA BBA.
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
KodekX | Application Modernization Development

Building Scalable Development Environments

  • 1. Shahar Evron, Zend Technologies BUILDING SCALABLE DEVELOPMENT ENVIRONMENTS
  • 2. Prologue Who am I ? Shahar – Pronunciation is not important! Working for Zend Technologies for the last 2½ years Spend much of my time watching others work ;) Who are you ? Executives ? Project / Product Managers ? Development / Testing Team leaders? Developers?
  • 3. Prologue What is this all about ? A semi-technical checklist of good development practices No exciting news – most of you probably know / read about / applied some of these practices Aimed at helping you build a healthy development environment What is this not ? In any way related to application or server performance A technical guide An introduction to specific development or testing methodologies (RAD, XP, Scrum, etc.)
  • 4. Scalability ? “ scalability is a desirable property of a system, a network, or a process, which indicates its ability to either handle growing amounts of work in a graceful manner, or to be readily enlarged.” André B. Bondi, Characteristics of scalability and their impact on performance
  • 5. Develop Fast Produce maintainable code Avoid introducing new bugs Be able to easily refactor as needed (optimize and secure) Basically, be able to react to market (ing) demands Scalability in development ?
  • 6. The Basics: Always-True Best Practices As close as you can to production setup, but: E_STRICT | E_NOTICE compatibility Restrictive php.ini short_open_tags, register_long_vars memory_limit register_globals, magic_quotes_gpc display_errors On
  • 7. Standard Programming Style Unified coding standards help developers “get into the code” faster Less chance of typos that introduce bugs Clean Code == Good Code Matter of taste, but some basic rules apply to all No need to reinvent the wheel: PEAR Coding Standards The Zend Framework PHP Code Standards If you create your own standards, document them
  • 8. Standard Programming Style Always-true bug-reducing standards: Avoid short open tags Skip closing tag ( ?> ) when not required (you also save a couple of bytes on disk!) Use meaningful labels Document! Be E_NOTICE and E_STRICT compliant: <?php echo $info [ VERSION ]; // No good! echo $info [ 'VERSION' ]; // Better! ?>
  • 9. Standard Programming Style Readability is extremely important // Create the HTTP Client and send the request $client =new Zend_Http_Client ( 'http://www.example.com/' ,array( 'adapter' => 'Zend_Http_Client_Adapter_Proxy' , 'proxy_host' = '10.1.2.3' , 'proxy_user' => 'shahar' , 'proxy_pass' => 'secret' )); $client -> request (); // Prepare HTTP client $config = array( 'adapter' => 'Zend_Http_Client_Adapter_Proxy' , 'proxy_host' = '10.1.2.3' , 'proxy_user' => 'shahar' , 'proxy_pass' => 'secret' ); $client = new Zend_Http_Client ( 'http://www.example.com/' , $config ); // Send HTTP request $client -> request ();
  • 10. Peer-Review and Peer-Training Maintain high standards Make sure nobody leaves with all your in-house knowhow Encourage your developers' natural desire to learn and evolve Make architects out of code-monkeys ;)
  • 11. Source / Revision Control Not just for rolling back your mistakes Allows your developers to work on the same modules without interfering with each other's work Use advanced features: Tag before you release and when testing Branch major versions and when working on experimental changes Work on trunk, merge into production branches when needed, tag from branches, deploy from tags
  • 12. Source / Revision Control Enforce good SCM practices: Update before you start working Run tests before committing Commit often After fixing a single bug or implementing a single feature Daily (?) Always use descriptive commit log entries Developers who commit broken code should be punished! Requires some discipline at first ...but is well worth it!
  • 13. Source / Revision Control “Classic” Branching Model Maintain a separate branch for each major version Merge relevant bug fixes to maintenance branch(es) after committing them to TRUNK. You can also work on a maintenance branch without changing TRUNK.
  • 14. Source / Revision Control “Release Once” Branching Model One release, lots of merges from TRUNK to “Live” branch Probably more suitable for the web No distinct major versions No back-porting of bug fixes (no maintenance branch) You can play with “Experimental” features on a separate branch
  • 15. Bug Tracking Goes hand in hand with SCM Everything should be reported Nothing should fall between the cracks BTS != TODO list Manage versions and targets Organize tasks according to their priorities Assign tasks to developers Make sure bugs are tested after they are “fixed”
  • 16. Benchmarking and Testing Unit Testing Generally executed by the developers during the development phase (eg. Before committing) Usually PHPUnit or SimpleTest Generate code coverage reports New bug == new test Functional Testing Generally executed by testers during the testing phase Build scenarios and test plans Be organized as much as you can
  • 18. Benchmarking and Testing Benchmarking Build (at least one) typical user browsing scenario How many visitors are you expecting? Set up your load targets according to your business plans Make sure you can withstand those targets If not – profile and optimize Benchmarking tools: AB Apache Flood JMeter WebLoad
  • 19. Putting It All Together Typical “healthy” development environments are organized in 3 tiers: Development Staging / Testing Production
  • 20. Putting It All Together – Tier 1 Allow all developers to conveniently work on the entire project without “blocking” each other Each developer with it's own working copy, virtual host and DB snapshot However the server setup (PHP environment) should be identical and close to production setup A single “HEAD” virtual host, auto-updated on each commit will allow you to see “clean” progress Once a milestone is reached, it is tagged and pushed into the testing environment
  • 21. Putting It All Together – Tier 1
  • 22. Putting It All Together – Tier 2 Staging should be identical in setup to production If you plan to run benchmarks on it, it should also have similar (or comparable) hardware Test on static code snapshots (== tags), with some meaningful DB data snapshot Report all issues into a BTS with clear tag / target tracking If release objectives are not met, send back to developers for another RC Once you have a good RC tag it again and move to production
  • 23. Putting It All Together – Tier 2
  • 24. Putting It All Together – Tier 3 Nobody should have access to production code It might be a good idea to do a quick run over the current issues in the BTS, to make sure nothing was left out Even minor fixes to production should be versioned and tagged before deployment Plan properly for production deployment Roll-back procedures, downtime etc. Is a DB schema going to change?
  • 25. Putting It All Together – Tier 3
  • 26. Epilogue Further Reading: Development Methodologies: Scrum, XP, FDD and Agile methodologies in general Source Control: Eric Sink's Source Control Howto The Subversion Book Bug Tracking Simon Tatham's “How to Report Bugs Effectively” Testing Context Driven Testing School
  • 27. Thank You! ﺷﻜﺮﺍﹰ Qagaasakuq Grazie Tak Dank U Dankon Kiitos დიდი მადლობა Danke Qujanaq ευχαριστώ Merci どうも Рахмет 감사합니다 سوپاس Баярлалаа aahéhee' Takk Fyrir تشكر Dzięki спасибо Gracias asanteni ขอบคุณ teşekkürler дякую אַ דאַנק ngiyabona תודה 多謝 謝謝 (Any Questions?)