PHP’s industrialisation
Epitech 2012, Paris, France
Agenda


Tame your development cycles
Scale up your PHP work
Get the tools and methods
Speaker


 Damien Seguy
 CTO at Bysoft China
 damien.seguy@gmail.com
Yes,
we take
questions
Romantic PHP
Modern PHP
Reality check

 65 portals next 6 months
 6 people to upgrade 350 intranet
 120 events sites a year on 150 servers
 App on one city, cover 12 cities by xmas,
 expand to 2 countries next year.
 full time employee for deployements
Three mantra


Release code ownership
Capitalize your work
Involve your users
∆ Convention
 ∆ IDE        ∆ Conception
 ∆ Framework ∆ Deploiement
              ∆ VCS     Capitalization
Ownership
                         ∆ Unit tests
           ∆ CI
         ∆ Docs        ∆ Bug
       ∆ Methods      Tracking

           ∆ Functional tests
              Involvment
Release code ownership
Release code ownership

Low bus factor
  Don’t be the only one
Ugly code and hacks
  Write code like everyone else
50% of dev time is spend on production actions
  Don’t be in the path of operations
Release code ownership


Have others run your work without you
Don’t invest yourself in the code
Make code accessible to someone else
Code conventions

PEAR, Zend
Frameworks,
Symfony...
Choose one,
use one
Bring unity
Code_sniffer
IDE


Choose it for ease of use
Netbean / Symfony, Zend tools, Komodo / cakePHP
Code browser, editor, debugger, unit test integration,
VCS integration, framework integration.
Frameworks

Choose one, for development speed
Components, conventions, scaffolding, tests
Community, expertise, training
Build a business layer
VCS

Subversion, git, CVS, bazaar
Resolve conflicts
Allow versioning, paralell development, rollback
Stores and distribute the code
Code not in VCS does not exists
VCS            Development




  Unit Test                   Production
                   VCS




                         Continuous
       Bug Track
                         integration
Capitalization
Capitalization

 Accumulate all phases of project
 Capture information along the way
 Avoid dead ends
   Think of who will reuse this
Unit Tests
 PHP Unit, Simple Test, Lemon, Zend_Test, phpt
Tests helps decouple

                                 Production
Avoid regression
                        Code      Platform
Prevent your recall
Shows progress
Serves as manual
Help at communication
                               Customer
                                 use
Conception
Class diagram, database schema, navigation
Describe the general organisation
List everything that will need name
  Class, methods, constants, SESSION, includes...
Check the result in the code (BOUML)
ArgoUML, StarUML, PowerArchitect
Automated deployment

Phing, maven, ant, pear
Needed for continuous integration
The forgotten part of development
Compulsory for large plat-forms, high scaling
Users involvment
User involvment	

Avoid tunnel effect
Don’t confront the tidal wave of requests
  bugs, changes, new, adaptation, acceleration
Have users do part of the work
Bug tracker

Mantis, Trac, Redline, Jira
Connect it to VCS, deployment
Gather feedback from users without direct contact
Goes into changelog when deploying
Bug tracker

Mantis, Trac, Redline, Jira
Connect it to VCS, deployment
Gather feedback from users without direct contact
Goes into changelog when deploying
Functional testing

 Green pepper, fitnesse
 Wiki base : easy on non-technical users
 Gather business data and use case
 Tests a priori, test live
 Developper will do the connection into the code
GreenPepper
GreenPepper
GreenPepper
GreenPepper
GreenPepper
Continuous integration
 Check the code in back ground
 phpUnderControl, Hudson, Maven, sonar, Xinc
 Graphs the results
   Compilation, code sniffer, unit tests, coverage
   Log, inclusion, performances...
 Share with the team, users
Methodologies
Explain how you produce code
Get your users involved
Make short cycles to deliver, adapt and polish
Agile methodologies :
  SCRUM, XP, Lean SD, Open Unified Process
Agile practices may be sufficient
Documentation

From developper to users
Have developper start it
Add comments
Turn it into a wiki
Recommanded sessions

Introduction au TDD
Continuous integration of PHP projects
Simulation Scrum avec prototypage papier
XP-game
Even further?

 Continuous deployment (a la flickr)
 Cross auditing
 Collaborative auditing
 Static analysis
damien.seguy@gmail.com		
http://www.slideshare.net/dseguy/

Epitech industrialisation 2012.key