Chapter 8. How to Write Better Code

This is the final chapter in this book. We've discussed a lot of patterns, but in this final chapter I want us to discuss how these patterns can be applied.

I want us here to talk about the bigger picture about how our code fits together, and what the key takeaways are for us to write great code.

In addition to this, I would like to discuss where patterns are suited to our application in the development phase.

In this chapter, we'll cover the following points:

  • The nature of an HTTP request
  • RESTful API design
  • Keep It Simple, Stupid
  • Software development life cycle and engineering practices
  • The importance of testing
  • A light introduction to BDD

Nature of a HTTP request

Many developers find HTTP requests are abstracted away ...

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.