Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Using PhpSpec to build quality into a Symfony app

1a4e1f98f3aeef310273366c8c785207?s=47 Jakub Zalas
September 20, 2013

Using PhpSpec to build quality into a Symfony app

SpecBDD is the inner loop of Behavior Driven Development. Working on the code level, it's the Test Driven Development redefined.

PhpSpec, being a SpecBDD tool, aims on ensuring the internal quality of an application. It makes the test-first approach a lot easier by supporting the developer at every step, almost suggesting next actions to take. Its revolutionary approach makes that once you tried PhpSpec, there's no way back.

During the talk I introduced the attendees to PhpSpec and shown how to use it to drive the design and improve the quality of a Symfony application.

1a4e1f98f3aeef310273366c8c785207?s=128

Jakub Zalas

September 20, 2013
Tweet

Transcript

  1. Using PhpSpec to build quality into a Symfony app by

    Jakub Zalas
  2. Who am I? o  I work @SensioLabsUK o  I tweet

    @jakub_zalas o  I code @jakzal
  3. QUALITY? What is

  4. How would you define software quality? @jakub_zalas

  5. for me software quality is defined by factor how easy

    is to introduce and manage change without breaking product @cakper
  6. clean, readable code. documentation where appropriate. complementary test suite. peer

    reviewed. @rich_81 oh and bug-free ;-)
  7. easier to maintain = less technical debt = less cost

    financially. @rich_81 plus, who likes working on crappy projects? ;-)
  8. Easy to maintain and extend. @sprain

  9. software quality is very subjective! It's not only about the

    code @hhamon but also availability, ease to use, ease to change, failures tolerance, performance, backups management...
  10. WTF per minute per user Jacek

  11. I would distinguish between internal and external quality. @CiaranMcNulty

  12. Quality is really two levers: external and internal quality. External

    quality is the quality perceived by the customer. [Internal quality is] Quality of internals of the system: how well it is designed, how good the internal tests are, and so on.
  13. the extent to what the software takes into account what

    matters most for the customer & the maintainability of the source code @_md External quality Internal quality
  14. software quality? That the software delivers real value and is

    built in a sustainable way. @IanDominey External quality Internal quality
  15. IS IMPORTANT? What

  16. Ignoring the external quality

  17. THE INTERNAL QUALITY This talk is about

  18. Ignoring the internal quality

  19. Ignoring the internal quality  Care No care Time #

    of features
  20. Ignoring the internal quality Time Pace Care   No  care

      Care   No  care  
  21. CARE? Should we

  22. IS OUR PROFESSIONAL RESPONSIBILITY Ensuring the internal quality

  23. CONTINUOUSLY REVIEW THE DESIGN To MAINTAIN the internal quality

  24. REFACTOR To MAINTAIN the internal quality

  25. TESTS There’s no refactoring without

  26. IS OUR PROFESSIONAL RESPONSIBILITY Writing tests

  27. DESIGN WELL To BUILD the internal quality

  28. DRIVE YOUR CODE WITH TESTS To BUILD the internal quality

  29. WE LEARN HOW TO KEEP THE DESIGN SIMPLE Writing tests

    FIRST
  30. IS OUR PROFESSIONAL RESPONSIBILITY Writing tests FIRST

  31. IS ALL ABOUT TDD Building the quality into our app

  32. Failing   step   Failing   test   Code  

    Refactor   Passing   step   External Internal
  33. EXCEPT THAT THEY DO Tools doesn’t matter

  34. DEMO Dead Coding

  35. THE END

  36. Credits •  http://www.rgbstock.com/photo/mfXiaE4/Angry+Sumo •  http://www.nightmarefactory.com/cgi-bin/shopper?preadd=action&key=RU909885 •  http://en.wikipedia.org/wiki/Blind_men_and_an_elephant •  http://www.rgbstock.com/download/RWLinder/mC5Xudi.jpg