PHP is now part of the normal tools at every IT department. Indeed, it must now cope with a raise in exigence and level of quality expected beyond it's famed scalability and fast development. What tools are needed to organize a large dev team and produce several hundreds of web site a year? Now is the time of industrialisation, where planning and organizing the code production must track bugs before publishing the code. We'll cover the tools and technics available to tame conception, production, publication and team work.
5. Function lists
692 defined functions, 611 actually used
function CMP2() : 18 different definitions
fct_create_thjipk(), datefren(), fct_lstagt_key(),
phpinfo_system_old(), fct_repeat_even_requ(),
fct_vrai_champ_general()
Every one letter variable used : $a, $b, $c,...
6. Function spring cleaning
It’s time to check them
List them, see what they do
Refactor the code, remove doubles
Gather them in a central library, document them
Build a solid framework...
7. Function spring cleaning
It’s time to check them
List them, see what they do
Refactor the code, remove doubles
Gather them in a central library, document them
Build a solid framework...
10. 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
11. PHP industrialization
Going from single to multiple
Being proactive, rather than reactive
Scale your work, not your server
Otherwise, go to Rasmus session
14. IDE
Choose it for ease of use
Netbean / Symfony, Zend tools, Komodo / cakePHP
Code browser, editor, debugger, unit test integration,
VCS integration, framework integration.
15. VCS
Subversion, git, CVS, bazaar
Resolve conflicts
Stores and distribute the code
Allow versioning, paralell development, rollback
Code not in VCS does not exists
16. VCS Code
Bug Track Production
VCS
Continuous
Unit Test
integration
19. 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
22. Unit Tests
PHP Unit, Simple Test, Lemon, Zend_Test, phpt
23. Tests helps decouple
Production
Avoid regression
Code Platform
Prevent your recall
Shows progress
Serves as manual
Help at communication
Customer
use
27. Automated deployment
Phing, maven, ant, pear
Needed for continuous integration
The forgotten part of development
Compulsory for large plat-forms, high scaling
28. Continuous integration
Check the code in back ground
phpUnderControl, Xinc, Hudson
Graphs the results
Compilation, code sniffer, unit tests, coverage
Log, inclusion, performances...
Share with the team
29.
30. Conception
Class diagram, database schema, navigation
ArgoUML, StarUML, PowerArchitect
Describe the general organisation
List everything that will need name
Class, methods, constants, SESSION, includes...
Check the result