no-framework-tutorial

A small tutorial to show how to create a PHP application without a framework.

Github星跟踪图

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

主要指标

概览
名称与所有者PatrickLouys/no-framework-tutorial
主编程语言
编程语言 (语言数: 0)
平台
许可证MIT License
所有者活动
创建于2014-09-12 11:06:04
推送于2021-01-31 01:38:57
最后一次提交2018-09-25 11:43:26
发布数0
用户参与
星数1.5k
关注者数78
派生数190
提交数170
已启用问题?
问题数53
打开的问题数8
拉请求数18
打开的拉请求数3
关闭的拉请求数3
项目设置
已启用Wiki?
已存档?
是复刻?
已锁定?
是镜像?
是私有?