Here are the sections and lessons of the course.

Getting ready

Prepares students to take the course. Introduces the tools used, including the course site.

  • What you'll learn. What students will know and be able to do by the end of the course. Link to sample app. Why these things? What are the limits?
  • About me
  • Using this site
  • Exercises. Exercise: about you
  • Let's talk - how to communicate with each other.
  • Buy hosting. cPanel.
  • Software to get. XAMPP, PhpStorm, Xnview, Ditto, Mac alternatives.
  • Let's go!

How web apps work

  • Clients and servers. Browsers, HTML, CSS. Data from servers. Files and URLs.
  • PHP. Makes HTML.
  • Databases.
  • Other bits and pieces. JS.
  • Subdomains and URLs. Exercise: files on a subdomain.
  • Your local setup. Run XAMPP as admin, setting a port, add files to htdocs. Exercise: screenshot of browser accessing given URL at localhost.
  • PHPStorm projects.
  • Uploading files with cPanel. Exercise: upload given HTML, and image. Same as previous, but on real system.
  • Uploading files with FTP

Making HTML

  • Page template
  • A few tags. Exercise.
  • Simple styling. Basic CSS. Styles in stylesheets. Exercise.
  • Images in folders. Exercise.
  • PHP makes HTML. Introduce functions. Exercise: show date and time.
  • GETting data. Sending data through a URL into variables. Exercise: show name or something
  • Computing with numbers. Operations on variables. Functions. Exercise.
  • Computing with strings. Operations. Functions. Exercise.
  • If. Conditional expressions. Operations. Exercise: conditional output.
  • Booleans. Make ifs easier. Other uses.
  • Validation. Exer: one field validation. Show error message.
  • Multifield validation. Error message as flag.
  • Validation functions. Return error messages.
  • Code library. require_once.
  • Page component library.
  • Exercises.

Audit log files

  • Goal: track stuff.
  • File path vs. URL path.
  • Append to log file. Exercise.
  • Show log file. Exercise.
  • Erase log file. Exercise.
  • Your code library. Add log functions. Exercise.
  • Exercises.

Databases and business entities

  • Make a database. phpMyAdmin. Make a user. Exercise.
  • Make a table. Field types (not the same as PHP). Primary key. phpMyAdmin. Exercise: make a table, add some records.
  • SELECTing data. * from table. Specify fields. Conditions. Exercise: selects and results.
  • PHP SELECTs a row. Connect to DB. Run a SELECT. Output results. Exercise.
  • Id from GET. Sanitize. Exercise. Pattern: view record.
  • 1:N relationships. Foreign keys. Add to SELECT, often specify fields. (Use AND not JOIN). With conditions.
  • M:N relationships. Add to SELECT. With conditions.
  • Hide connection data. Make ini file outside web root. Function makes connection. Exercise.
  • Business entities. Goal: simplify code. Abstract business logic. Renderer classes.
  • Classes, objects, setters, and getters. Load. No validation. Simple renderer.
  • Example: happiest quoakka, compare two of them, using getters and setters.
  • Validation: Setter error strings.
  • Pattern: view record set. (Sets goal of next few lessons.) Run SQL that gets a record set, loop over them, output a summary of the data, with links to view records.
  • Record loop. ul/li. Adding record view links. Exercise.
  • Table tag.
  • Summary data.
  • Exercises

Capturing data

  • CRUD pattern. What UIs look like.
  • DELETE query. Value from GET. SQL. Confirmation. Exercise.
  • INSERT query.  Make a new record from get data. Exercise. Show its new id.
  • Forms. Exercise: just getting data from form and showing it.
  • Rendering form fields. Add to renderer.
  • Saving form data. Add methods to classes (entity and renderers).
  • Validation. Error string accumulation.
  • One page for validation and insert. Pattern.
  • Adding UPDATE.

Front-end magic

  • Bootstrap
  • A griddy template
  • BS classes
  • Header region
  • Sidebar region
  • Exercises

User accounts

  • Users, roles, and permissions.
  • A USER table. Encrypted password.
  • User and user renderer classes.
  • A user report.
  • CRUDing users.
  • Checking permissions.
  • Exercises