SlideShare ist ein Scribd-Unternehmen logo
1 von 47
Downloaden Sie, um offline zu lesen
Ibuildings - http://www.ibuildings.com
Enterprise PHP development
Ivo Jansch <ivo@ibuildings.com>
Dutch PHP Conference, June 14, 2008
Tuesday, February 26, 2008 2
What's an enterprise?
•  Wikipedia:
  “Any of several ships by that name in the Star Trek
fictional universe”
  “A business, company, or comparable organization”
Tuesday, February 26, 2008 3
Is PHP Enterprise ready?
•  CIO Magazine:
“PHPworkswellforprototypingbecauseitiseasytogetasiteupandrunning.UsePHPtodesign
the site [...] but when it comes time for development, tell the team you want
t
he result to look and act like this PHP site...but in Java”
(Or: “great, this is exactly what I need! now do it again, at twice the cost!”)‫‏‬
http://www.cio.com/article/176250 (skip the article, read the comments)‫‏‬
Tuesday, February 26, 2008 4
Is PHP Enterprise ready?
 Small
 Lightweight
 Cheap
 Easy to learn
 Big
 Enterprise friendly
 enterpriCe
 CS required
Tuesday, February 26, 2008 5
A word from my girlfriend
It's not the
SIZE
of the tool...
It's how you USE it.
Tuesday, February 26, 2008 6
PHP is changing...
•  1998
  Personal stuff
•  2003
  Simple websites
  Content management
  Blogs
•  2008
  Big websites
  Banks
  Insurance Companies
  ...
Tuesday, February 26, 2008 7
PHP is changing...
•  Traditional metaphor
  PHP is like Lego bricks
  Bricks allowing you to build
anything
Tuesday, February 26, 2008 8
PHP is changing...
•  PHP is no longer a toy
  Let’s use the metaphor of actual bricks
  Because we’re building
actual buildings now
Tuesday, February 26, 2008 9
About Bricks
•  Extreme simplicity
•  Easy to learn
•  Versatile
•  Cheap
... so building a skyscraper must be peanuts, right?
Ibuildings - http://www.ibuildings.com
Enterprise development in 10 steps
Tuesday, February 26, 2008 11
Step 1 – The Team
“Dear Mr. Businessman,
I have read about your plans to build a new
skyscraper and I am applying for a job.
I have a lot of experience with Bricks. I taught
myself how to use them and have been
maintaining our family shed for a few years now.”
Tuesday, February 26, 2008 12
Step 1 – The Team
•  Be a software engineer
•  Train your skills
•  Study OO principles
•  Consider Zend Certification
Tuesday, February 26, 2008 13
Step 2 - Requirements
•  What does the customer need?
•  What do visitors want?
Tuesday, February 26, 2008 14
Step 2 - Requirements
•  Functional Design
  Requirements definition
  Interaction Design /
Wireframes
  Flow diagrams
Tuesday, February 26, 2008 15
Step 3 - Architecture
•  Don’t just start stacking bricks
•  Create an architecture first
Tuesday, February 26, 2008 16
Step 3 - Architecture
•  Technical Design
  Modelling
•  Class diagrams
•  ER diagram (data model)‫‏‬
•  Colaboration diagrams
•  Use cases
•  etc.
  Tools: UML, whiteboards
Tuesday, February 26, 2008 17
Step 3 - Architecture
•  High Level Architectures:
  MVC (Model View Controller)
  SOA (Service Oriented Architecture)
  Multi-tier development (Frontend, Application, Data)
  CBD (Component Based Development)‫‏‬
Tuesday, February 26, 2008 18
Step 4 - Tools
•  You don’t need tools...
•  But they make you productive
Tuesday, February 26, 2008 19
Step 4 - Tools
•  Development:
  Eclipse (PDT)‫‏‬
  PhpED
  Vim
  Zend Studio
  Komodo
•  IDE's vs Editors
  Debugging
  Profiling
  Navigation / cross references
  Syntax Checking
Tuesday, February 26, 2008 20
Step 4 - Tools
•  Source Control
  CVS / SVN
  Bitkeeper / GIT
  Branching
  Tagging
Tuesday, February 26, 2008 21
Step 5 - Foundation
•  Start stacking bricks?
  How many bricks does it take..
  What about stability?
•  Start with a foundation
Tuesday, February 26, 2008 22
Step 5 - Foundation
•  Use a framework
  Provides guidelines (frame)‫‏‬
  Off the shelf components
•  Examples
  Zend Framework http://framework.zend.com
  CakePHP http://http://www.cakephp.org
  ezComponents http://ez.no/ezcomponents
  Symfony http://www.symfony-project.org
  ATK http://www.achievo.org/atk
Tuesday, February 26, 2008 23
Step 5 - Foundation
•  The “Not Invented Here” Syndrome
  “The existing frameworks are no good.
I can do this better.”
  “This framework is no good.
It can do A through Y but I need Z.”
  “This framework is too big.
It provides A-Z but we only need A and B.”
  “I know there's a good framework.
But I would like to learn.”
Tuesday, February 26, 2008 24
Step 6 – Design Patterns
Requirement 1056.4:
We need to be able to look outside, but we
can't make holes in the wall (rain should be
kept outside). When it's sunny, a hole is ok.
Tuesday, February 26, 2008 25
Step 6 – Design Patterns
•  A ‘window’ is a concept
  Best practice way of solving a particular problem
•  In IT, we call this a ‘design pattern’
•  Popular patterns in PHP:
  MVC, Factory, Singleton, Registry, Decorator
•  Good read:
  php|architect's Guide to
