View Full Version : Teaching a new PHP class. What do you think???
01-09-2004, 12:53 PM
The Tech college I graduated from has asked me to teach their new PHP course this semester. It's the first time they're offering the course, and I get to pretty much develop the entire thing. Which is really cool. But I'm not quite sure what topics to cover.
Here's some background on the course.
Prerequisites: Advanced HTML (XHTML and CSS basically)
4 Credit course (64 classroom hours)
Goal: Once students complete the course, they should be able to set up and manage a small - mid-sized php/mySQL web site.
Below is what I'm thinking of covering....
Tentative Course Overview (subject to change)
Topics: Announcements and house keeping, Introduction to puTTY, Introduction to Secure FTP, XHTML Review
Homework: Assignment 1
Topics: XHTML Review continued. CSS Review. Web design – separating content from presentation. Accessibility and Section 508 compliance. What is PHP?
Homework: Assignment 2
Topics: PHP commands. PHP variables, arrays, and associative arrays. Logical programming structures. Functions
Homework: Assignment 3
Quiz: Quiz 1
Topics: Super globals. Processing form data. Sessions. Include files.
Homework: Assignment 4
Topics: Reading and writing files using PHP. Uploading files to a web server using PHP. Overview of file permissions in Linux.
Homework: Assignment 5
Quiz: Quiz 2
Exam: Exam 1
Topics: Overview of SQL commands. Insert, Update, Select, and Delete SQL commands. Create MySQL database. Create MySQL Tables.
Homework: Assignment 6
Topics: Using PHP to connect to a MySQL database. PHPs integrated MySQL functions. Querying MySQL and displaying results on a web page.
Homework: Assignment 7
Topics: Creating login scripts. Verifying credentials using MySQL and PHP
Homework: Assignment 8
Quiz: Quiz 3
Topics: MySQL and SQL Review. Sending Email notifications.
Homework: Assignment 9
Exam: Exam 2
Topics: Parsing XML. Reading RSS Newsfeeds.
Homework: Assignment 10
Topics: Regular Expressions. Debugging PHP Programs. Error Suppression.
Homework: Assignment 11
Topics: Integrating existing PHP scripts with a web site. Special runtime configuration using ini_set().
Homework: Assignment 12
Quiz: Quiz 4
Topics: Review. Other topics as needed or requested.
Homework: None, study for the final
Exam: FINAL EXAM – Have a great summer!
My question to all you PHP gurus is, if you were taking an introduction to PHP course, what would you like to learn??? Did I miss anything obvious in this plan?
Thanks for your help, you're shaping the minds of the next generation! :thumbsup:
01-09-2004, 02:17 PM
you might wanna throw in using .htaccess to change PHP configs when u do the ini_Set bit.
What sort of homework assignments do you have planned, and are you planning to make them all install a local testing server in order to do the homeworks?
I'd also spend a little more time on arrays - there's lots of funtions that come in handy when manipluatings so it would proably worth revisiting after the superglobals lesson to demonstrate the functions.
Also handy would be overview of date and string functions, as these are widely used throughout all php scripts - this could be included in the sections on file manipluation, database data processing and the RegExp bit.
and as a side note, whats puTTY? and how does secure FTP factor into this course?
01-09-2004, 03:10 PM
I am actually enrolled in a 3 hour PHP course at my university for the upcoming semester. I do however have experience in PHP so im not a newbie. I would also recommend using .htaccess to adjust settings. I think one of the biggest questions are what will the HW assignments be. No matter what you lecture about whats going to matter in regards to learning is actually doing. The HW projects you assign will be the true experience your students will learn from.
01-09-2004, 04:38 PM
First, I think these guys should already know how to use FTP. If they don't, let them learn it on their own.
PuTTY (http://www.chiark.greenend.org.uk/~sgtatham/putty/), is a telnet/ssh freeware app. It's spiffy, but I don't think it should be used as a main feature in an educational program.
You may also wish to move some of the debugging features further up. Advanced debugging might be good, but they need to learn the easy ways of fixing "array index out of bounds" "parse error" and the "T_Exception" whatever stuff.
Are you approaching this via procedural, or OOP? Being a 4-credit hour course, I'd expect some OOP.
Do you have a text book? A *great* beginner book is Visual Php - visual blueprint for... (http://www.amazon.com/exec/obidos/tg/detail/-/0764535617/qid=1073665114//ref=sr_8_xs_ap_i2_xgl14/002-3336347-6607254?v=glance&s=books&n=507846)
You could also check out amazon. I'm not sure what would be good for a textbook, however. I would think you'd want to use a text that has a great reference section, as well.
I think it's great that you're teaching a class! I just realized that most of my comments could come across as negative, and I didn't mean them to be! My apologies. I'm only hoping to give constructive ideas!
Homework could be an issue as well! Especially if they don't have a computer at home, and there isn't somewhere set up at the school with access to a webserver/development box(es). Will you be teaching them using PWS, IIS, Apache or some other webserver?
What is the course description? Is it something simple like "An Introduction to PHP" ?
And though you could probably take up an entire semester on this one topic alone, I'd suggest covering proper coding format, including comments. When you start getting assignments turned in to you that have ZERO comments, should be 100 lines (including whitespace), but have fit everything into 46 lines, and don't have a clue how to debug because curly braces and parenthesis aren't used properly or effectively, well..... you'll see the need. ;)
In that respect, you *could* point them towards http://astyle.sourceforge.net/, but that might be one of those links you save until the end of the semester....teach them correctly the first time. Undoubtedly, the PEAR standards (http://pear.php.net/manual/en/standards.php) for coding will be your best starting point.
Code documentation is not stressed NEARLY enough. One of the great things about coding is reusability, but I can't tell you how many scripts I've wanted to use that weren't documented well enough so I gave up and wrote my own, or scripts I wrote 3 years ago that I could only use because I had good comments. Stress it. ;)
Other than that...:thumbsup: :cool:
01-09-2004, 04:47 PM
Another good read (http://www.devshed.com/c/a/Practices/Writing-Quality-Software-A-Primer/)
01-09-2004, 05:02 PM
Being a link junkie... ;)....
PHPBuilder - Debugging (http://www.phpbuilder.com/columns/starkey20021020.php3)
PHPBuilder - Sloppy Software (http://www.phpbuilder.com/columns/perdue20030310.php3)
PHPBuilder - Best Practices: PHP Coding Style (http://www.phpbuilder.com/columns/tim20010101.php3)
PHPBuilder - Class documentation (http://www.phpbuilder.com/columns/stefano20000824.php3)
Keep in mind that these resources might just be good for you to read before you teach the class, not necessarily give to the students. I like to back and re-read those articles every few months to make sure I'm still doing things correctly ;)
You may want to offer the students a kind of "cheat sheet" with good online resources (plug: CodingForums.com (http://www.codingforums.com),) PHPBuilder (http://www.phpbuilder.com), DevShed (http://www.devshed.com), PHP.net (http://www.php.net) (the manual is great!).
I probably wouldn't give them out until AFTER the course...lol. I'd hate to find that many of us are doing your student's homework...YIKES! lol.
01-09-2004, 05:07 PM
Another great thread: http://www.codingforums.com/showthread.php?s=&threadid=31183
That's another thing I was trying to remember- are you going to be developing on windows, unix, or other? PHPDev is probably going to be a godsend for many of your students and their "at-home" development. Heh. Make a cd. And charge them. MUA AHHAHAHA...er.....bad idea. never mind that.
01-09-2004, 06:27 PM
bcarl, first of all congratulations that you got this teaching job. If you enjoy to explain to people, and like to see that lightbulb going on over someone's head, it can be a very rewarding experience.
I have one suggestion which I find very important to include in the syllabus: Basic client-server workflow principle. Many people know how to build a web page with HTML, CSS etc., and yet when they want to process their form with the first self-made PHP script, and they don't know the difference between GET and POST, they may be into trouble... I have given seminars myself, and it helps immensely if people understand the underlying foundations of web applications... namely HTTP.
Show them what a HTTP request/response is. Explain the differences and implications of using POST vs. GET. Explain what a query string. Explain what url encoding is. A valuable tool is LiveHTTPHeaders (http://livehttpheaders.mozdev.org/), a plugin for Mozilla that lets you capture HTTP communication and display it. Such a topic should come quite early, before form processing and super globals.
Another tip: Don't cram too much into your lectures. I've made the experience that it's much to easy to build up detailed plans, only to see them get halfway through, because the pace was to fast for some students. But I se you've left enough room for review sessions, that should be sufficient.
And another point: Arrays are double important in PHP, you should pay extra attention to them and see that your students really grasp them. They are, after all, a little bit weird. Getting your head around the key->value concept with numerical indices and string keys is something I've seen students need to think about for a long while.
And again: Show them how to use the manual. PHP isn't as great as a language if you don't where you go looking for your questions. Show them how search, read and interpret the manual and the bug database. Show some sample code from user comments.
Anyway, let us know how the students fare! And point them to codingforums.com in the unlikely case that you couldn't answer a question. :D
01-09-2004, 06:28 PM
Thanks for the input. As far as the puTTY and Secure ftp, I've got a Linux server that the students will be logging into, but the admin does not allow regular FTP accounts because they are too insecure and passwords can be sniffed. I'm going to be using a program called WinSCP to have the students transfer the files. Which is a little different than regular WSFTP. As far as putty, again, central linux server, I want them to learn how to connect to a linux box. They're going to be on WinXP boxes, so puTTY is the best option here.
.htaccess. Great idea, I hadn't thought of that one. I'll probably include it in with the file permissions and login scripts lectures.
As far as home work, I'm not too sure on this one. I'm hoping to make them challenging yet realistic. We'll see.
Ideally all the labs / homeworks will involve building on the previous concepts, so as we go more and more topics on arrays, hashes and the like will be introduced.
As far as OOP, I think that's up to the students. They have an OOP / UML (using java) course at the college, and beyond making a "Hello World" version of an OOP program, I think I'm going to leave that up to the other class. To me the important thing is syntax. Programming style is beyond the scope (as far as OOP is concerned) of this course.
I was thinking of burning Apache, mySQL, and PHP disks for the students along with some other goodies (WinGIMP, TextPad, etc...) but PHPDev isn't a bad idea.
Thanks for the links. My primary goal (not on the syllabus) is to teach the student how to find the answers themselves. So lots of reference materials will be given out. I'll have to look into the links in this thread.
Thanks for the replies. Keep 'em coming.
01-09-2004, 09:48 PM
Wish they had a class around me like that. I would take it in a heartbeat. Beat lame ole' tutorials on the web.
01-09-2004, 11:14 PM
Personally i find i've learnt much more from the web than i ever have in school (re: coding that is)
The web just has so many resources that you can learn to do amost anything if you kno where to look. I'm glad to see this is the approach you are taking to teaching PHP. (side note: cant seem to find a good tutorial with diagrams on how to do that really loud taxi hail whistle ppl do with their fingers)
And re: the PEAR coding standards, i dont follow these per se, but i do try to make my code as neat as possbile - but i dont like putting my parenthesis on a new line for function and class defs, anyone know why this is the spec?
01-10-2004, 07:29 AM
J4tR (just 4 the record),
I've never coded entirely to the PEAR spec. I'm not really positive I've managed to read all the way through it, to be honest. What I *have* done however, is like you said ReadMe.txt: tried to keep my code as neat as possible.
Coding to a standard like PEAR just ain't easy. Many people just plain don't like the style. Which is fine. But the guidelines are good to follow, and it definitely gives a developer something to use when unsure about spacing, indentation, etc.
Keep your own style, but keep it neat!
It think week 4 contains to much.
processing formdata alone would be enough to fill a session (certainly if you include using multi-purpose pages, which i think is a must).
Any coding course should, in my opinion, also contain a section on creating a functional and technical design. Which is what most coders have the least knowledge of.
Everyone can learn using SQL, functions, ftp from a book/site.
So even if this is not the main object of your course, i would do a session on functional and technical designs at the start of your course, and have the student draw out these design for an application they would like to build.
And then each week, use one of the students design to illustrate your topic of the week --> where is it used, why is it important, how does it influence other processes.
Just my opinion.
01-10-2004, 03:14 PM
You mean to basically have the students draw up a game plan as to how to accomplish their goal and perhaps use some pseudocode?
01-10-2004, 08:20 PM
Thanks again for the replies.
Although they are not specifically listed in the course outline, I do plan on introducing topics related to programming style, commenting code, designing programs and such and it will be strongly emphasized, however the primary goal of this course, in my mind, is to have the graduating students be able to create a simple php application and to know where to get the answers if they don't know how to do something.
Mordred, I do plan on emphasizing the client server concept. I really glad that we aren't setting up a local development environment with php, apache, and mySQL all on the same computer. That makes it much more difficult to explain the concept to people when the same computer is both a client and a server.
Oh, btw, the current course description is here (http://126.96.36.199/htc/FMPro?-db=wsyllabi.fp5&-format=record%5fdetail.htm&-lay=general&-sortfield=course%20title%20long&-op=eq&programtitle=Computer%20Careers&-recid=12733735&-find=)
Basically, they did a global search and replace on the PERL description with PHP.
01-11-2004, 02:51 AM
Originally posted by bcarl314
Teaching a new PHP class. What do you think???
/me just a whispers® to bca...
you knowww how /me isnt just a programmed® to 'think'...'cept...ya mighhht want to just a browse® thru andy bowers tutorials just a here®...
nottt that you need to have just a lessons® yourself.../me just a thought® ya might like to see what other buds have done...:O)))
just a congrats® kinda hugs on your newest venture...:O)))
Powered by vBulletin® Version 4.2.2 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.