This is the P2PU Archive. If you want the current site, go to www.p2pu.org!

Introduction to PHP

Syllabus for Introduction to PHP

Matthew Buscemi's picture
Mon, 2010-12-20 04:10

Texts, Tools and References

Weekly Assignments

For each week, prepare the following for the class meeting:

  1. Read all the readings listed for that week on the syllabus. If you have any questions about the readings, post them to the course forum.
  2. Do any assignments listed for that week. These will be posted progressively as the course proceeds.
  3. Every week there will be a vote. Your vote is private. You should email it to the course coordinator before the weekly meeting. The votes count towards various class awards. You may vote for any course participant other than yourself and the course coordinator.
    1. Choose the person who was most helpful for your learning this week.
    2. Choose the person who made the most creative assignment for the previous week (Week 3+).

Class Awards

  • Most Helpful
  • Most Creative Assignment Developer
  • Most Active Forum Contributer

Vote totals will be posted on the course forums weekly.

Week 1: Introduction to Web Programming with PHP

We will begin by introducing ourselves, finding out what goals we have, in terms of personal development and career, why we want to learn PHP, and what draws us to web programming. We will also begin with a discussion of our previous experiences with programming, using HTML and CSS, and also other languages. We will also briefly talk about the PHP Manual and the Codepad application.

Readings:
 PHP Manual: “What is PHP?”
  http://www.php.net/manual/en/intro-whatis.php
 PHP Manual: “What Can PHP Do?”
  http://www.php.net/manual/en/intro-whatcando.php

Week 2: Letters and Numbers

We will discuss how to integrate PHP code into HTML code, what PHP variables are and how to define them, different variable types, mathematical operators, strings, string concatenation and comments.

Readings:
 PHP Manual: “Escaping from HTML”
  http://www.php.net/manual/en/language.basic-syntax.phpmode.php
 PHP Manual: “Variable Basics”
  http://www.php.net/manual/en/language.variables.basics.php
 PHP Manual: “Introduction to Types”
  http://www.php.net/manual/en/language.types.intro.php
 PHP Manual: “Arithmetic Operators”
  http://www.php.net/manual/en/language.operators.arithmetic.php
 PHP Manual: “String Operators”
  http://www.php.net/manual/en/language.operators.string.php
 PHP Manual: “Comments”
  http://www.php.net/manual/en/language.basic-syntax.comments.php

Week 3: Taking Control of your Code

We will discuss some basic control structures, including the for loop, and the if-elseif-else construct, and an extended discussion about logical operators and their use in the if-elseif-else construct.

During this week, we will have our first discussion about the final project, and we will brainstorm ideas for the final project. I will provide a list of potential project ideas.

Readings:
 PHP Manual: “If Statements”
  http://www.php.net/manual/en/control-structures.if.php
 PHP Manual: “Comparison Operators”
  http://www.php.net/manual/en/language.operators.comparison.php
 PHP Manual: “Else Statments”
  http://www.php.net/manual/en/control-structures.else.php
 PHP Manual: “Elseif Statements”
  http://www.php.net/manual/en/control-structures.elseif.php
 PHP Manual: “Logical Operators”
  http://www.php.net/manual/en/language.operators.logical.php
 PHP Manual: “For Loops”
  http://www.php.net/manual/en/control-structures.for.php

Week 4: A Wide Array of Choices

We will discuss arrays, how to create them, and their component parts: keys and values. We will also discuss multi-dimensional arrays and will examine a number of PHP's bevy of built-in array functions.

Readings:
 PHP Manual: “Arrays”
  http://www.php.net/manual/en/language.types.array.php

Week 5: The More Volatile Side of Taking Control

We will discuss some of PHP's more volatile control structures, including the while loop, the do-while loop, the foreach (which will be a nice refresher on arrays) and the switch statement. (Author's note: The "volatile" classification is strictly my own invention. I got booted from my first hosted webspace provider by accidentally misusing while loops.)

Also, during this week, I will finalize the group members for the final project, and groups will submit their project proposal.

Readings:
 PHP Manual: “While Loops”
  http://www.php.net/manual/en/control-structures.while.php
 PHP Manual: “Do-While Loops”
  http://www.php.net/manual/en/control-structures.do.while.php
 PHP Manual: “Foreach Loops”
  http://www.php.net/manual/en/control-structures.foreach.php
 PHP Manual: “Switch Statements”
  http://www.php.net/manual/en/control-structures.switch.php

