SlideShare ist ein Scribd-Unternehmen logo
1 von 68
ZendCon09  How to run an enterprise PHP shop. By   Jim Plush - Technical Lead, Panasonic
Writing Code is the Easy Part A closer look at some of the process that goes along with being a technical lead.
Balancing process and productivity
The balance between process and productivity The main objective is to find the least amount of process required to get clean, stable, well tested, well documented, maintainable code.  If there is too much process, productivity and creativity are stifled. Too little process and you run the risk of delays, instability, maintability concerns and customer dissatisfaction.  This balance is something that needs to be revisited often with feedback from the teams.
The importance of balance When process is so cumbersome that it hampers productivity, it will slow product delivery. Longer product delivery cycles create openings which startups and competitors will take advantage of. This is how companies not only lose market share but also high performing employees due to the barriers put in place that prevent them from doing their jobs efficiently.
Why Process? The larger your application grows, the more important foundation becomes.
When process fails The larger your application grows the  more important foundation becomes.
The Building Blocks For Your Team ,[object Object],[object Object],[object Object],[object Object],[object Object]
Team Management: Building your team ,[object Object],[object Object],[object Object]
Where to find developers ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
How to interview developers ,[object Object],[object Object],[object Object],[object Object],[object Object]
In Person Interview ,[object Object],[object Object],[object Object],[object Object],[object Object]
Wrong Questions ,[object Object],[object Object],[object Object],How would you load an elephant on a 787?
Better Question ,[object Object],[object Object],[object Object],A user reported the website is running slow. What steps do you take to address the issue?
Other good phone questions I like ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Development ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Development: Setting Developer Expectations ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Development: Documentation Standards ,[object Object],[object Object],[object Object],[object Object]
Documentation: What's the difference? A Requirements Document is a contract between the client (even internal users) and the application. It should use terminology that is easily read by management and non-technical stakeholders.   Even in an agile process a requirements document should be flushed out at a high level before starting development.   The requirements document is how you know when something is done.
Requirements Document ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Design Document The design document is aimed at the technical and testing audience. It is used to define how to actually implement the system you're designing. UML, schema designs, API lists can all go into the design doc. The design document should outline how the system makes decisions and what constraints are placed on them. The Quality Assurance team should be able to create a test plan based on this document.
Design Document Contents ,[object Object],[object Object],[object Object],[object Object],[object Object]
Test Plan Document The test plan document is used by the QA team to verify the requirements and design are met and can be tested against every release.    The test plan is used to create automation against (Selenium,  WinRunner, etc) Automation of the test plan ensures consistent user experience.
Test Plan Contents REQ123 - Search for product Test Cases ID:  1 Action:  Create a new product then type in the product name in the search bar Expected:  The product that was created appears in the search list Actual Result: Pass/Fail:   Comment:     
Documentation: But I just want to code This is where setting team expectations comes in. Documentation is part of the job of any engineer, including software engineers. It helps new product managers, stakeholders, developers get an understanding of what a product is supposed to do and why it's doing it.    The goal should not be to generate the most documentation but "enough" documentation to get the job done.
Source Control Management ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
SCM Rules ,[object Object],[object Object],[object Object],[object Object]
Coding Standards ,[object Object],[object Object],[object Object]
Frameworks In multi developer environments it makes sense to invest in frameworks.    At a high level Zend Framework, Cake, Symphony all offer similar feature sets. To maximize code reuse standardize on a single one for the team. Frameworks cost upfront time but that is paid back many ways down the line.
Life Before A Framework ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Life Before A Framework No sharing of code bases, no common standards for security, access control, authorization, UI presentation, reporting .
Why I chose Zend Framework for Enterprise ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
After Zend Framework Sites are plugged in as modules. Allowing for complete sharing of all features, giving the user a consistent experience while also getting the benefits of easier deployments and maintenance for the operations team.
The myth that Zend Framework is slow ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Unit Testing    Code does not exist until it's tested. The "Liger" Effect  
Unit Testing: The Gift that Keeps On Giving ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Unit Testing: The Cornerstone ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Unit Testing: Unit vs Itegration Generally a unit test is considered a unit test when you're testing one coheisive action. A unit test may span multiple classes if you control those classes.    Once a test touches 3rd party libraries or external resources (databases, filesystem, web service) it's generally considered an integration test.  If your test class needs a tear down method you most likely have an integration test.         
Unit Testing: Unit vs Itegration So what's the rub against integration tests?    Answer: NONE!   Most web applications benefit more from integration tests. Both require a decent amount of setup (resource management vs mock management).    Your suites should include both however for speed purposes you may want to separate the integration tests into a separate suite due to the slower run time.  
Unit Testing: Itegration testing practices Use Builders to help with schema change   If my test requires a new user to test against I could insert that into the db by hand which would lead to brittle tests if  you have 3000 tests and all the sudden you change the user schema.  Or I could use a UserBuilder to abstract that API to a central place.
Unit Testing: Builders public function testUserCanUpgradeStatus() {      $userBuilder  = new UserBuilder();      $user  =  $userBuilder -> withFirstName ('Jim')                                       - > withEmail ('jim@test.com')                                       -> build ();      $user -> upgradeToStatus ('preferred');      $this -> assertTrue ($user-> canReserveSuite () === true,                "User was not able to upgrade to preferred status"); }
Unit Testing: Builder Benefits Using Builders allows you to abstract the creation of test data into a series of fluent APIs. Tests are no longer as brittle with all tests now using Builders instead of direct SQL manipulation. You can have as many builders as you need! UserBuilder, CompanyBuilder, ProductBuilder, OrderBuilder, etc...
Unit Testing: Builder Performance Benefits Using Builders can also speed up your integration suite as the builder can be combined with object caching or data caching to reduce the duplicate data that exists across tests. If 1000 tests use the same User information to base tests against, return the instance of the 1st created one (if unchanged).
Unit Testing: Continuous Integration
Unit Testing: Continuous Itegration The goal of continuous integration is to spot issues early and reliably. You create a script that runs every x seconds or monitors your repository. When it detects a change it grabs that code, packages up your project, runts the unit test suites, and alerts developers of any immediate issues.    Common CI Frameworks: PHPUnderControl, Xinc, CruiseControl, or write your own. The concepts are simple.
Unit Testing: Continuous Itegration Your script should be fully automated and reliable. If there is a failure it's the teams priority to address it.  If the code passes all of the tests, package it up and make it available for non-developers or QA teams (if needed). Developers should checkin early and often as pieces are complete.  Every checkin should be uniquely validated against to have fine grained reporting on which change "broke" the build.
Release Process: Getting Code to Customers The release process defines who, how, and when code is release to a production environment.
Release Process: Quality Expectations Local Dev Test Production
Release Process: Best Practices Minimizing release issues can save time and headaches. If there is one thing you should define first, it's your code release process.  It should be controlled and precise. Developers generally should not be pushing to test or production.
Release Process: Dev Servers ,[object Object],[object Object],[object Object],[object Object],[object Object]
Release Process: Test Servers ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Release Process: The bug bash ,[object Object],[object Object],[object Object],[object Object],[object Object]
Release Process: The bug bash ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Maintenance ,[object Object],[object Object],[object Object],[object Object]
Issue Tracking ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Issue Tracking: Bug Scrubs A bug scrub is a daily or weekly meeting with technical leads, managers and product managers with the aim of addressing the open issue list for a give project or projects.  The goal is to make sure bugs/feature requests are addressed in a timely manner with the appropriate release tags and supporting information. Issues can be rolled into iterations as they get processed.
Issue Tracking: Bug Scrubs ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Issue Tracking If the issues are tagged with the appropriate release information, QA is able to pull a report from the system to use for release testing without having to guess at what's in the release or rely on developer's memories.  If issues are further labeled with modules or functional pieces of code, metrics reports can be run that can identify key pieces that made be candidates for re-factoring or redesign. e.g., if 60% of the issues are in user management, more testing efforts can be directed to it.
Customer Support After a major release you have to expect an increased flow of issues into the system. Daily bug scrubs may be required to properly filter out duplicates and "training" issues.  Set up a front line person that can immediately filter and address issues as they come in. Rotate this position around the team weekly. This allows everyone to get a glimpse into how the customers interact with the system and where the areas of concern are so they can apply those to future development
Monitoring: System and Business ,[object Object],[object Object],[object Object]
Monitoring: Disaster Recovery ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Monitoring: Disaster Recovery Execute your disaster recovery at least once to ensure procedures work correctly for moving the pointers to the secondary data center but also for moving that data back to the primary when and if it's made available again. You don't want to guess that your D.R. site works.
Security ,[object Object],[object Object],[object Object],[object Object],[object Object]
Security: Plan to be attacked If your site offers any value, chances are it will be probed by malicious users. The value of your data directly correlates to the intensity of the attacks.    You should proactively monitor security breaches both in the operations team and in code.  Have a plan of action to take when an attack has been verified. What information to log, authorities to notify, upper management notices, etc...
Security: Code Defensively ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Security: Social Engineering ,[object Object],[object Object],[object Object],[object Object],[object Object]
Security: Audits ,[object Object],[object Object],[object Object],[object Object]
The End contact: jiminoc@gmail.com  litfuel.net/plush twitter: jiminoc http://joind.in/talk/view/931    

