SlideShare une entreprise Scribd logo
1  sur  19
Developing Easily Deployable PHP Applications John Mertic - SugarCRM http://joind.in/2059 @2010 SugarCRM Inc. All rights reserved.
Why deployable apps still matter 7/22/2010 @2010 SugarCRM Inc. All rights reserved. 2
What I’ll cover Writing portable code Enabling configuration and customization Strategies for testing and QA Making your code perform well @2010 SugarCRM Inc. All rights reserved. 7/22/2010 3
Writing portable code 7/22/2010 @2010 SugarCRM Inc. All rights reserved. 4 Source: http://www.flickr.com/photos/25339258@N05/2389910825/
Define your support matrix Operating System Any Linux, UNIX, OS X Windows Web Server Apache 1.3, 2.0, 2.2 IIS 6/7 using FastCGI Database MySQL 5.0, 5.1 SQL Server 2005, 2008 Oracle 9i, 10g PHP 5.2.x, 5.3.x Support most common configurations options mbstring.func_overload error_reporting = E_ALL Require only the most mainline extensions, plus Mbstrings ( i18n support ) Imap ( mail support ) Specific database extension ( mysql, mysqli, oci8, mssql, sqlsrv ) 7/22/2010 @2010 SugarCRM Inc. All rights reserved. 5
Design code that works for these platforms DB abstraction layer or ORM Make sure PHP features you are using are supported across support matrix Assume very little about the underlying system Example: Treat file system as case-sensitive, and file writes are only in one area. Detect what features the server has for you to use, have API to talk to them Example: User cache ( APC, Memcache, Wincache, etc ) 7/22/2010 @2010 SugarCRM Inc. All rights reserved. 6
Build and deploy! We build all 3 editions of SugarCRM from 1 codebase We add code tags around sections specific to a certain version. To test under each different edition, developers can run the build locally We also can tag in or out features on a per edition basis. 7/22/2010 @2010 SugarCRM Inc. All rights reserved. 7 Source: http://www.flickr.com/photos/eastcapital/4554220770/
Enabling configuration and customization 7/22/2010 @2010 SugarCRM Inc. All rights reserved. 8 Source: http://www.flickr.com/photos/miskypig/400004362/
Making it simple yet powerful for end users Expose configuration options thru multiple channels Remember, not everyone has source access Allow users to customize their UI interface easily Make what should be simple, simple 7/22/2010 @2010 SugarCRM Inc. All rights reserved. 9
Making it simple yet powerful for developers Create a safe place to make customizations Avoid painful upgrades Create an easy to use API Well defined and supported. Don’t break it! Create easy to use hooks for modifying / adding functionality Examples from SugarCRM include: Metadata driven views Logic Hooks Allow for internationalization and localization 7/22/2010 @2010 SugarCRM Inc. All rights reserved. 10
Strategies for testing and QA 7/22/2010 @2010 SugarCRM Inc. All rights reserved. 11 Source: http://www.flickr.com/photos/cglock/386033158/
Testing different configurations Impossible for us to test every single permutation, so we use VM stacks instead Windows Vista IIS-7 (FastCGI) PHP 5.2.8 MSSQL-2005 (PHP mssql driver)  Windows Server 2003 IIS-6 (FastCGI) PHP 5.2.11 MSSQL-2005 (PHP mssql driver)  CentOS 5 Apache-2.2.11 PHP 5.2.9 MySQL-5.1.33  Windows Server 2008 IIS-7 (FastCGI) PHP 5.3.1 MSSQL-2008 (Microsoft sqlsrv driver 1.1)  Windows XP Apache-1.3.41 PHP 5.2.13 MySQL-5.0.83 Oracle Enterprise Linux 5.1 Apache-2.0.63 PHP 5.3.2 ORCL-10g We test both new installations and upgrade scenarios; even customer instances! 7/22/2010 @2010 SugarCRM Inc. All rights reserved. 12
Automated Testing Tools Hudson (http://hudson-ci.org/) – Extensible CI Server Running on every checkin PHP lint ( php –l ) – Syntax checking for PHP source files PHPUnit (http://www.phpunit.de/) – Unit testing framework Runs once a day SODA – functional testing framework that leverages Watir SodaMachine – GUI tool for building SODA tests JMeter (http://jakarta.apache.org/jmeter/) - tool for testing a website under high load MeterMaid – XML language to write JMeter tests in SugarMMM (MeterMaid Maker) - utility to automate writing MeterMaid tests for SugarCRM TidBit – tool to make huge datasets for testing All runs are against all flavors and all supported platform stacks 7/22/2010 @2010 SugarCRM Inc. All rights reserved. 13
Making your code perform well 7/22/2010 @2010 SugarCRM Inc. All rights reserved. 14 Source: http://www.flickr.com/photos/tech1987/501427718/
What we do to help performance Try to do the basic stuff Avoid writing slow code Caching, and lots of it Combine, minify, and version JS / CSS / images Keep SQL queries as simple as possible Leave the rest to the Sys Admin Provide configuration options to turn off heavy features Enable the application to take advantage of it’s environment Example: Using APC, memcache, Zend_Cache, wincache with little to no configuration Provide best practices for various environments 7/22/2010 @2010 SugarCRM Inc. All rights reserved. 15
How we gauge performance Formal testing Use Jmeter (http://jakarta.apache.org/jmeter/) on a load test cluster to test raw response speed. Instance analysis Monitor web server logs to look for non-cached items Track slow queries Ad-hoc testing Profile PHP execution with XDebug Use Firebug to measure CSS / JS / image payload 7/22/2010 @2010 SugarCRM Inc. All rights reserved. 16
What are the lessons we have learned? Define what you will support and to what extent Write your code to be flexible to any environment Make customizing, configuring, and extending your application not painful for users or developers Test across your support matrix, using automation as much as possible Focus more on best                                          practices and general                                  performance, let admins                                        handle it from there. 10/9/10 @2010 SugarCRM Inc. All rights reserved. 17 Source: http://www.flickr.com/photos/dlanod/126386070/
About me and my company	 John Mertic http://jmertic.wordpress.com Twitter: @jmertic jmertic@sugarcrm.com ( Work ) jmertic@php.net ( PHP ) Slides available on slidesharehttp://slidesha.re/9LX3Jp SugarCRM http://www.sugarcrm.com We’re hiring! Learn more about SugarCRM’s  open source tools at http://developers.sugarcrm.com/opensource 7/22/2010 @2010 SugarCRM Inc. All rights reserved. 18 Buy my book!
Questions? Please give feedback at http://joind.in/2059 7/22/2010 @2010 SugarCRM Inc. All rights reserved. 19

Contenu connexe

Plus de John Mertic

LinuxTag 2011 - Using SugarCRM when you aren't doing CRM Examples of SugarCRM...
LinuxTag 2011 - Using SugarCRM when you aren't doing CRM Examples of SugarCRM...LinuxTag 2011 - Using SugarCRM when you aren't doing CRM Examples of SugarCRM...
LinuxTag 2011 - Using SugarCRM when you aren't doing CRM Examples of SugarCRM...John Mertic
 
Making Software Management tools work for you - 2011 PHPBenelux Conference
Making Software Management tools work for you - 2011 PHPBenelux ConferenceMaking Software Management tools work for you - 2011 PHPBenelux Conference
Making Software Management tools work for you - 2011 PHPBenelux ConferenceJohn Mertic
 
SugarCON 2009 - Theme Development in Sugar 5.5
SugarCON 2009 - Theme Development in Sugar 5.5SugarCON 2009 - Theme Development in Sugar 5.5
SugarCON 2009 - Theme Development in Sugar 5.5John Mertic
 
Developing Easily Deployable PHP Applications ( OSCON 2010 )
Developing Easily Deployable PHP Applications ( OSCON 2010 )Developing Easily Deployable PHP Applications ( OSCON 2010 )
Developing Easily Deployable PHP Applications ( OSCON 2010 )John Mertic
 
SugarCon 2010 - Sugar as a Business Application Framework
SugarCon 2010 - Sugar as a Business Application Framework SugarCon 2010 - Sugar as a Business Application Framework
SugarCon 2010 - Sugar as a Business Application Framework John Mertic
 
SugarCon 2010 - Best Practices for Creating Custom Apps in Sugar
SugarCon 2010 - Best Practices for Creating Custom Apps in SugarSugarCon 2010 - Best Practices for Creating Custom Apps in Sugar
SugarCon 2010 - Best Practices for Creating Custom Apps in SugarJohn Mertic
 
2009 Ontario GNU Linux Fest - Build your business on SugarCRM
2009 Ontario GNU Linux Fest - Build your business on SugarCRM2009 Ontario GNU Linux Fest - Build your business on SugarCRM
2009 Ontario GNU Linux Fest - Build your business on SugarCRMJohn Mertic
 

Plus de John Mertic (7)

LinuxTag 2011 - Using SugarCRM when you aren't doing CRM Examples of SugarCRM...
LinuxTag 2011 - Using SugarCRM when you aren't doing CRM Examples of SugarCRM...LinuxTag 2011 - Using SugarCRM when you aren't doing CRM Examples of SugarCRM...
LinuxTag 2011 - Using SugarCRM when you aren't doing CRM Examples of SugarCRM...
 
Making Software Management tools work for you - 2011 PHPBenelux Conference
Making Software Management tools work for you - 2011 PHPBenelux ConferenceMaking Software Management tools work for you - 2011 PHPBenelux Conference
Making Software Management tools work for you - 2011 PHPBenelux Conference
 
SugarCON 2009 - Theme Development in Sugar 5.5
SugarCON 2009 - Theme Development in Sugar 5.5SugarCON 2009 - Theme Development in Sugar 5.5
SugarCON 2009 - Theme Development in Sugar 5.5
 
Developing Easily Deployable PHP Applications ( OSCON 2010 )
Developing Easily Deployable PHP Applications ( OSCON 2010 )Developing Easily Deployable PHP Applications ( OSCON 2010 )
Developing Easily Deployable PHP Applications ( OSCON 2010 )
 
SugarCon 2010 - Sugar as a Business Application Framework
SugarCon 2010 - Sugar as a Business Application Framework SugarCon 2010 - Sugar as a Business Application Framework
SugarCon 2010 - Sugar as a Business Application Framework
 
SugarCon 2010 - Best Practices for Creating Custom Apps in Sugar
SugarCon 2010 - Best Practices for Creating Custom Apps in SugarSugarCon 2010 - Best Practices for Creating Custom Apps in Sugar
SugarCon 2010 - Best Practices for Creating Custom Apps in Sugar
 
2009 Ontario GNU Linux Fest - Build your business on SugarCRM
2009 Ontario GNU Linux Fest - Build your business on SugarCRM2009 Ontario GNU Linux Fest - Build your business on SugarCRM
2009 Ontario GNU Linux Fest - Build your business on SugarCRM
 

Dernier

Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfPrecisely
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 

Dernier (20)

Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 

PHPNW 2010 - Developing Easily Deployable PHP Applications

  • 1. Developing Easily Deployable PHP Applications John Mertic - SugarCRM http://joind.in/2059 @2010 SugarCRM Inc. All rights reserved.
  • 2. Why deployable apps still matter 7/22/2010 @2010 SugarCRM Inc. All rights reserved. 2
  • 3. What I’ll cover Writing portable code Enabling configuration and customization Strategies for testing and QA Making your code perform well @2010 SugarCRM Inc. All rights reserved. 7/22/2010 3
  • 4. Writing portable code 7/22/2010 @2010 SugarCRM Inc. All rights reserved. 4 Source: http://www.flickr.com/photos/25339258@N05/2389910825/
  • 5. Define your support matrix Operating System Any Linux, UNIX, OS X Windows Web Server Apache 1.3, 2.0, 2.2 IIS 6/7 using FastCGI Database MySQL 5.0, 5.1 SQL Server 2005, 2008 Oracle 9i, 10g PHP 5.2.x, 5.3.x Support most common configurations options mbstring.func_overload error_reporting = E_ALL Require only the most mainline extensions, plus Mbstrings ( i18n support ) Imap ( mail support ) Specific database extension ( mysql, mysqli, oci8, mssql, sqlsrv ) 7/22/2010 @2010 SugarCRM Inc. All rights reserved. 5
  • 6. Design code that works for these platforms DB abstraction layer or ORM Make sure PHP features you are using are supported across support matrix Assume very little about the underlying system Example: Treat file system as case-sensitive, and file writes are only in one area. Detect what features the server has for you to use, have API to talk to them Example: User cache ( APC, Memcache, Wincache, etc ) 7/22/2010 @2010 SugarCRM Inc. All rights reserved. 6
  • 7. Build and deploy! We build all 3 editions of SugarCRM from 1 codebase We add code tags around sections specific to a certain version. To test under each different edition, developers can run the build locally We also can tag in or out features on a per edition basis. 7/22/2010 @2010 SugarCRM Inc. All rights reserved. 7 Source: http://www.flickr.com/photos/eastcapital/4554220770/
  • 8. Enabling configuration and customization 7/22/2010 @2010 SugarCRM Inc. All rights reserved. 8 Source: http://www.flickr.com/photos/miskypig/400004362/
  • 9. Making it simple yet powerful for end users Expose configuration options thru multiple channels Remember, not everyone has source access Allow users to customize their UI interface easily Make what should be simple, simple 7/22/2010 @2010 SugarCRM Inc. All rights reserved. 9
  • 10. Making it simple yet powerful for developers Create a safe place to make customizations Avoid painful upgrades Create an easy to use API Well defined and supported. Don’t break it! Create easy to use hooks for modifying / adding functionality Examples from SugarCRM include: Metadata driven views Logic Hooks Allow for internationalization and localization 7/22/2010 @2010 SugarCRM Inc. All rights reserved. 10
  • 11. Strategies for testing and QA 7/22/2010 @2010 SugarCRM Inc. All rights reserved. 11 Source: http://www.flickr.com/photos/cglock/386033158/
  • 12. Testing different configurations Impossible for us to test every single permutation, so we use VM stacks instead Windows Vista IIS-7 (FastCGI) PHP 5.2.8 MSSQL-2005 (PHP mssql driver) Windows Server 2003 IIS-6 (FastCGI) PHP 5.2.11 MSSQL-2005 (PHP mssql driver) CentOS 5 Apache-2.2.11 PHP 5.2.9 MySQL-5.1.33 Windows Server 2008 IIS-7 (FastCGI) PHP 5.3.1 MSSQL-2008 (Microsoft sqlsrv driver 1.1) Windows XP Apache-1.3.41 PHP 5.2.13 MySQL-5.0.83 Oracle Enterprise Linux 5.1 Apache-2.0.63 PHP 5.3.2 ORCL-10g We test both new installations and upgrade scenarios; even customer instances! 7/22/2010 @2010 SugarCRM Inc. All rights reserved. 12
  • 13. Automated Testing Tools Hudson (http://hudson-ci.org/) – Extensible CI Server Running on every checkin PHP lint ( php –l ) – Syntax checking for PHP source files PHPUnit (http://www.phpunit.de/) – Unit testing framework Runs once a day SODA – functional testing framework that leverages Watir SodaMachine – GUI tool for building SODA tests JMeter (http://jakarta.apache.org/jmeter/) - tool for testing a website under high load MeterMaid – XML language to write JMeter tests in SugarMMM (MeterMaid Maker) - utility to automate writing MeterMaid tests for SugarCRM TidBit – tool to make huge datasets for testing All runs are against all flavors and all supported platform stacks 7/22/2010 @2010 SugarCRM Inc. All rights reserved. 13
  • 14. Making your code perform well 7/22/2010 @2010 SugarCRM Inc. All rights reserved. 14 Source: http://www.flickr.com/photos/tech1987/501427718/
  • 15. What we do to help performance Try to do the basic stuff Avoid writing slow code Caching, and lots of it Combine, minify, and version JS / CSS / images Keep SQL queries as simple as possible Leave the rest to the Sys Admin Provide configuration options to turn off heavy features Enable the application to take advantage of it’s environment Example: Using APC, memcache, Zend_Cache, wincache with little to no configuration Provide best practices for various environments 7/22/2010 @2010 SugarCRM Inc. All rights reserved. 15
  • 16. How we gauge performance Formal testing Use Jmeter (http://jakarta.apache.org/jmeter/) on a load test cluster to test raw response speed. Instance analysis Monitor web server logs to look for non-cached items Track slow queries Ad-hoc testing Profile PHP execution with XDebug Use Firebug to measure CSS / JS / image payload 7/22/2010 @2010 SugarCRM Inc. All rights reserved. 16
  • 17. What are the lessons we have learned? Define what you will support and to what extent Write your code to be flexible to any environment Make customizing, configuring, and extending your application not painful for users or developers Test across your support matrix, using automation as much as possible Focus more on best practices and general performance, let admins handle it from there. 10/9/10 @2010 SugarCRM Inc. All rights reserved. 17 Source: http://www.flickr.com/photos/dlanod/126386070/
  • 18. About me and my company John Mertic http://jmertic.wordpress.com Twitter: @jmertic jmertic@sugarcrm.com ( Work ) jmertic@php.net ( PHP ) Slides available on slidesharehttp://slidesha.re/9LX3Jp SugarCRM http://www.sugarcrm.com We’re hiring! Learn more about SugarCRM’s open source tools at http://developers.sugarcrm.com/opensource 7/22/2010 @2010 SugarCRM Inc. All rights reserved. 18 Buy my book!
  • 19. Questions? Please give feedback at http://joind.in/2059 7/22/2010 @2010 SugarCRM Inc. All rights reserved. 19

Notes de l'éditeur

  1. People fear the cloudPeople can’t use the cloudPeople want to use different cloudsOur customer base reflects this ( 1/3 sugar cloud, 1/3 on site, 1/3 on other clouds )
  2. User base is diverse, likes different offerings, and will move between them.Lots of choices ( Web Servers / OSes / Databases / PHP versions ) as well as config possibilitiesHave to cover lots of platforms; can rely on particular hardware or software being available.
  3. Relate in picture, mention about balance for needed control and simplicity.Talk about how we made this a big deal in Sugar 6
  4. Types of testing we useTesting is hard
  5. Performance story about GNs; very particular to make go fastNeed to balance performance and configurability; make the performance choices that make the most difference, and enable ways for those working with your software to make more.
  6. Try to avoid subqueries as much as possible.