Week 6: Conjunction Junction, What's My Function?

We will discuss PHP functions, and how to use them to organize your code. We will also discuss their practical benefits, both for you, the programmer, and your web server as well.

Project proposals will be returned.

Readings:
 PHP Manual: “User-Defined Functions”
  http://www.php.net/manual/en/functions.user-defined.php
 PHP Manual: “Function Arguments"
  http://www.php.net/manual/en/functions.arguments.php
 PHP Manual: “Returning Values”
  http://www.php.net/manual/en/functions.returning-values.php

Week 7: Don't Get or Post when a Simple Request Will Do

We will discuss ways in which one page can "transfer" data to another via GET or POST variables. We will also discuss some of the basic principles of web security when working with such variables.

Readings:
 PHP Manual: “Superglobals”
  http://www.php.net/manual/en/language.variables.superglobals.php
 PHP Manual: “$_GET”
  http://www.php.net/manual/en/reserved.variables.get.php
 PHP Manual: “$_POST”
  http://www.php.net/manual/en/reserved.variables.post.php
 PHP Manual: “$_REQUEST”
  http://www.php.net/manual/en/reserved.variables.request.php
 SitePoint Article: “PHP Security Blunders” -- Read only the section titled “Unvalidated Input Errors”*
  http://articles.sitepoint.com/article/php-security-blunders

*Feel free to read the rest of the article. It’s quite good and has a lot of useful information to know consider when programing for security. But, we’ll only be discussing the one section in class.

Week 8: Cookie, Cookie, Cookie Starts with C

We will discuss how to use cookie and session variables, where they get stored, and how to ensure security when using them.

Readings:
 PHP Manual: “Introduction to Sessions”
  http://www.php.net/manual/en/intro.session.php
 PHP Manual: “Registering Session Variables”
  http://www.php.net/manual/en/session.examples.basic.php
 PHP Manual: “Cookies”
  http://www.php.net/manual/en/features.cookies.php
 PHP Manual: “setcookie()”
  http://www.php.net/manual/en/function.setcookie.php
 SitePoint Article: “PHP Security Blunders” -- Read only the section titled “Session ID Protection”
  http://articles.sitepoint.com/article/php-security-blunders

Week 9: Group Project Individual Conferences

During this week, in lieu of an actual class meeting, I will instead have extended office hours, during which groups can meet with me to discuss their final projects and address any concerns they might have.

Week 10: Group Project Presentations

Groups will present their projects to the class. Each group should prepare to talk about what they learned from the project, and what particular challenges they encountered when building it.

Comments

This is an intense yet very

maddox bayer's picture
maddox bayer
Thu, 2011-01-20 06:46

This is an intense yet very interesting syllabus, well structured

agreed! the course really

patrick collins's picture
patrick collins
Fri, 2011-01-21 17:06

agreed! the course really seems thorough and comprehensive. obviously a lot of work went into the preparation of it. looking forward to participating!

i agree, looks very

Gonçalo Valério's picture
Gonçalo Valério
Fri, 2011-01-21 21:01

i agree, looks very interesting.

"Week 6: Conjunction

Michelle Chinese's picture
Michelle Chinese
Sat, 2011-01-22 21:22

"Week 6: Conjunction Junction, What's My Function?"

Ahahahahhaaha

My thoughts exactly. Seems

Jay Cassano's picture
Jay Cassano
Sun, 2011-01-23 00:07

My thoughts exactly. Seems very well thought out and systematic. Looks exciting.

Ditto!

Kristin Robinson's picture
Kristin Robinson
Tue, 2011-01-25 00:00

Ditto!

I am really looking forward

Jay Henderson's picture
Jay Henderson
Tue, 2011-01-25 00:54

I am really looking forward to this course, will be posting each and every week to my blog on EVERY course that I am involved in!

when will we start?

Ahmed Abdel Razzak's picture
Ahmed Abdel Razzak
Thu, 2011-02-10 11:37

when will we start?

How do I join?

Dan Fris's picture
Dan Fris
Tue, 2011-03-22 18:22

How do I join?