Weitere ähnliche Inhalte

Was ist angesagt?

software testing for beginners
software testing for beginnerssoftware testing for beginners
software testing for beginners
Bharathi Ashok
 
Testing and DevOps Culture: Lessons Learned
Testing and DevOps Culture: Lessons LearnedTesting and DevOps Culture: Lessons Learned
Testing and DevOps Culture: Lessons Learned
LB Denker
 

Was ist angesagt? (20)

Karate API Testing-Complete Guidance by Testrig
Karate API Testing-Complete Guidance by TestrigKarate API Testing-Complete Guidance by Testrig
Karate API Testing-Complete Guidance by Testrig
 
Continuous Delivery for Agile Teams
Continuous Delivery for Agile TeamsContinuous Delivery for Agile Teams
Continuous Delivery for Agile Teams
 
Test Automation Strategies For Agile
Test Automation Strategies For AgileTest Automation Strategies For Agile
Test Automation Strategies For Agile
 
Test for Success: 5 Steps to Usability Testing Success
Test for Success: 5 Steps to Usability Testing SuccessTest for Success: 5 Steps to Usability Testing Success
Test for Success: 5 Steps to Usability Testing Success
 
Risk Mitigation Using Exploratory and Technical Testing | QASymphony Webinar
Risk Mitigation Using Exploratory and Technical Testing | QASymphony WebinarRisk Mitigation Using Exploratory and Technical Testing | QASymphony Webinar
Risk Mitigation Using Exploratory and Technical Testing | QASymphony Webinar
 
