Playing
01. Introduction

Episodes

0%
Your progress
  • Total: 4h 45m
  • Played: 0m
  • Remaining: 4h 45m
Join or sign in to track your progress

Transcript

00:00
The first question is why would we build our own PHP framework? Well, if you've ever used a framework, you'll know that a lot of what's going on is abstracted away and goes on behind the scenes, this means that you're working with the framework, but you don't necessarily know what is
00:15
actually happening in the background. What we're going to do here is build out a pretty solid framework that contains a bunch of features. And as we build this up completely from scratch, this will first of all, give
00:28
you a really good idea of how a framework actually works, how a request comes in, how it's filtered through and then responds, and then also there's a bunch of just raw PHP knowledge here that you can use in future projects, even if you're working within a framework.
00:46
So in this course, we are going to cover a huge amount into this system, including routing, controllers, views, service providers, which we'll use with a container. We'll obviously access the database and we'll do that with models as well.
01:02
We'll also look at authentication, config, cross-site requests for jury protection, handling exceptions, which means stuff like rendering custom views for 404 errors. We'll look at pagination, validation, flashing messages,
01:16
and a load more stuff as well. So as you can see, the structure of the app here probably looks more like the frameworks that you're used to. So something like Laravel or slim, how a framework is usually structured.
01:29
So we've got a main app directory here, which contains stuff like our config helpers, our core, which is where our app lives and our container. And we also have things like our HTTP folder with all of our controllers in the middleware that we can apply to any of our routes and speaking of routes.
01:45
If we just come down to our routes here, you can see that we have got a route file in here with routes being registered as you would expect. So we're not going to look too much into this right now, but that's pretty much what we're doing.
01:58
There's a ton that we can learn for this and feel free to just dip into certain sections of the course. If you need to learn something specific, either way, we're going to go from the start, a completely empty project and build up what you can see here and with
02:12
all of the features that I've spoken about. Okay. If you're ready to get started, let's go over to the next section and just start to think about our app structure and how we can start to load everything in.

Episode summary

Welcome to the course! In this first episode, we're diving into why you might want to build your own PHP framework from scratch. If you've ever used frameworks like Laravel or Slim, you've probably noticed that a lot of the inner workings are hidden away. Building our own means you'll get to see (and build) everything happening behind the scenes, which is a huge boost to your understanding as a developer.

We'll cover pretty much everything you'd expect from a modern framework – routing, controllers, views, service providers (with a container), and database access with models. We'll also tackle important features like authentication, configuration, security like CSRF protection, exception handling (think custom 404 pages), pagination, validation, flash messages, and more.

The structure of the project will be familiar if you've worked with big frameworks before, with folders for config, core, containers, HTTP, controllers, and middleware. By the end, you'll have a solid framework and a deep understanding of how PHP frameworks tick.

Feel free to skip around the course if you're just interested in certain parts. But if you're ready to start from scratch and build the whole thing together, let's jump in and start talking about how we'll structure the app!

Episode discussion

No comments, yet. Be the first!