PHP Design Patterns
- Jason E. Sweat
Tuesday, February 26, 2008 26
Step 7 - Testing
•  Is your software tested after it has gone live?
Tuesday, February 26, 2008 27
Step 7 - Testing
•  Various types of testing
  Developer testing
  Functional testing
  Environment testing
  Performance testing
  Usability testing
Tuesday, February 26, 2008 28
Step 7 - Testing
•  Common scenario
Tuesday, February 26, 2008 29
Step 7 - Testing
•  User complains...
MWOEHA!
BUG!
Tuesday, February 26, 2008 30
Step 7 - Testing
•  Developer attacks the problem
fix_bug();
Tuesday, February 26, 2008 31
Step 7 - Testing
•  Problem solved!
Tuesday, February 26, 2008 32
Step 7 - Testing
•  Solution: Unit Tests
  Automated testing after each change
  Prevents regressions
•  Testing for PHP applications:
  PHPUnit http://www.phpunit.de/
  SimpleTest http://www.lastcraft.com/simple_test.php
•  Continuous Integration:
  CruiseControl with phpUnderControl
  Xinc http://code.google.com/p/xinc/
Tuesday, February 26, 2008 33
Step 7 - Testing
•  Test Driven Development
1. Define functionality
2. Create testcase
3. Run test -> test fails
4. Implement functionality
•  Test succeeds? Done
•  Test fails? Refactor
Repeat step 4 until finished
Tuesday, February 26, 2008 34
Step 8 - Optimization
Users are reporting:
"I work on the 197th floor. Every day I
have to walk the stairs for 2 hours, then I
have only 4 hours left to do my job."
Tuesday, February 26, 2008 35
Step 8 - Optimization
•  Solution: Elevator
Tuesday, February 26, 2008 36
Step 8 - Optimization
In PHP, this ‘elevator’ is called an ‘accelerator’
  This is how PHP works (pseudo-ish code):
read index.php; // enter the building
compile index.php; // go to floor 197
echo “Hello World”; // get the job done
  An accelerator improves the first 2 steps
  Accelerators for PHP:
•  eAccelerator http://eaccelerator.net/
•  APC http://pecl.php.net/package/APC
•  Zend Platform http://www.zend.com/products/zend_platform
Tuesday, February 26, 2008 37
Step 8 - Optimization
Users complain:
“Every time I need coffee I have to go
to the top floor to get some.”
Tuesday, February 26, 2008 38
Step 8 - Optimization
•  Solution: Create small coffee corners on every floor so
people
d
o
n’t have to go to the main restaurant every time.
•  In PHP we call this caching
  Don’t query the database everytime you need data
  Use locally stored copy (file or memory)‫‏‬
•  PHP Caching solutions:
  Zend_Cache http://framework.zend.com
  Smarty http://smarty.php.net
  Zend Platform http://www.zend.com/products/zend_platform
  Memcached http://danga.com/memcached/
Tuesday, February 26, 2008 39
Step 9 - Deployment
•  Lifecycle:
  Develop
  Test
  Deploy to acceptance test environment
  Deploy to live
•  Use SVN
•  Code is just a part, don't forget the database
•  Create a 'Deployment & Release Profile'
Tuesday, February 26, 2008 40
Step 9 - Deployment
•  System Architecture
PHP
Apache
Linux
MySQL
From a simple LAMP stack on a single machine...
Tuesday, February 26, 2008 41
Step 9 - Deployment
•  System Architecture
... to a High Availability, Horizontally Scalable architecture
Tuesday, February 26, 2008 42
Step 10 - Operations
•  Monitoring
  Logfiles
  Monitor infrastructure (tools such as Nagios)‫‏‬
  Monitor application (tools such as Zend Platform)‫‏‬
  Monitor business (is the money still pouring in?)
Tuesday, February 26, 2008 43
Step 10 - Operations
•  Debugging
  Ideal:
“I had error x when I selected y after I clicked z”
  Reality:
“It doesn't work!”
“What exactly doesn't work, and what did you do?”
“It just ******** didn't work, FIX IT.”
Tuesday, February 26, 2008 44
Step 10 - Operations
•  Solution
  A 'root cause
analysis' tool
Tuesday, February 26, 2008 45
Step 10 - Operations
•  Change management
  Ticket system
  Stick to your deployment - use the DRP
  DON'T TOUCH THE LIVE ENVIRONMENT.
  But I absolutely have to...
DON'T!
  but...
NO! IF YOU TOUCH IT, YOU WILL LOSE ALL GURU POINTS.
46
Shameless self-promotion
•  php|architect's
Guide to Enterprise PHP Development
•  PDF: June 12, Print: June 26
•  ISBN: 978-0-9738621-8-8
•  Order via http://phparch.com
•  http://www.enterprisephp.nl
Ibuildings - http://www.ibuildings.com
Questions?
http://www.jansch.nl
http://www.enterprisephp.nl
http://www.ibuildings.com
ivo@ibuildings.com

Weitere ähnliche Inhalte

Was ist angesagt?

Abstraction Layers Test Management Summit Faciliated Session 2014
Abstraction Layers Test Management Summit Faciliated Session 2014Abstraction Layers Test Management Summit Faciliated Session 2014
Abstraction Layers Test Management Summit Faciliated Session 2014Alan Richardson
 
Expert selenium with core java
Expert selenium with core javaExpert selenium with core java
Expert selenium with core javaIshita Arora
 
Testing Java Web Apps With Selenium
Testing Java Web Apps With SeleniumTesting Java Web Apps With Selenium
Testing Java Web Apps With SeleniumMarakana Inc.
 