software testing for beginners
software testing for beginnerssoftware testing for beginners
software testing for beginners
 
Making the Move to Behavior Driven Development
Making the Move to Behavior Driven DevelopmentMaking the Move to Behavior Driven Development
Making the Move to Behavior Driven Development
 
Testing in Agile Projects
Testing in Agile ProjectsTesting in Agile Projects
Testing in Agile Projects
 
Compare squish tool vs telerik tool
Compare squish tool vs telerik toolCompare squish tool vs telerik tool
Compare squish tool vs telerik tool
 
Best Practices for Testing in salesforce.com
Best Practices for Testing in salesforce.comBest Practices for Testing in salesforce.com
Best Practices for Testing in salesforce.com
 
Continuous Deployment and Testing Workshop from Better Software West
Continuous Deployment and Testing Workshop from Better Software WestContinuous Deployment and Testing Workshop from Better Software West
Continuous Deployment and Testing Workshop from Better Software West
 
Team Foundation Server Process Templates For Effective Project Management
Team Foundation Server Process Templates For Effective Project ManagementTeam Foundation Server Process Templates For Effective Project Management
Team Foundation Server Process Templates For Effective Project Management
 
From Zero to 2.7 Million - How Verizon Media Embraced Open Source to Accelera...
From Zero to 2.7 Million - How Verizon Media Embraced Open Source to Accelera...From Zero to 2.7 Million - How Verizon Media Embraced Open Source to Accelera...
From Zero to 2.7 Million - How Verizon Media Embraced Open Source to Accelera...
 
DevOps Summit 2015 Presentation: Continuous Testing At the Speed of DevOps
DevOps Summit 2015 Presentation: Continuous Testing At the Speed of DevOpsDevOps Summit 2015 Presentation: Continuous Testing At the Speed of DevOps
DevOps Summit 2015 Presentation: Continuous Testing At the Speed of DevOps
 
Software presentation
Software presentationSoftware presentation
Software presentation
 
Closing the Requirements and Testing Loop Webinar
Closing the Requirements and Testing Loop WebinarClosing the Requirements and Testing Loop Webinar
Closing the Requirements and Testing Loop Webinar
 
