This five-day advanced-level course is designed to follow on from the “Web Development Fundamentals - PHP” course to introduce the idea of PHP MVC frameworks and RESTful services.
The course is designed to be framework-agnostic and takes you through:
- Setting up an MVC framework on an Apache/MySQL (or MariaDB)/PHP stack
- Examining how to create Views to display data
- Creating Controllers to control what data is displayed
- Constructing and using Models that with an SQL database to supply data
- Security of data
- The use of PHPUnit for unit and test-driven development.
The final part of the course discusses how this technology stack can be used to create a RESTful service to supply data to remote request points.
The course is delivered through a series of workshops based around agile-style user stories and a collaborative project which threads through the 5 days.
This course is appropriate for anyone who has a reasonable amount of web development experience, including some PHP exposure and is looking to extend their skills into full-stack PHP development and/or PHP as part of a backend service. It may be of particular interest to those looking for a grounding in PHP-MVC before learning a framework like Zend or Laravel.
- Delegates MUST have HTML and CSS skills equivalent to those provided by the Web Development Fundamentals – HTML and CSS course.
- Delegates MUST have PHP skills equivalent to those provided by the Web Development Fundamentals – PHP course.
At the end of this course you will be able to:
- Create and use PHP Views, Controllers and Models
- Creating and querying an SQL database using PHP
- Create and authenticate sessions in PHP
- Use PHPUnit to perform unit tests and test-driven development
- Use PHP to deliver endpoint data as a RESTful
Workshop 1 – Creating Views
Creating VIEWs using PHP for a web application:
- Using a design principle called Model-View-Controller (MVC)
- Using some of the ideas presented by Agile software development methodology
- Through mixing PHP and HTML code
Workshop 2 – HTML Forms and Security
Creating secure forms for a user to submit:
- Using a HTML elements and HTTPS requests
- Using techniques to validate and sanitise the data
Workshop 3 – Objects, Models and Databases
Using PHP and SQL to interact with a database safely:
- Using appropriate Object Oriented PHP
- Using safe querying techniques
- Using security measures to use passwords securely
Workshop 4 - Controllers
Routing users to the correct page depending on session data
Workshop 5 – Sessions and Authentication
Managing cookies and sessions to help with the security of PHP applications
Workshop 6 - Testing using PHPUnit
Use PHPUnit to test code including:
- Setting up PHPUnit to run unit tests
- Writing some simple tests in PHPUnit
- Testing objects in PHPUnit
- Testing databases in PHPUnit with DBUnit
Workshop 7 – Building a RESTful service in PHP
Understanding what RESTful and Micro services are, including:
- Understanding how other applications consume these services
- Creating a RESTful service using PHP