Automate testing with behat, selenium, phantom js and nightwatch.js (5)
Automate testing with behat, selenium, phantom js and nightwatch.js (5)Automate testing with behat, selenium, phantom js and nightwatch.js (5)
Automate testing with behat, selenium, phantom js and nightwatch.js (5)Faichi Solutions
 
Challenges in test automation for web apps
Challenges in test automation for web appsChallenges in test automation for web apps
Challenges in test automation for web appsSudara Fernando
 
Getting By Without "QA"
Getting By Without "QA"Getting By Without "QA"
Getting By Without "QA"Dave King
 
Out of box page object design pattern, java
Out of box page object design pattern, javaOut of box page object design pattern, java
Out of box page object design pattern, javaCOMAQA.BY
 
Mastering UI automation at Scale: Key Lessons and Best Practices (By Fernando...
Mastering UI automation at Scale: Key Lessons and Best Practices (By Fernando...Mastering UI automation at Scale: Key Lessons and Best Practices (By Fernando...
Mastering UI automation at Scale: Key Lessons and Best Practices (By Fernando...Applitools
 
Как стать синьором
Как стать синьоромКак стать синьором
Как стать синьоромCOMAQA.BY
 
Better Page Object Handling with Loadable Component Pattern
Better Page Object Handling with Loadable Component PatternBetter Page Object Handling with Loadable Component Pattern
Better Page Object Handling with Loadable Component PatternSargis Sargsyan
 
Increase selenium tests stability via java script
Increase selenium tests stability via java scriptIncrease selenium tests stability via java script
Increase selenium tests stability via java scriptIgor Khrol
 
WordPress Security and Best Practices
WordPress Security and Best PracticesWordPress Security and Best Practices
WordPress Security and Best PracticesRobert Vidal
 
Beyond Fluffy Bunny. How I leveraged WebObjects in my lean startup.
Beyond Fluffy Bunny. How I leveraged WebObjects in my lean startup.Beyond Fluffy Bunny. How I leveraged WebObjects in my lean startup.
Beyond Fluffy Bunny. How I leveraged WebObjects in my lean startup.WO Community
 

Was ist angesagt? (18)

Abstraction Layers Test Management Summit Faciliated Session 2014
Abstraction Layers Test Management Summit Faciliated Session 2014Abstraction Layers Test Management Summit Faciliated Session 2014
Abstraction Layers Test Management Summit Faciliated Session 2014
 
Expert selenium with core java
Expert selenium with core javaExpert selenium with core java
Expert selenium with core java
 
Testing Java Web Apps With Selenium
Testing Java Web Apps With SeleniumTesting Java Web Apps With Selenium
Testing Java Web Apps With Selenium
 
Automate testing with behat, selenium, phantom js and nightwatch.js (5)
Automate testing with behat, selenium, phantom js and nightwatch.js (5)Automate testing with behat, selenium, phantom js and nightwatch.js (5)
Automate testing with behat, selenium, phantom js and nightwatch.js (5)
 
Workshop - E2e tests with protractor
Workshop - E2e tests with protractorWorkshop - E2e tests with protractor
Workshop - E2e tests with protractor
 
Challenges in test automation for web apps
Challenges in test automation for web appsChallenges in test automation for web apps
Challenges in test automation for web apps
 
Getting By Without "QA"
Getting By Without "QA"Getting By Without "QA"
Getting By Without "QA"
 
Out of box page object design pattern, java
Out of box page object design pattern, javaOut of box page object design pattern, java
Out of box page object design pattern, java
 
Basic Selenium Training
Basic Selenium TrainingBasic Selenium Training
Basic Selenium Training
 
Mastering UI automation at Scale: Key Lessons and Best Practices (By Fernando...
Mastering UI automation at Scale: Key Lessons and Best Practices (By Fernando...Mastering UI automation at Scale: Key Lessons and Best Practices (By Fernando...
Mastering UI automation at Scale: Key Lessons and Best Practices (By Fernando...
 
Как стать синьором
Как стать синьоромКак стать синьором
Как стать синьором
 
Better Page Object Handling with Loadable Component Pattern
Better Page Object Handling with Loadable Component PatternBetter Page Object Handling with Loadable Component Pattern
Better Page Object Handling with Loadable Component Pattern
 
JS Module Server
JS Module ServerJS Module Server
JS Module Server
 
Increase selenium tests stability via java script
Increase selenium tests stability via java scriptIncrease selenium tests stability via java script
Increase selenium tests stability via java script
 
WordPress Security and Best Practices
WordPress Security and Best PracticesWordPress Security and Best Practices
WordPress Security and Best Practices
 
Beyond Fluffy Bunny. How I leveraged WebObjects in my lean startup.
Beyond Fluffy Bunny. How I leveraged WebObjects in my lean startup.Beyond Fluffy Bunny. How I leveraged WebObjects in my lean startup.
Beyond Fluffy Bunny. How I leveraged WebObjects in my lean startup.
 
Protractor: Tips & Tricks
Protractor: Tips & TricksProtractor: Tips & Tricks
Protractor: Tips & Tricks
 
Foundation selenium java
Foundation selenium java Foundation selenium java
Foundation selenium java
 

Ähnlich wie Enterprise PHP Development - Ivo Jansch

Effective .NET Core Unit Testing with SQLite and Dapper
Effective .NET Core Unit Testing with SQLite and DapperEffective .NET Core Unit Testing with SQLite and Dapper
Effective .NET Core Unit Testing with SQLite and DapperMike Melusky
 
Effective .NET Core Unit Testing with SQLite and Dapper
Effective .NET Core Unit Testing with SQLite and DapperEffective .NET Core Unit Testing with SQLite and Dapper
Effective .NET Core Unit Testing with SQLite and DapperMike Melusky
 
Iasi code camp 20 april 2013 marian chicu - database unit tests in the sql se...
Iasi code camp 20 april 2013 marian chicu - database unit tests in the sql se...Iasi code camp 20 april 2013 marian chicu - database unit tests in the sql se...
Iasi code camp 20 april 2013 marian chicu - database unit tests in the sql se...Codecamp Romania
 
Implementing quality in Java projects
Implementing quality in Java projectsImplementing quality in Java projects
Implementing quality in Java projectsVincent Massol
 
Iasi code camp 20 april 2013 implement-quality-java-massol-codecamp
Iasi code camp 20 april 2013 implement-quality-java-massol-codecampIasi code camp 20 april 2013 implement-quality-java-massol-codecamp
Iasi code camp 20 april 2013 implement-quality-java-massol-codecampCodecamp Romania
 
Enterprise PHP (PHP London Conference 2008)
Enterprise PHP (PHP London Conference 2008)Enterprise PHP (PHP London Conference 2008)
Enterprise PHP (PHP London Conference 2008)Ivo Jansch
 
Introduction to PHP (Casino Affiliate Convention 2008)
Introduction to PHP (Casino Affiliate Convention 2008)Introduction to PHP (Casino Affiliate Convention 2008)
Introduction to PHP (Casino Affiliate Convention 2008)Ivo Jansch
 
One code Web, iOS, Android
One code Web, iOS, AndroidOne code Web, iOS, Android
One code Web, iOS, AndroidArtem Marchenko
 
Ship It ! with Ruby/ Rails Ecosystem
Ship It ! with Ruby/ Rails EcosystemShip It ! with Ruby/ Rails Ecosystem
Ship It ! with Ruby/ Rails EcosystemYi-Ting Cheng
 
jQuery: The World's Most Popular JavaScript Library Comes to XPages
jQuery: The World's Most Popular JavaScript Library Comes to XPagesjQuery: The World's Most Popular JavaScript Library Comes to XPages
jQuery: The World's Most Popular JavaScript Library Comes to XPagesTeamstudio
 
Release Management with Visual Studio Team Services and Office Dev PnP
Release Management with Visual Studio Team Services and Office Dev PnPRelease Management with Visual Studio Team Services and Office Dev PnP
Release Management with Visual Studio Team Services and Office Dev PnPPetter Skodvin-Hvammen
 
Browser Automated Testing Frameworks - Nightwatch.js
Browser Automated Testing Frameworks - Nightwatch.jsBrowser Automated Testing Frameworks - Nightwatch.js
Browser Automated Testing Frameworks - Nightwatch.jsLuís Bastião Silva
 
Testing your applications with mbunit
Testing your applications with mbunitTesting your applications with mbunit
Testing your applications with mbunitBen Hall
 
Optimizing Access with SQL Server
Optimizing Access with SQL ServerOptimizing Access with SQL Server
Optimizing Access with SQL ServerPRPASS Chapter
 
Reliable mobile test automation
Reliable mobile test automationReliable mobile test automation
Reliable mobile test automationVishal Banthia
 
A modern architecturereview–usingcodereviewtools-ver-3.5
A modern architecturereview–usingcodereviewtools-ver-3.5A modern architecturereview–usingcodereviewtools-ver-3.5
A modern architecturereview–usingcodereviewtools-ver-3.5SSW
 
SOA with PHP and Symfony
SOA with PHP and SymfonySOA with PHP and Symfony
SOA with PHP and SymfonyMichalSchroeder
 

Ähnlich wie Enterprise PHP Development - Ivo Jansch (20)

Effective .NET Core Unit Testing with SQLite and Dapper
Effective .NET Core Unit Testing with SQLite and DapperEffective .NET Core Unit Testing with SQLite and Dapper
Effective .NET Core Unit Testing with SQLite and Dapper
 
Effective .NET Core Unit Testing with SQLite and Dapper
Effective .NET Core Unit Testing with SQLite and DapperEffective .NET Core Unit Testing with SQLite and Dapper
Effective .NET Core Unit Testing with SQLite and Dapper
 
Iasi code camp 20 april 2013 marian chicu - database unit tests in the sql se...
Iasi code camp 20 april 2013 marian chicu - database unit tests in the sql se...Iasi code camp 20 april 2013 marian chicu - database unit tests in the sql se...
Iasi code camp 20 april 2013 marian chicu - database unit tests in the sql se...
 
Implementing quality in Java projects
Implementing quality in Java projectsImplementing quality in Java projects
Implementing quality in Java projects
 
Iasi code camp 20 april 2013 implement-quality-java-massol-codecamp
Iasi code camp 20 april 2013 implement-quality-java-massol-codecampIasi code camp 20 april 2013 implement-quality-java-massol-codecamp
Iasi code camp 20 april 2013 implement-quality-java-massol-codecamp
 
QAorHighway2016
QAorHighway2016QAorHighway2016
QAorHighway2016
 
Enterprise PHP (PHP London Conference 2008)
Enterprise PHP (PHP London Conference 2008)Enterprise PHP (PHP London Conference 2008)
Enterprise PHP (PHP London Conference 2008)
 
Introduction to PHP (Casino Affiliate Convention 2008)
Introduction to PHP (Casino Affiliate Convention 2008)Introduction to PHP (Casino Affiliate Convention 2008)
Introduction to PHP (Casino Affiliate Convention 2008)
 
One code Web, iOS, Android
One code Web, iOS, AndroidOne code Web, iOS, Android
One code Web, iOS, Android
 
Ship It ! with Ruby/ Rails Ecosystem
Ship It ! with Ruby/ Rails EcosystemShip It ! with Ruby/ Rails Ecosystem
Ship It ! with Ruby/ Rails Ecosystem
 
XPDays-2018
XPDays-2018XPDays-2018
XPDays-2018
 
jQuery: The World's Most Popular JavaScript Library Comes to XPages
jQuery: The World's Most Popular JavaScript Library Comes to XPagesjQuery: The World's Most Popular JavaScript Library Comes to XPages
jQuery: The World's Most Popular JavaScript Library Comes to XPages
 
Release Management with Visual Studio Team Services and Office Dev PnP
Release Management with Visual Studio Team Services and Office Dev PnPRelease Management with Visual Studio Team Services and Office Dev PnP
Release Management with Visual Studio Team Services and Office Dev PnP
 
Browser Automated Testing Frameworks - Nightwatch.js
Browser Automated Testing Frameworks - Nightwatch.jsBrowser Automated Testing Frameworks - Nightwatch.js
Browser Automated Testing Frameworks - Nightwatch.js
 
Testing your applications with mbunit
Testing your applications with mbunitTesting your applications with mbunit
Testing your applications with mbunit
 
Optimizing Access with SQL Server
Optimizing Access with SQL ServerOptimizing Access with SQL Server
Optimizing Access with SQL Server
 
Reliable mobile test automation
Reliable mobile test automationReliable mobile test automation
Reliable mobile test automation
 
A modern architecturereview–usingcodereviewtools-ver-3.5
A modern architecturereview–usingcodereviewtools-ver-3.5A modern architecturereview–usingcodereviewtools-ver-3.5
A modern architecturereview–usingcodereviewtools-ver-3.5
 
Mini training - Moving to xUnit.net
Mini training - Moving to xUnit.netMini training - Moving to xUnit.net
Mini training - Moving to xUnit.net
 
SOA with PHP and Symfony
SOA with PHP and SymfonySOA with PHP and Symfony
SOA with PHP and Symfony
 

Mehr von dpc

ezComponents - Derick Rethans
ezComponents - Derick RethansezComponents - Derick Rethans
ezComponents - Derick Rethansdpc
 
Software And The Taste Of Mayo - Marco Tabini
Software And The Taste Of Mayo - Marco TabiniSoftware And The Taste Of Mayo - Marco Tabini
Software And The Taste Of Mayo - Marco Tabinidpc
 
Deployment With Subversion - Lorna Mitchell
Deployment With Subversion - Lorna MitchellDeployment With Subversion - Lorna Mitchell
Deployment With Subversion - Lorna Mitchelldpc
 
Best Practices with Zend Framework - Matthew Weier O'Phinney
Best Practices with Zend Framework - Matthew Weier O'PhinneyBest Practices with Zend Framework - Matthew Weier O'Phinney
Best Practices with Zend Framework - Matthew Weier O'Phinneydpc
 
State Of PHP - Zeev Suraski
State Of PHP - Zeev SuraskiState Of PHP - Zeev Suraski
State Of PHP - Zeev Suraskidpc
 
Symfony 1.1 - Fabien Potencier
Symfony 1.1 - Fabien PotencierSymfony 1.1 - Fabien Potencier
Symfony 1.1 - Fabien Potencierdpc
 
Advanced PHP: Design Patterns - Dennis-Jan Broerse
Advanced PHP: Design Patterns - Dennis-Jan BroerseAdvanced PHP: Design Patterns - Dennis-Jan Broerse
Advanced PHP: Design Patterns - Dennis-Jan Broersedpc
 
New Features PHPUnit 3.3 - Sebastian Bergmann
New Features PHPUnit 3.3 - Sebastian BergmannNew Features PHPUnit 3.3 - Sebastian Bergmann
New Features PHPUnit 3.3 - Sebastian Bergmanndpc
 
PHP 5.3 and PHP 6; a look ahead - Stefan Priebsch
PHP 5.3 and PHP 6; a look ahead - Stefan PriebschPHP 5.3 and PHP 6; a look ahead - Stefan Priebsch
PHP 5.3 and PHP 6; a look ahead - Stefan Priebschdpc
 
Quality Assurance in PHP projects - Sebastian Bergmann
Quality Assurance in PHP projects - Sebastian BergmannQuality Assurance in PHP projects - Sebastian Bergmann
Quality Assurance in PHP projects - Sebastian Bergmanndpc
 
An Infrastructure for Team Development - Gaylord Aulke
An Infrastructure for Team Development - Gaylord AulkeAn Infrastructure for Team Development - Gaylord Aulke
An Infrastructure for Team Development - Gaylord Aulkedpc
 
DPC2008 Intro - Ivo Jansch
DPC2008 Intro - Ivo JanschDPC2008 Intro - Ivo Jansch
DPC2008 Intro - Ivo Janschdpc
 
DPC 2007 My First Mashup (Cal Evans)
DPC 2007 My First Mashup (Cal Evans)DPC 2007 My First Mashup (Cal Evans)
DPC 2007 My First Mashup (Cal Evans)dpc
 
DPC2007 CodeGear, Delphi For PHP (Pawel Glowacki)
DPC2007 CodeGear, Delphi For PHP (Pawel Glowacki)DPC2007 CodeGear, Delphi For PHP (Pawel Glowacki)
DPC2007 CodeGear, Delphi For PHP (Pawel Glowacki)dpc
 
DPC2007 Zend Framework (Gaylord Aulke)
DPC2007 Zend Framework (Gaylord Aulke)DPC2007 Zend Framework (Gaylord Aulke)
DPC2007 Zend Framework (Gaylord Aulke)dpc
 
DPC2007 Objects Of Desire (Kevlin Henney)
DPC2007 Objects Of Desire (Kevlin Henney)DPC2007 Objects Of Desire (Kevlin Henney)
DPC2007 Objects Of Desire (Kevlin Henney)dpc
 
DPC2007 Symfony (Stefan Koopmanschap)
DPC2007 Symfony (Stefan Koopmanschap)DPC2007 Symfony (Stefan Koopmanschap)
DPC2007 Symfony (Stefan Koopmanschap)dpc
 
DPC2007 PHP And Oracle (Kuassi Mensah)
DPC2007 PHP And Oracle (Kuassi Mensah)DPC2007 PHP And Oracle (Kuassi Mensah)
DPC2007 PHP And Oracle (Kuassi Mensah)dpc
 
DPC2007 Case Study Surfnet (Herman Van Dompseler)
DPC2007 Case Study Surfnet (Herman Van Dompseler)DPC2007 Case Study Surfnet (Herman Van Dompseler)
DPC2007 Case Study Surfnet (Herman Van Dompseler)dpc
 
DPC2007 Case Study Zoom & Webwereld (Sander vd Graaf)
DPC2007 Case Study Zoom & Webwereld (Sander vd Graaf)DPC2007 Case Study Zoom & Webwereld (Sander vd Graaf)
DPC2007 Case Study Zoom & Webwereld (Sander vd Graaf)dpc
 

Mehr von dpc (20)

ezComponents - Derick Rethans
ezComponents - Derick RethansezComponents - Derick Rethans
ezComponents - Derick Rethans
 
Software And The Taste Of Mayo - Marco Tabini
Software And The Taste Of Mayo - Marco TabiniSoftware And The Taste Of Mayo - Marco Tabini
Software And The Taste Of Mayo - Marco Tabini
 
Deployment With Subversion - Lorna Mitchell
Deployment With Subversion - Lorna MitchellDeployment With Subversion - Lorna Mitchell
Deployment With Subversion - Lorna Mitchell
 
Best Practices with Zend Framework - Matthew Weier O'Phinney
Best Practices with Zend Framework - Matthew Weier O'PhinneyBest Practices with Zend Framework - Matthew Weier O'Phinney
Best Practices with Zend Framework - Matthew Weier O'Phinney
 
State Of PHP - Zeev Suraski
State Of PHP - Zeev SuraskiState Of PHP - Zeev Suraski
State Of PHP - Zeev Suraski
 
Symfony 1.1 - Fabien Potencier
Symfony 1.1 - Fabien PotencierSymfony 1.1 - Fabien Potencier
Symfony 1.1 - Fabien Potencier
 
Advanced PHP: Design Patterns - Dennis-Jan Broerse
Advanced PHP: Design Patterns - Dennis-Jan BroerseAdvanced PHP: Design Patterns - Dennis-Jan Broerse
Advanced PHP: Design Patterns - Dennis-Jan Broerse
 
New Features PHPUnit 3.3 - Sebastian Bergmann
New Features PHPUnit 3.3 - Sebastian BergmannNew Features PHPUnit 3.3 - Sebastian Bergmann
New Features PHPUnit 3.3 - Sebastian Bergmann
 
PHP 5.3 and PHP 6; a look ahead - Stefan Priebsch
PHP 5.3 and PHP 6; a look ahead - Stefan PriebschPHP 5.3 and PHP 6; a look ahead - Stefan Priebsch
PHP 5.3 and PHP 6; a look ahead - Stefan Priebsch
 
Quality Assurance in PHP projects - Sebastian Bergmann
Quality Assurance in PHP projects - Sebastian BergmannQuality Assurance in PHP projects - Sebastian Bergmann
Quality Assurance in PHP projects - Sebastian Bergmann
 
An Infrastructure for Team Development - Gaylord Aulke
An Infrastructure for Team Development - Gaylord AulkeAn Infrastructure for Team Development - Gaylord Aulke
An Infrastructure for Team Development - Gaylord Aulke
 
DPC2008 Intro - Ivo Jansch
DPC2008 Intro - Ivo JanschDPC2008 Intro - Ivo Jansch
DPC2008 Intro - Ivo Jansch
 
DPC 2007 My First Mashup (Cal Evans)
DPC 2007 My First Mashup (Cal Evans)DPC 2007 My First Mashup (Cal Evans)
DPC 2007 My First Mashup (Cal Evans)
 
DPC2007 CodeGear, Delphi For PHP (Pawel Glowacki)
DPC2007 CodeGear, Delphi For PHP (Pawel Glowacki)DPC2007 CodeGear, Delphi For PHP (Pawel Glowacki)
DPC2007 CodeGear, Delphi For PHP (Pawel Glowacki)
 
DPC2007 Zend Framework (Gaylord Aulke)
DPC2007 Zend Framework (Gaylord Aulke)DPC2007 Zend Framework (Gaylord Aulke)
DPC2007 Zend Framework (Gaylord Aulke)
 
DPC2007 Objects Of Desire (Kevlin Henney)
DPC2007 Objects Of Desire (Kevlin Henney)DPC2007 Objects Of Desire (Kevlin Henney)
DPC2007 Objects Of Desire (Kevlin Henney)
 
DPC2007 Symfony (Stefan Koopmanschap)
DPC2007 Symfony (Stefan Koopmanschap)DPC2007 Symfony (Stefan Koopmanschap)
DPC2007 Symfony (Stefan Koopmanschap)
 
DPC2007 PHP And Oracle (Kuassi Mensah)
DPC2007 PHP And Oracle (Kuassi Mensah)DPC2007 PHP And Oracle (Kuassi Mensah)
DPC2007 PHP And Oracle (Kuassi Mensah)
 
DPC2007 Case Study Surfnet (Herman Van Dompseler)
DPC2007 Case Study Surfnet (Herman Van Dompseler)DPC2007 Case Study Surfnet (Herman Van Dompseler)
DPC2007 Case Study Surfnet (Herman Van Dompseler)
 
DPC2007 Case Study Zoom & Webwereld (Sander vd Graaf)
DPC2007 Case Study Zoom & Webwereld (Sander vd Graaf)DPC2007 Case Study Zoom & Webwereld (Sander vd Graaf)
DPC2007 Case Study Zoom & Webwereld (Sander vd Graaf)
 

Kürzlich hochgeladen

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businesspanagenda
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MIND CTI
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Principled Technologies
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdflior mazor
 
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 DiscoveryTrustArc
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
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...Drew Madelung
 
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 WorkerThousandEyes
 
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...Martijn de Jong
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024The Digital Insurer
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesBoston Institute of Analytics
 
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)wesley chun
 

Kürzlich hochgeladen (20)

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
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
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
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...
 
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
 
+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...
 
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...
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
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)
 

Enterprise PHP Development - Ivo Jansch

  • 1. Ibuildings - http://www.ibuildings.com Enterprise PHP development Ivo Jansch <ivo@ibuildings.com> Dutch PHP Conference, June 14, 2008
  • 2. Tuesday, February 26, 2008 2 What's an enterprise? •  Wikipedia:   “Any of several ships by that name in the Star Trek fictional universe”   “A business, company, or comparable organization”
  • 3. Tuesday, February 26, 2008 3 Is PHP Enterprise ready? •  CIO Magazine: “PHPworkswellforprototypingbecauseitiseasytogetasiteupandrunning.UsePHPtodesign the site [...] but when it comes time for development, tell the team you want t he result to look and act like this PHP site...but in Java” (Or: “great, this is exactly what I need! now do it again, at twice the cost!”)‫‏‬ http://www.cio.com/article/176250 (skip the article, read the comments)‫‏‬
  • 4. Tuesday, February 26, 2008 4 Is PHP Enterprise ready?  Small  Lightweight  Cheap  Easy to learn  Big  Enterprise friendly  enterpriCe  CS required
  • 5. Tuesday, February 26, 2008 5 A word from my girlfriend It's not the SIZE of the tool... It's how you USE it.
  • 6. Tuesday, February 26, 2008 6 PHP is changing... •  1998   Personal stuff •  2003   Simple websites   Content management   Blogs •  2008   Big websites   Banks   Insurance Companies   ...
  • 7. Tuesday, February 26, 2008 7 PHP is changing... •  Traditional metaphor   PHP is like Lego bricks   Bricks allowing you to build anything
  • 8. Tuesday, February 26, 2008 8 PHP is changing... •  PHP is no longer a toy   Let’s use the metaphor of actual bricks   Because we’re building actual buildings now
  • 9. Tuesday, February 26, 2008 9 About Bricks •  Extreme simplicity •  Easy to learn •  Versatile •  Cheap ... so building a skyscraper must be peanuts, right?
  • 11. Tuesday, February 26, 2008 11 Step 1 – The Team “Dear Mr. Businessman, I have read about your plans to build a new skyscraper and I am applying for a job. I have a lot of experience with Bricks. I taught myself how to use them and have been maintaining our family shed for a few years now.”
  • 12. Tuesday, February 26, 2008 12 Step 1 – The Team •  Be a software engineer •  Train your skills •  Study OO principles •  Consider Zend Certification
  • 13. Tuesday, February 26, 2008 13 Step 2 - Requirements •  What does the customer need? •  What do visitors want?
  • 14. Tuesday, February 26, 2008 14 Step 2 - Requirements •  Functional Design   Requirements definition   Interaction Design / Wireframes   Flow diagrams
  • 15. Tuesday, February 26, 2008 15 Step 3 - Architecture •  Don’t just start stacking bricks •  Create an architecture first
  • 16. Tuesday, February 26, 2008 16 Step 3 - Architecture •  Technical Design   Modelling •  Class diagrams •  ER diagram (data model)‫‏‬ •  Colaboration diagrams •  Use cases •  etc.   Tools: UML, whiteboards
  • 17. Tuesday, February 26, 2008 17 Step 3 - Architecture •  High Level Architectures:   MVC (Model View Controller)   SOA (Service Oriented Architecture)   Multi-tier development (Frontend, Application, Data)   CBD (Component Based Development)‫‏‬
  • 18. Tuesday, February 26, 2008 18 Step 4 - Tools •  You don’t need tools... •  But they make you productive
  • 19. Tuesday, February 26, 2008 19 Step 4 - Tools •  Development:   Eclipse (PDT)‫‏‬   PhpED   Vim   Zend Studio   Komodo •  IDE's vs Editors   Debugging   Profiling   Navigation / cross references   Syntax Checking
  • 20. Tuesday, February 26, 2008 20 Step 4 - Tools •  Source Control   CVS / SVN   Bitkeeper / GIT   Branching   Tagging
  • 21. Tuesday, February 26, 2008 21 Step 5 - Foundation •  Start stacking bricks?   How many bricks does it take..   What about stability? •  Start with a foundation
  • 22. Tuesday, February 26, 2008 22 Step 5 - Foundation •  Use a framework   Provides guidelines (frame)‫‏‬   Off the shelf components •  Examples   Zend Framework http://framework.zend.com   CakePHP http://http://www.cakephp.org   ezComponents http://ez.no/ezcomponents   Symfony http://www.symfony-project.org   ATK http://www.achievo.org/atk
  • 23. Tuesday, February 26, 2008 23 Step 5 - Foundation •  The “Not Invented Here” Syndrome   “The existing frameworks are no good. I can do this better.”   “This framework is no good. It can do A through Y but I need Z.”   “This framework is too big. It provides A-Z but we only need A and B.”   “I know there's a good framework. But I would like to learn.”
  • 24. Tuesday, February 26, 2008 24 Step 6 – Design Patterns Requirement 1056.4: We need to be able to look outside, but we can't make holes in the wall (rain should be kept outside). When it's sunny, a hole is ok.
  • 25. Tuesday, February 26, 2008 25 Step 6 – Design Patterns •  A ‘window’ is a concept   Best practice way of solving a particular problem •  In IT, we call this a ‘design pattern’ •  Popular patterns in PHP:   MVC, Factory, Singleton, Registry, Decorator •  Good read:   php|architect's Guide to PHP Design Patterns - Jason E. Sweat
  • 26. Tuesday, February 26, 2008 26 Step 7 - Testing •  Is your software tested after it has gone live?
  • 27. Tuesday, February 26, 2008 27 Step 7 - Testing •  Various types of testing   Developer testing   Functional testing   Environment testing   Performance testing   Usability testing
  • 28. Tuesday, February 26, 2008 28 Step 7 - Testing •  Common scenario
  • 29. Tuesday, February 26, 2008 29 Step 7 - Testing •  User complains... MWOEHA! BUG!
  • 30. Tuesday, February 26, 2008 30 Step 7 - Testing •  Developer attacks the problem fix_bug();
  • 31. Tuesday, February 26, 2008 31 Step 7 - Testing •  Problem solved!
  • 32. Tuesday, February 26, 2008 32 Step 7 - Testing •  Solution: Unit Tests   Automated testing after each change   Prevents regressions •  Testing for PHP applications:   PHPUnit http://www.phpunit.de/   SimpleTest http://www.lastcraft.com/simple_test.php •  Continuous Integration:   CruiseControl with phpUnderControl   Xinc http://code.google.com/p/xinc/
  • 33. Tuesday, February 26, 2008 33 Step 7 - Testing •  Test Driven Development 1. Define functionality 2. Create testcase 3. Run test -> test fails 4. Implement functionality •  Test succeeds? Done •  Test fails? Refactor Repeat step 4 until finished
  • 34. Tuesday, February 26, 2008 34 Step 8 - Optimization Users are reporting: "I work on the 197th floor. Every day I have to walk the stairs for 2 hours, then I have only 4 hours left to do my job."
  • 35. Tuesday, February 26, 2008 35 Step 8 - Optimization •  Solution: Elevator
  • 36. Tuesday, February 26, 2008 36 Step 8 - Optimization In PHP, this ‘elevator’ is called an ‘accelerator’   This is how PHP works (pseudo-ish code): read index.php; // enter the building compile index.php; // go to floor 197 echo “Hello World”; // get the job done   An accelerator improves the first 2 steps   Accelerators for PHP: •  eAccelerator http://eaccelerator.net/ •  APC http://pecl.php.net/package/APC •  Zend Platform http://www.zend.com/products/zend_platform
  • 37. Tuesday, February 26, 2008 37 Step 8 - Optimization Users complain: “Every time I need coffee I have to go to the top floor to get some.”
  • 38. Tuesday, February 26, 2008 38 Step 8 - Optimization •  Solution: Create small coffee corners on every floor so people d o n’t have to go to the main restaurant every time. •  In PHP we call this caching   Don’t query the database everytime you need data   Use locally stored copy (file or memory)‫‏‬ •  PHP Caching solutions:   Zend_Cache http://framework.zend.com   Smarty http://smarty.php.net   Zend Platform http://www.zend.com/products/zend_platform   Memcached http://danga.com/memcached/
  • 39. Tuesday, February 26, 2008 39 Step 9 - Deployment •  Lifecycle:   Develop   Test   Deploy to acceptance test environment   Deploy to live •  Use SVN •  Code is just a part, don't forget the database •  Create a 'Deployment & Release Profile'
  • 40. Tuesday, February 26, 2008 40 Step 9 - Deployment •  System Architecture PHP Apache Linux MySQL From a simple LAMP stack on a single machine...
  • 41. Tuesday, February 26, 2008 41 Step 9 - Deployment •  System Architecture ... to a High Availability, Horizontally Scalable architecture
  • 42. Tuesday, February 26, 2008 42 Step 10 - Operations •  Monitoring   Logfiles   Monitor infrastructure (tools such as Nagios)‫‏‬   Monitor application (tools such as Zend Platform)‫‏‬   Monitor business (is the money still pouring in?)
  • 43. Tuesday, February 26, 2008 43 Step 10 - Operations •  Debugging   Ideal: “I had error x when I selected y after I clicked z”   Reality: “It doesn't work!” “What exactly doesn't work, and what did you do?” “It just ******** didn't work, FIX IT.”
  • 44. Tuesday, February 26, 2008 44 Step 10 - Operations •  Solution   A 'root cause analysis' tool
  • 45. Tuesday, February 26, 2008 45 Step 10 - Operations •  Change management   Ticket system   Stick to your deployment - use the DRP   DON'T TOUCH THE LIVE ENVIRONMENT.   But I absolutely have to... DON'T!   but... NO! IF YOU TOUCH IT, YOU WILL LOSE ALL GURU POINTS.
  • 46. 46 Shameless self-promotion •  php|architect's Guide to Enterprise PHP Development •  PDF: June 12, Print: June 26 •  ISBN: 978-0-9738621-8-8 •  Order via http://phparch.com •  http://www.enterprisephp.nl