5 Steps to Jump Start Your Test Automation
5 Steps to Jump Start Your Test Automation5 Steps to Jump Start Your Test Automation
5 Steps to Jump Start Your Test Automation
 
Inverting Test Pyramid - A First Hand Experience Report
Inverting Test Pyramid - A First Hand Experience ReportInverting Test Pyramid - A First Hand Experience Report
Inverting Test Pyramid - A First Hand Experience Report
 
Enhancing your Test automation Scenario Coverage Using Selenium by Eran Kinsb...
Enhancing your Test automation Scenario Coverage Using Selenium by Eran Kinsb...Enhancing your Test automation Scenario Coverage Using Selenium by Eran Kinsb...
Enhancing your Test automation Scenario Coverage Using Selenium by Eran Kinsb...
 
Testing and DevOps Culture: Lessons Learned
Testing and DevOps Culture: Lessons LearnedTesting and DevOps Culture: Lessons Learned
Testing and DevOps Culture: Lessons Learned
 

Ähnlich wie How to run an Enterprise PHP Shop

CucumberSeleniumWD
CucumberSeleniumWDCucumberSeleniumWD
CucumberSeleniumWD
Vikas Sarin
 
Code Review
Code ReviewCode Review
Code Review
Ravi Raj
 
Agile Methodologies And Extreme Programming - Svetlin Nakov
Agile Methodologies And Extreme Programming - Svetlin NakovAgile Methodologies And Extreme Programming - Svetlin Nakov
Agile Methodologies And Extreme Programming - Svetlin Nakov
Svetlin Nakov
 
manas expre-01
manas expre-01manas expre-01
manas expre-01
Manas Rout
 

Ähnlich wie How to run an Enterprise PHP Shop (20)

Agile & DevOps - It's all about project success
Agile & DevOps - It's all about project successAgile & DevOps - It's all about project success
Agile & DevOps - It's all about project success
 
Behavior Driven Development—A Guide to Agile Practices by Josh Eastman
Behavior Driven Development—A Guide to Agile Practices by Josh EastmanBehavior Driven Development—A Guide to Agile Practices by Josh Eastman
Behavior Driven Development—A Guide to Agile Practices by Josh Eastman
 
Software Development Standard Operating Procedure
Software Development Standard Operating Procedure Software Development Standard Operating Procedure
Software Development Standard Operating Procedure
 
CucumberSeleniumWD
CucumberSeleniumWDCucumberSeleniumWD
CucumberSeleniumWD
 
Quality Software Development
Quality Software DevelopmentQuality Software Development
Quality Software Development
 
Introduction to Software Engineering
Introduction to Software EngineeringIntroduction to Software Engineering
Introduction to Software Engineering
 
Choosing right-automation-tool
Choosing right-automation-toolChoosing right-automation-tool
Choosing right-automation-tool
 
Agile Methodologies And Extreme Programming
Agile Methodologies And Extreme ProgrammingAgile Methodologies And Extreme Programming
Agile Methodologies And Extreme Programming
 
Automated Acceptance Tests & Tool choice
Automated Acceptance Tests & Tool choiceAutomated Acceptance Tests & Tool choice
Automated Acceptance Tests & Tool choice
 
Brown aug11 bsdmag
Brown aug11 bsdmagBrown aug11 bsdmag
Brown aug11 bsdmag
 
Test-Driven Development
Test-Driven DevelopmentTest-Driven Development
Test-Driven Development
 
Agile Development From A Developers Perspective
Agile Development From A Developers PerspectiveAgile Development From A Developers Perspective
Agile Development From A Developers Perspective
 
Continuous Integration
Continuous IntegrationContinuous Integration
Continuous Integration
 
Agile Testing: Best Practices and Methodology
Agile Testing: Best Practices and Methodology  Agile Testing: Best Practices and Methodology
Agile Testing: Best Practices and Methodology
 
Code Review
Code ReviewCode Review
Code Review
 
Markus Clermont - Surviving in an Agile Environment - Google - SoftTest Ireland
Markus Clermont - Surviving in an Agile Environment - Google - SoftTest IrelandMarkus Clermont - Surviving in an Agile Environment - Google - SoftTest Ireland
Markus Clermont - Surviving in an Agile Environment - Google - SoftTest Ireland
 
Agile Methodologies And Extreme Programming - Svetlin Nakov
Agile Methodologies And Extreme Programming - Svetlin NakovAgile Methodologies And Extreme Programming - Svetlin Nakov
Agile Methodologies And Extreme Programming - Svetlin Nakov
 
