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

Buzzwords 101

Buzzwords 101

Avatar for Iain Cambridge

Iain Cambridge

May 03, 2016

More Decks by Iain Cambridge

Other Decks in Technology

Transcript

  1. DRY – Don’t Repeat Yourself • Avoid writing the same

    code in multiple places • Avoid having the same bug everywhere • Avoid doing the same logical processing of data multiple times Iain Cambridge
  2. DRY - Don’t • Create traits to handle setters and

    calls to dependencies. Iain Cambridge
  3. Encapsulation • Store everything in an area • Prevent others

    from modifying your things Iain Cambridge
  4. S.O.L.I.D. • Base for any good code base • SRP

    – Single Responsibility principal • OCP – Open/Closed Principal • LOR – Likov’s Object Replacement • ISP – Interface Sergration Principal • DIP – Dependency Inversion Principal Iain Cambridge
  5. Single Responsibility • A class should only do one thing

    • Group everything that changes for the same reaso Iain Cambridge
  6. Liskov’s Object Replacement • You should be able to replace

    an object and not change the behaviour of the application Iain Cambridge
  7. Test Driven Development • Write the test – Enough code

    for it to fail • Write the code – Enough code for it to pass • Refactor to make it nice • Repeat • Functional level -> Intergration -> Unit tests Iain Cambridge
  8. Domain Driven Design • To base the design of your

    application on conversions with domain experts Iain Cambridge
  9. Law of Demeter • Only talk to friends and not

    friends of friends Iain Cambridge
  10. YAGNI - You aren't gonna need it • Don’t build

    things until they’re needed Iain Cambridge
  11. Static Analysis • Read the static code and report back

    • PHPMd, Scrutinizer-CI, sensiolabs insights, etc Iain Cambridge