Introduction to PHP MVC with CakePHP

An introduction to building a PHP MVC website using the CakePHP Framework. The course includes installing and setting up your environment and walks you through the process of creating a functional web application.
Course info
Rating
(195)
Level
Intermediate
Updated
Nov 26, 2013
Duration
3h 59m
Table of contents
Introduction to PHP MVC
Installation of CakePHP
Getting Started
CakePHP Controllers
CakePHP Models
CakePHP Views
CakePHP Authentication
Description
Course info
Rating
(195)
Level
Intermediate
Updated
Nov 26, 2013
Duration
3h 59m
Description

An introduction to building a PHP MVC website using the CakePHP Framework. The course includes installing and setting up your environment and walks you through the process of creating a functional web application.

About the author
About the author

Jill is a freelance software developer who works on all things technical and loves it.

More from the author
PHP Fundamentals
Beginner
5h 8m
Feb 11, 2019
PHP Predefined Variables
Intermediate
1h 23m
Oct 5, 2017
Basic HTML for Kids
Beginner
1h 9m
Jul 30, 2014
Section Introduction Transcripts
Section Introduction Transcripts

Introduction to PHP MVC
Hi, this is Jill Gunderson, and welcome to my course, Introduction to PHP MVC with CakePHP. This course is designed to introduce you to the MVC framework built on the PHP programming language, using the popular framework, CakePHP.

Installation of CakePHP
This is Jill Gunderson, and in this module I'll walk you through the installation of CakePHP. CakePHP can be run on any operating system, in the following videos I'll show you how to install it on a Linux, and Windows, with different variations. When installing CakePHP we need to remember the requirements that are needed to run it. First we need to have a PHP version of 5. 2. 8 or higher. we'll need to have a database, and any of the following will work, I'll be using MySQL. And you'll also need access to some sort of a web server, either Apache or IIS.

Getting Started
This is Jill Gunderson, and before we start coding in our CakePHP framework we're going to take a look at the folder structure of CakePHP, including those folders where we will be putting our newly created code. We will also discuss the CakePHP rules for naming all areas of the developers code, which include files, classes, and functions.

CakePHP Views
This is Jill Gunderson, and in this module we will cover the Views in the CakePHP MVC framework. This is the best part of the MVC framework because this is when your website really comes to life. The Views are the presentation layer, when the request comes in the View is what is returned to the user displaying the desired information requested. The View usually consists of HTML code, but on occasion you might need something different. CakePHP provides the ability to return Views in different formats, such as XML, JSON, RSS, and Files including Streaming Files. CakePHP template files are written in plain PHP, and have a special ending of. ctp, we are already familiar with this ending as we've used it in a few of the Views for our Catalog website. CakePHP also supports other templating languages, such as Smarty or Twig. Now the View layer is broken up into four parts, there's the Layout, which is the main Layout for the website, the Views, which displays a unique response based on the action being run, the Elements which is reusable code rendered inside of a View, and the Helpers, which provide some view logic and helps build code for forms, pagination, etc. In this module we will cover each of the four parts of the View layer in more detail.

CakePHP Authentication
Hi this is Jill Gunderson, and in this module we're going to touch upon Authentication for our CakePHP website. We don't just want any user to be able to edit our sites content, we also want to be able to limit the access to certain URLs based upon if a user is logged in or not. For CakePHP Authentication is identifying a user from the provided information, such as their username and password. Now there's three types of Authentication in CakePHP, FormAuthenticate, which is based on form post data, we have BasicAuthenticate which is the basic HTTP authentication, and DigestAuthenticate which is from the digest HTTP authentication. CakePHP's default Authentication is the form authenticate, and that's the one we're going to use in our module.