Managing the Software Lifecycle of a PHP application

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.

0 comments

Post a comment

    Post a comment
    Embed Video
    Edit your comment Cancel

    7 Favorites

    Managing the Software Lifecycle of a PHP application - Presentation Transcript

    1. Managing the Software Life Cycle of PHP Applications Stefan Priebsch, e-novative GmbH php|works 2008, Atlanta, GA
    2. About Me ● Stefan Priebsch ● From Munich, Germany ● Degree in computer science ● PHP enthusiast since PHP 4.0b3 ● Consultant, Trainer, Author ● I help customers make better use of PHP
    3. Who are you?
    4. Software Lifecycle
    5. Software Lifecycle ve si ● Inception ur ● Elaboration c Re ● Construction Transition tly ● ● Production en ● Retirement h er In
    6. „The perfect project plan is possible if one first documents a list of all the unknowns“ -- Bill Langley
    7. Process Models
    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, but it must be lived 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. „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.“ -- Rational UML Document Set, Semantics, Chapter 5.2
    15. „There's no sense being exact about something if you don't even know what you're talking about“ -- John von Neumann
    16. Heavy Processes Fail
    17. Lightweight Wins
    18. 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
    19. 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
    20. Small Incremental Steps
    21. „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 administrator frustration“ -- Ray Ozzie
    22. Reuse ● Stick to standards ● Open source = open knowledge ● Reuse Experience ● Use Components ● Use Frameworks?
    23. Basic Quality Assurance ● Static Code Analysis ● Lint (php -l) ● PHP_CodeSniffer ● Software Metrics ● PHPUnit ● PHP_Depend ● Output validation ● Tidy ● HTML/CSS validation
    24. 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 ­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­
    25. PHP_Depend
    26. „Measuring programming progress by lines of code is like measuring aircraft building progress by weight“ -- Bill Gates
    27. Testing ● Unit Tests ● Integration Tests ● System Tests ● Acceptance Tests ● Testing Tools: ● PHPUnit ● Selenium
    28. „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
    29. Deployment ● svn checkout ● Compressed archive (tar.gz, zip, bzip2) ● PEAR installer ● New in PHP 5.3: phar archives ● rsync
    30. Deployment ● Always automate deployment ● Use 3 Systems ● Development ● Integration/Staging ● Live ● Consider virtual machines
    31. Continuous Integration ● Automate builds ● Integrate frequently ● Run automated tests ● Tools: ● CruiseControl ● phpUnderControl
    32. Continuous Integration
    33. Debugging ● Create a test to expose each bug ● Keep the test, and run it often ● Tool: xdebug ● Tracing ● Remote Debugging
    34. „Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it“ -- Brian W. Kernighan
    35. Maintenance
    36. „The cost of adding a feature isn't just the time it takes to code it. The cost also includes the addition of an obstacle to future expansion“ -- John Carmack
    37. „Large-program structure must not only be created but must also be maintained if decay is to be avoided or postponed“ -- Meir Lehman
    38. 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
    39. „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“ -- Antoine de Saint-Exupery
    40. 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
    41. „Premature optimization is the root of all evil“ -- Donald Knuth
    42. How to scale ● Reduce I/O ● Disks are slow ● Network is slow ● Caching ● Bytecode caching ● Data caching ● Result caching
    43. Migration ● Code E_STRICT-compatible ● in PHP 5.3: watch out for E_DEPRECATED ● Compare trace logs between versions ● Refactor when fixing issues
    44. Today's Take-Aways
    45. Today's Take-Aways ● Keep things simple ● Accept change ● Test early and often ● Automate tests and deployment
    46. „It's not at all important to get it right the first time. It's vitally important to get it right the last time“ -- Andrew Hunt and David Thomas
    47. Thank you.
    48. http://www.priebsch.de stefan.priebsch@e-novative.de Profiles at Xing, LinkedIn, Facebook

    + Stefan PriebschStefan Priebsch, 11 months ago

    custom

    1983 views, 7 favs, 2 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 1983
      • 1841 on SlideShare
      • 142 from embeds
    • Comments 0
    • Favorites 7
    • Downloads 78
    Most viewed embeds
    • 135 views on http://www.priebsch.de
    • 7 views on http://www.mrkindy.com

    more

    All embeds
    • 135 views on http://www.priebsch.de
    • 7 views on http://www.mrkindy.com

    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