O'Reilly logo

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Object Oriented PHP and MVC

Video Description

Build a custom object-oriented PHP MVC framework and then build an application with it

About This Video

  • People wanting to learn advanced OOP PHP and MVC (Model View Controller)
  • This course offers high quality, practical and relevant content.

In Detail

In this course, we will go step by step to build a complete custom MVC (Model View Controller) framework Called TraversyMVC using object-oriented PHP. We will build something similar to Codeigniter but much much lighter. This framework is a completely open source and you are free to change the name, add stuff, etc and use it as your own. This framework will include. A core library class to load controllers & methods from the URL (Also using .htaccess)

A base controller class to load models and views

A custom database library using PDO for all models to interact with the database using prepared statements.

Not only will we create the framework but we will build an application on top of it called SharePosts which will be somewhat of a social network to share posts. This application will include: Full user authentication, Access control for posts, Server-side form validation

Bootstrap 4 UI, Posts CRUD, Helper functions (flash messaging & redirects).

We will also be deploying the application to the Internet

Table of Contents

  1. Chapter 1 : Course Intro & Setup
    1. Welcome To the Course 00:06:12
    2. Project Files & Questions 00:01:00
    3. XAMPP Environment Setup 00:08:32
  2. Chapter 2 : Intro to OOP PHP
    1. About This Section 00:01:10
    2. What Is OOP? 00:05:48
    3. Classes, Properties & Methods 00:09:45
    4. The Constructor & Destructor 00:10:39
    5. Access Modifiers, Getters & Setters 00:09:18
    6. Class Inheritance 00:06:51
    7. Static Methods & Properties 00:06:00
  3. Chapter 3 : The Framework [Part 1] - The Core
    1. What Is MVC? 00:04:31
    2. Workflow Explanation 00:07:55
    3. Creating the Folder Structure 00:08:36
    4. Direct Everything Through index.php 00:07:07
    5. Bootstrap File & Core Class 00:10:43
    6. Loading the Controller from the URL 00:12:01
    7. Mapping Methods & Parameters 00:07:56
  4. Chapter 4 : The Framework [Part 2] - MVC Workflow
    1. Base Controller Class 00:07:14
    2. Loading Views 00:06:11
    3. Config File & Uploader 00:07:46
    4. Header & Footer Includes 00:06:31
    5. Aside - PDO Crash Course 00:17:59
    6. The Database Class - Part 1 00:12:52
    7. The Database Class - Part 2 00:16:03
    8. Clean Up 00:05:25
  5. Chapter 5 : The App [1] - Setup & User Authentication
    1. Initial App & Database Setup 00:05:38
    2. Pages, Bootstrap & Navbar 00:12:52
    3. Creating the Users Controller 00:08:51
    4. Register & Login Form Views 00:11:38
    5. Form Validation 00:13:49
    6. User Model & Email Check 00:07:59
    7. User Registration 00:06:25
    8. Custom Flash Messaging 00:15:30
    9. User Login 00:09:26
    10. User Session Data & Logout 00:08:34
  6. Chapter 6 : The App [2] - Posts Functionality
    1. Posts Controller 00:06:53
    2. Posts Access Control 00:04:58
    3. Post Model & Display 00:12:40
    4. Add Post Form 00:08:40
    5. Inserting Posts 00:13:07
    6. Post Show Details Page 00:13:37
    7. Editing Posts 00:09:38
    8. Deleting Posts 00:07:03
  7. Chapter 7 : App Deployment
    1. Deploying Our App 00:12:45