No description
Find a file
2018-08-09 10:43:52 +01:00
01-front-controller.md Added gitignore 2016-11-01 15:40:10 +01:00
02-composer.md Adding vendor folder to gitignore 2016-11-01 15:44:31 +01:00
03-error-handler.md Updated code example 2016-11-01 15:52:51 +01:00
04-http.md Update 04-http.md 2017-03-02 03:51:48 +02:00
05-router.md Small typo 2018-08-09 10:43:52 +01:00
06-dispatching-to-a-class.md Updated code 2016-11-01 16:23:28 +01:00
07-inversion-of-control.md Update 07-inversion-of-control.md 2016-11-01 16:27:27 +01:00
08-dependency-injector.md added strict mode 2016-11-01 16:30:51 +01:00
09-templating.md Update 09-templating.md 2016-11-01 16:51:33 +01:00
10-dynamic-pages.md Update 10-dynamic-pages.md 2016-11-01 17:24:08 +01:00
11-page-menu.md Update 11-page-menu.md 2016-11-02 13:14:13 +01:00
12-frontend.md Update 12-frontend.md 2016-11-01 17:52:22 +01:00
LICENSE Create LICENSE 2016-08-31 12:51:41 +02:00
README.md Update README.md 2017-12-08 20:39:00 +01:00
to-be-continued.md Update to-be-continued.md 2017-12-08 20:36:52 +01:00

Because this tutorial was so well-received, it inspired me to write a book. The book is a much more up to date version of this tutorial and covers a lot more. Click the link below to check it out (there is also a sample chapter available).

Professional PHP: Building maintainable and secure applications

The tutorial is still available in it's original form below.

Create a PHP application without a framework

Introduction

If you are new to the language, this tutorial is not for you. This tutorial is aimed at people who have grasped the basics of PHP and know a little bit about object-oriented programming.

You should have at least heard of SOLID. If you are not familiar with it, now would be a good time to familiarize yourself with the principles before you start with the tutorial.

I saw a lot of people coming into the Stack Overflow PHP chatroom and asking if framework X is any good. Most of the time the answer was that they should just use PHP and not a framework to build their application. But many are overwhelmed by this and don't know where to start.

So my goal with this is to provide an easy resource that people can be pointed to. In most cases a framework does not make sense and writing an application from scratch with the help of some third party packages is much, much easier than some people think.

This tutorial was written for PHP 7.0 or newer versions. If you are using an older version, please upgrade it before you start. I recommend that you use the current stable version.

So let's get started right away with the first part.

Parts

  1. Front Controller
  2. Composer
  3. Error Handler
  4. HTTP
  5. Router
  6. Dispatching to a Class
  7. Inversion of Control
  8. Dependency Injector
  9. Templating
  10. Dynamic Pages
  11. Page Menu
  12. Frontend