Managing the software lifecycle of PHP applications

Loading...

Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

1 comments

Comments 1 - 1 of 1 previous next Post a comment

  • + rondgreen Ron Green 8 months ago
    On a few foils, the underlying graphics obscure the text, but all-in-all, well done and quite insightful. I really enjoyed the quotations!
Post a comment
Embed Video
Edit your comment Cancel

7 Favorites, 1 Group & 1 Event

Managing the software lifecycle of PHP applications - Presentation Transcript

  1. Managing the Software Life Cycle of PHP Applications Stefan Priebsch, thePHP.cc PHP Quebec, Montreal
  2. Stefan Priebsch Co-Founder and Principal Consultant
  3. Software Lifecycle
  4. Software Lifecycle ve si Inception ● ur Elaboration ● c Re Construction ● Transition tly ● Production ● en Retirement ● er h In
  5. „The perfect project plan is possible if one first documents a list of all the unknowns.“ unknowns.“ -- Bill Langley
  6. Process Models
  7. Waterfall Model Systems Engineering ● Analysis ● Design ● Coding ● Testing ● Deployment and maintenance ●
  8. Waterfall Model Systems Engineering ● Analysis ● Design ● Coding ● Testing ● Deployment and maintenance ●
  9. „The most important single aspect of software development is to be clear about what you are trying to build.“ -- Bjarne Stroustrup
  10. „Life can only be understood backwards, backwards, but it must be lived forwards.“ forwards.“ -- Soren Kierkegaard
  11. Other Models V-Model ● Spiral Model ● Rational Unified Process ● Extreme Programming ● Scrum ● Test-driven Development ● ... ●
  12. Linear Processes Fail
  13. Iterative Processes Win
  14. Excerpts from „Rational UML Document Set, Semantics, Chapter 5.2“:
  15. „The name of a Type instance is a Name instance representing the name of the Type; its value may not be a null name [...]“ „The name of an Instance instance is optional, but where it exists it must not be a null name [...]“ „An Instance instance with no name is always considered to have a unique name, distinct from any other Instance instance with no name.“
  16. „There's no sense being exact about something if you don't even know what you're talking about.“ -- John von Neumann
  17. Heavy Processes Fail
  18. Lightweight Wins
  19. Agile Methods Individuals and interactions ● over processes and tools Working software ● over comprehensive documentation Customer collaboration ● over contract negotiation Responding to change ● over following a plan
  20. Agile Development Working software is delivered ● frequently Working software is the principal ● measure of progress Even late changes in requirements ● are welcomed Regular adaptation to changing ● circumstances
  21. Small Incremental Steps
  22. „Complexity kills.“ „It sucks the life out of developers, it makes products difficult to plan, build and test, it introduces security challenges and it causes end-user and frustration.“ frustration.“ administrator -- Ray Ozzie
  23. „Complexity kills.“ „It sucks the life out of developers, it makes products difficult to plan, build and test, it introduces security challenges and it causes end-user and frustration.“ frustration.“ administrator -- Ray Ozzie
  24. Reuse Stick to standards ● Open source = open knowledge ● Reuse Experience ● Use Components ● Use Frameworks? ●
  25. Basic Quality Assurance Static Code Analysis ● Lint (php -l) ● PHP_CodeSniffer ● Software Metrics ● PHPUnit ● PHP_Depend ● Output validation ● Tidy ● HTML/CSS validation ●
  26. PHP_CodeSniffer FILE: /path/to/code/myfile.php ­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­ FOUND 5 ERROR(S) AFFECTING 5 LINE(S) ­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­   2 | ERROR | Missing file doc comment  20 | ERROR | PHP keywords must be lowercase; expected \"false\" but found \"FALSE\"  47 | ERROR | Line not indented correctly; expected 4 spaces but found 1  51 | ERROR | Missing function doc comment  88 | ERROR | Line not indented correctly; expected 9 spaces but found 6 ­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­ FILE: /path/to/code/yourfile.php ­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­ FOUND 1 ERROR(S) AND 1 WARNING(S) AFFECTING 1 LINE(S) ­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­  21 | ERROR   | PHP keywords must be lowercase; expected \"false\" but found     |         | \"FALSE\"  21 | WARNING | Equals sign not aligned with surrounding assignments ­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­
  27. „Measuring programming progress by lines of code is like measuring aircraft building progress by weight.“ weight.“ -- Bill Gates
  28. Testing Unit Tests ● Integration Tests ● System Tests ● Acceptance Tests ● Testing Tools: ● PHPUnit (http://www.phpunit.de) ● Selenium (http://seleniumhq.org/) ●
  29. „A fault discovered and corrected in the unit testing phase is more than a hundred times cheaper than if it is done after delivery to the customer.“ -- Barry Boehm
  30. Deployment svn checkout ● Compressed archive (tar.gz, zip, bzip2) ● PEAR installer ● New in PHP 5.3: phar archives ● rsync ●
  31. Deployment Always automate deployment ● Use 3 Systems ● Development ● Integration/Staging ● Live ● Consider virtual machines ●
  32. Continuous Integration Automate builds ● Integrate frequently ● Run automated tests ● Tools: ● CruiseControl ● (http://cruisecontrol.sourceforge.net) phpUnderControl ● (http://phpundercontrol.org)
  33. Continuous Integration
  34. Debugging Create a test to expose each bug ● Keep the test, and run it often ● Tool: xdebug (http://www.xdebug.org) ● Tracing ● Remote Debugging ●
  35. „Debugging is twice as hard as writing the code in the first place.“ „Therefore, if you write the code as cleverly as possible, possible, you are, by definition, not smart enough to debug it.“ -- Brian W. Kernighan
  36. Maintenance
  37. „The cost of adding a feature isn't time it takes to code it.“ it.“ just the „The cost also includes the obstacle to addition of an future expansion.“ expansion.“ -- John Carmack
  38. „Large-program structure must created but must not only be also be maintained if decay is to be avoided or postponed“ -- Meir Lehman
  39. Refactoring Improve the design of software without ● changing its behaviour „Clean up“ code ● Not adding new features ● Keep refactoring your code constantly ● Use unit tests to ensure you don't ● break anything
  40. „You know you've achieved perfection in design, not when you have nothing more to add, but when you have nothing more to take away.“ away.“ -- Antoine de Saint-Exupery
  41. Scaling Do not guess where to start ● Profile your code ● how often are functions called ● how long does execution take ● ! that's just one execution path ● Tool: xdebug (http://www.xdebug.org) ●
  42. „Premature optimization is the root of all evil.“ -- Donald Knuth
  43. Scaling in a Nutshell Reduce I/O ● Disks are slow ● Network is slow ● Caching ● Bytecode caching ● Data caching ● Result caching ●
  44. Migration Code E_STRICT-compatible ● in PHP 5.3: watch out for E_DEPRECATED ● Compare trace logs between versions ● Refactor when fixing issues ●
  45. Today's Take-Aways
  46. Today's Take-Aways Keep things simple ● Accept change ● Test early and often ● Automate tests and deployment ●
  47. not at all important „It's to get it right the first time.“ time.“ „It's vitally important to get it right the last time.“ time.“ -- Andrew Hunt and David Thomas
  48. http://www.thephp.cc Twitter: thephpcc stefan@thephp.cc http://www.priebsch.de Twitter: spriebsch Xing, LinkedIn, Facebook

+ Stefan PriebschStefan Priebsch, 8 months ago

custom

3440 views, 7 favs, 3 embeds more stats

A software project is not only about writing code. more

More info about this document

© All Rights Reserved

Go to text version

  • Total Views 3440
    • 3176 on SlideShare
    • 264 from embeds
  • Comments 1
  • Favorites 7
  • Downloads 198
Most viewed embeds
  • 252 views on http://www.priebsch.de
  • 7 views on http://www.slideshare.net
  • 5 views on http://reseau-aquitain.typepad.fr

more

All embeds
  • 252 views on http://www.priebsch.de
  • 7 views on http://www.slideshare.net
  • 5 views on http://reseau-aquitain.typepad.fr

less

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate. If needed, use the feedback form to let us know more details.

Cancel
File a copyright complaint
Having problems? Go to our helpdesk?

Categories