Learn how to build maintainable and secure applications

In this book you will learn how to…

  • write clean and maintainable object-oriented code
  • start a new project from scratch
  • implement a layered architecture
  • protect your application from XSS, CSRF and other attacks

The book is structured as a tutorial and will guide you through the steps of building a modern web application from scratch.

It will provide you with solid software development knowledge that you can then use as a foundation to learn more advanced approaches like domain-driven design.

"Fantastic book. I had followed Patrick's Github tutorial for a no-framework build in the past and really wanted something to expand on that. This book does just that, it demonstrates concepts to build a much more functional website step by step with a modern day approach. If you're a more practical learner who likes to do rather than read all day I thoroughly recommend this book."

Fabien Oram
Senior PHP Developer (UK)

"A fantastic read. Patrick's words add cement to the principles of object oriented programming. From how much I've learned, I can't recommend this enough to any developer looking to improve."

Sean Nessworthy
Senior PHP Developer (UK)

It's a 212-page book and consists of a theory and a tutorial part. Everything in the book is framework-agnostic and you can apply what you learn to your favorite framework.

You will learn how to write clean code that stands the test of time. At the end of the book, you will know how to implement a layered architecture from scratch and how you can protect your application from the most common attack vectors.

This is the book that I wanted to read when I first learned about clean code.

If you have a question about the book that is not already answered here, send me an email at [email protected].

Table of Contents

Part I: Theory

1. Introduction
2. Concepts
3. Methods
4. Objects

Part II: Tutorial

1. Front Controller
2. Bootstrapping
3. Dependency Injection
4. Templating and Cross-site Scripting
5. Application Layer
6. Infrastructure Layer
7. Cross-site Request Forgery
8. SQL Injection
9. Registration
10. Authentication
11. Authorization

"Great book, I really liked the part one theory! I learned php before I learned OOP many moons ago and this book would have changed my life back then."

Dave Geurts
CTO at Suralink (USA)

"I read the book in one sitting. In my life, I have read over 30 books on PHP and this one topped all of them. I like the quotes, the references and the security suggestions."

Sal Orozco
PHP Developer (USA)

About the author

Hi, my name is Patrick and I am a software developer from Zurich, Switzerland. I have been programming for more than 12 years, focusing mostly on PHP.

I'm self-taught and it took me a long time to learn how to write good code. I learned from many different resources, mostly from non-PHP books. I am writing this book so that you don't have to go through the same trouble as me.