manas expre-01
manas expre-01manas expre-01
manas expre-01
 
Agile Testing 20021015
Agile Testing 20021015Agile Testing 20021015
Agile Testing 20021015
 
Introducing TDD to your project
Introducing TDD to your projectIntroducing TDD to your project
Introducing TDD to your project
 

Kürzlich hochgeladen

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Kürzlich hochgeladen (20)

Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024
 
Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 

How to run an Enterprise PHP Shop

  • 1. ZendCon09 How to run an enterprise PHP shop. By Jim Plush - Technical Lead, Panasonic
  • 2. Writing Code is the Easy Part A closer look at some of the process that goes along with being a technical lead.
  • 3. Balancing process and productivity
  • 4. The balance between process and productivity The main objective is to find the least amount of process required to get clean, stable, well tested, well documented, maintainable code. If there is too much process, productivity and creativity are stifled. Too little process and you run the risk of delays, instability, maintability concerns and customer dissatisfaction.  This balance is something that needs to be revisited often with feedback from the teams.
  • 5. The importance of balance When process is so cumbersome that it hampers productivity, it will slow product delivery. Longer product delivery cycles create openings which startups and competitors will take advantage of. This is how companies not only lose market share but also high performing employees due to the barriers put in place that prevent them from doing their jobs efficiently.
  • 6. Why Process? The larger your application grows, the more important foundation becomes.
  • 7. When process fails The larger your application grows the more important foundation becomes.
  • 8.
  • 9.
  • 10.
  • 11.
  • 12.
  • 13.
  • 14.
  • 15.
  • 16.
  • 17.
  • 18.
  • 19. Documentation: What's the difference? A Requirements Document is a contract between the client (even internal users) and the application. It should use terminology that is easily read by management and non-technical stakeholders.   Even in an agile process a requirements document should be flushed out at a high level before starting development.   The requirements document is how you know when something is done.
  • 20.
  • 21. Design Document The design document is aimed at the technical and testing audience. It is used to define how to actually implement the system you're designing. UML, schema designs, API lists can all go into the design doc. The design document should outline how the system makes decisions and what constraints are placed on them. The Quality Assurance team should be able to create a test plan based on this document.
  • 22.
  • 23. Test Plan Document The test plan document is used by the QA team to verify the requirements and design are met and can be tested against every release.    The test plan is used to create automation against (Selenium,  WinRunner, etc) Automation of the test plan ensures consistent user experience.
  • 24. Test Plan Contents REQ123 - Search for product Test Cases ID: 1 Action: Create a new product then type in the product name in the search bar Expected: The product that was created appears in the search list Actual Result: Pass/Fail:  Comment:    
  • 25. Documentation: But I just want to code This is where setting team expectations comes in. Documentation is part of the job of any engineer, including software engineers. It helps new product managers, stakeholders, developers get an understanding of what a product is supposed to do and why it's doing it.   The goal should not be to generate the most documentation but "enough" documentation to get the job done.
  • 26.
  • 27.
  • 28.
  • 29. Frameworks In multi developer environments it makes sense to invest in frameworks.    At a high level Zend Framework, Cake, Symphony all offer similar feature sets. To maximize code reuse standardize on a single one for the team. Frameworks cost upfront time but that is paid back many ways down the line.
  • 30.
  • 31. Life Before A Framework No sharing of code bases, no common standards for security, access control, authorization, UI presentation, reporting .
  • 32.
  • 33. After Zend Framework Sites are plugged in as modules. Allowing for complete sharing of all features, giving the user a consistent experience while also getting the benefits of easier deployments and maintenance for the operations team.
  • 34.
  • 35. Unit Testing   Code does not exist until it's tested. The "Liger" Effect  
  • 36.
  • 37.
  • 38. Unit Testing: Unit vs Itegration Generally a unit test is considered a unit test when you're testing one coheisive action. A unit test may span multiple classes if you control those classes.    Once a test touches 3rd party libraries or external resources (databases, filesystem, web service) it's generally considered an integration test. If your test class needs a tear down method you most likely have an integration test.        
  • 39. Unit Testing: Unit vs Itegration So what's the rub against integration tests?    Answer: NONE!   Most web applications benefit more from integration tests. Both require a decent amount of setup (resource management vs mock management).    Your suites should include both however for speed purposes you may want to separate the integration tests into a separate suite due to the slower run time.  
  • 40. Unit Testing: Itegration testing practices Use Builders to help with schema change   If my test requires a new user to test against I could insert that into the db by hand which would lead to brittle tests if  you have 3000 tests and all the sudden you change the user schema.  Or I could use a UserBuilder to abstract that API to a central place.
  • 41. Unit Testing: Builders public function testUserCanUpgradeStatus() {     $userBuilder = new UserBuilder();     $user = $userBuilder -> withFirstName ('Jim')                                       - > withEmail ('jim@test.com')                                       -> build ();     $user -> upgradeToStatus ('preferred');     $this -> assertTrue ($user-> canReserveSuite () === true,               "User was not able to upgrade to preferred status"); }
  • 42. Unit Testing: Builder Benefits Using Builders allows you to abstract the creation of test data into a series of fluent APIs. Tests are no longer as brittle with all tests now using Builders instead of direct SQL manipulation. You can have as many builders as you need! UserBuilder, CompanyBuilder, ProductBuilder, OrderBuilder, etc...
  • 43. Unit Testing: Builder Performance Benefits Using Builders can also speed up your integration suite as the builder can be combined with object caching or data caching to reduce the duplicate data that exists across tests. If 1000 tests use the same User information to base tests against, return the instance of the 1st created one (if unchanged).
  • 45. Unit Testing: Continuous Itegration The goal of continuous integration is to spot issues early and reliably. You create a script that runs every x seconds or monitors your repository. When it detects a change it grabs that code, packages up your project, runts the unit test suites, and alerts developers of any immediate issues.   Common CI Frameworks: PHPUnderControl, Xinc, CruiseControl, or write your own. The concepts are simple.
  • 46. Unit Testing: Continuous Itegration Your script should be fully automated and reliable. If there is a failure it's the teams priority to address it.  If the code passes all of the tests, package it up and make it available for non-developers or QA teams (if needed). Developers should checkin early and often as pieces are complete. Every checkin should be uniquely validated against to have fine grained reporting on which change "broke" the build.
  • 47. Release Process: Getting Code to Customers The release process defines who, how, and when code is release to a production environment.
  • 48. Release Process: Quality Expectations Local Dev Test Production
  • 49. Release Process: Best Practices Minimizing release issues can save time and headaches. If there is one thing you should define first, it's your code release process. It should be controlled and precise. Developers generally should not be pushing to test or production.
  • 50.
  • 51.
  • 52.
  • 53.
  • 54.
  • 55.
  • 56. Issue Tracking: Bug Scrubs A bug scrub is a daily or weekly meeting with technical leads, managers and product managers with the aim of addressing the open issue list for a give project or projects.  The goal is to make sure bugs/feature requests are addressed in a timely manner with the appropriate release tags and supporting information. Issues can be rolled into iterations as they get processed.
  • 57.
  • 58. Issue Tracking If the issues are tagged with the appropriate release information, QA is able to pull a report from the system to use for release testing without having to guess at what's in the release or rely on developer's memories. If issues are further labeled with modules or functional pieces of code, metrics reports can be run that can identify key pieces that made be candidates for re-factoring or redesign. e.g., if 60% of the issues are in user management, more testing efforts can be directed to it.
  • 59. Customer Support After a major release you have to expect an increased flow of issues into the system. Daily bug scrubs may be required to properly filter out duplicates and "training" issues.  Set up a front line person that can immediately filter and address issues as they come in. Rotate this position around the team weekly. This allows everyone to get a glimpse into how the customers interact with the system and where the areas of concern are so they can apply those to future development
  • 60.
  • 61.
  • 62. Monitoring: Disaster Recovery Execute your disaster recovery at least once to ensure procedures work correctly for moving the pointers to the secondary data center but also for moving that data back to the primary when and if it's made available again. You don't want to guess that your D.R. site works.
  • 63.
  • 64. Security: Plan to be attacked If your site offers any value, chances are it will be probed by malicious users. The value of your data directly correlates to the intensity of the attacks.    You should proactively monitor security breaches both in the operations team and in code.  Have a plan of action to take when an attack has been verified. What information to log, authorities to notify, upper management notices, etc...
  • 65.
  • 66.
  • 67.
  • 68. The End contact: jiminoc@gmail.com  litfuel.net/plush twitter: jiminoc http://joind.in/talk/view/931