In this chapter, I've sought to tie up some loose ends. We've discussed some of the networking side of web development by learning about HTTP. In addition to this, we've learned about how RESTful APIs can be effectively designed.

This book is now coming to an end; let's revisit some core values that make our code great:

  • Favor composition over inheritance
  • Avoid repetitive coding (the DRY principle means Don't Repeat Yourself)
  • Keep It Simple, Stupid
  • Don't use design patterns just for using design patterns, introduce design patterns when you identify a recurring issue that they can solve
  • Abstraction is awesome, interfaces help you abstract
  • Write code in line with good standards
  • Separate responsibilities throughout your code
  • Use dependency management ...

Get Mastering PHP Design Patterns now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.