Teaching PHP

GlasgowPHP April 2016

By Thomas Dutrion / @tdutrion - 12/04/2016

About me

  • Founder & Developer / web architect at Engineor
  • Working with PHP since 2003
  • Doing my best to work properly!
Photo Thomas Dutrion Engineor Logo Zend Framework 2 Certified Architect

About me

Edinburgh Napier University Logo
  • Part time lecturer at Edinburgh Napier University

Disclaimer

  • Feedback and questions on my own experiences
  • A personal learning experience
  • Not against Edinburgh Napier University (or any other university) teaching stategies
  • Nothing personal against anyone, again just an attempt to move forward

Your background

  • Who considers himself or herself as self taught?
  • Who has a computing science degree?
    (even if you consider yourself as self-taught)

My educational background

  • DUT informatique (Université Pierre Mendès France - 2nd year)
  • BSc computing (Edinburgh Napier University - 3rd year)
  • MSCi computing (Edinburgh Napier University - 5th year)
Picture of my MSCi graduation ceremony

My French experience

  • Lots of mathematics
  • Lots of lectures / practicals hours (40 hours a week)
  • Very theoretical
  • Not even university, supposed to be practical learning...

My Scottish experience

  • Project based learning
  • Lectures and practicals only 12 hours a week
  • Plenty of time to learn on my own
  • Not much to learn in class, already knew most of it

Am I never satisfied?

I'm French after all...

My current situation

  • Teaching an hour of lecture a week, a senior lecturer teaches the second hour
  • Module including HTML, CSS, Javascript/jQuery and PHP
  • More than 100 second year students with various backgrounds and knowledge
  • 13 weeks of teaching
  • A PHP 5.6 server, students connecting with WinSCP and editing using something similar to Notepad.

PHP topics (already covered)

Subject Students reactions
Introduction to PHP
Create a simple website (use PHP for templating)
Forms, cookies and sessions
PHP and databases (mysqli and PDO)
Database migrations (phinx) and professional practices (GIT, PSRs, jobs and certifications...)
CMS

PHP topics (to come)

Subject Student reactions
Frameworks
Security
Code quality
Web standards

Problems

  • Command line is considered as too complex
  • Willingness not to use libraries/framework
  • Tasks only include reading from a database

Basically teaching PHP 3 using 5.6 components!

What should we teach?

Subject Importance
Basics +++
Frameworks +++
CMS -
Command line interface and cron +
Deployment and cloud +
Security +++
IDEs and advanced text editor ++
Versioning +++

Free resources

(that we do not use)

Professional certifications

A good source to establish a good program?

Too advanced?

Professional training

Example: Zend training

Title Duration (hours) Requirement
PHP 1: foundations 20
PHP 2: higher structures 22.5 Knowing the basics (PHP 1 or equivalent)
PHP for Experienced (non PHP) OO/Procedural Programmers 16 Being a programmer in C, Java, C++, C#, JavaScript, Python, Perl, Ruby, VB.net for 2 years
Building Security into your PHP Applications 8 Basic to advanced knowledge of PHP 5 is recommended including experience developing PHP 5 applications.

A total of 52.5 hours to get from 0 to a supposedly good PHP developer.

From Napier modules website
Mode of activity Learning & Teaching Activity NESH (Study Hours)
Face To Face Lecture 24
Face To Face Practical classes and workshops 24
Independent Learning Guided independent study 152
Total Study Hours 200

Moving forward

  • Focus on basics or teach current technologies?
  • Teach concepts instead of syntax?
  • How to update lecturers knowledge and skills, how to get them involved?

So, what to do?

Prerequisites?

From students:

  • Use an operating system: file browsing, text editing...
  • (Command line interface and basics of using Linux CLI?)
  • Willingness to learn!

From institutions:

  • Up to date servers
  • IDEs or complex text editor (at least syntax coloration)
  • Up to date knowledge (no md5 for passwords as seen in lectures...)

Introduction

  • HTML / CSS
  • Frontend Javascript (VanillaJS and jQuery)
  • – HTTP basics: simple request diagram? –
  • Show some simple code (templating)
  • Tools (IDE, advanced text editor, command line tools?)

Getting to know PHP

  • Simple multipage website (using array as data source?)
  • Forms
  • Sessions and cookies
  • Database (only Mysql? ORMs should be there? migrations?)

Advanced (?) PHP

Are frameworks an advanced notion? Why can we teach ASP.NET MVC straight without learning C# in a REPL first?

Is that a good place to discuss PHP-FIG and code standards?

Where should extra resources be discussed? Too late for GIT at this stage isn't it? But composer rely on GIT...

Security

Zend: security is the responsibility of every developer

Should it even be a lecture?

Auroraeosrose: security is not a feature

Suggestion from DundeePHP: study selected existing code, legacy applications (real world use cases)

Thanks for having me (again)!

Please continue the discussion here, on Slack (slack.scotlandphp.co.uk) or ping me on Twitter (@tdutrion).