Class:
1 ·
2 ·
3 ·
4 ·
5 ·
6 ·
7 ·
8 ·
9 ·
10 ·
11 ·
12 ·
13 ·
14
Week 1: Introduction and The Basics
Topics:
Introduction to the Class
Web Hardware and Software Basics
Setting Up Your Production Environment
Creating "Hello, World" in PHP
Class Resources:
Class #1 Notes
Weekly Assignment:
Pick a dynamic website you admire and write a paragraph about what you like about it. Modify your "Hello, World" program to contain that paragraph and a link to that website.
Recommended Reading/Reference:
Web Database Applications with PHP & MySQL
Pages 1-15 (Chapter 1: Database Applications and the Web)
DWD Bookmarks about HTML
DWD Bookmarks about basic UNIX
Week 2: PHP Basics and CGI: Script-Generated Pages
Topics:
PHP Basics, Variable Types, Statements, Examples
Functions
PHP & CGI - Interacting With The Web Server
POST and GET - Obtaining and Parsing Form Input
HTML Form Widgets - An Overview
Sample PHP Template
Basic File I/O
Webpages That Constantly Change
Class Resources:
Class #2 Notes
Class #2 PHP Template
DWD Bookmarks about basic PHP
Weekly Assignment:
Using the Class #2 PHP template shown above, create a web page that changes based upon user input. Please use at least two HTML widgets in addition to your submit button, and use the input from these widgets to create something useful or interesting for the end user. Please try to make your display cohesive by imagining how and why someone might use your web page.
Recommended Reading/Reference:
Web Database Applications with PHP & MySQL
PHP Variables, Operators, Expressions, Logic Flow (pps. 16-36), Functions and Include Files (pps. 45-56), Arrays, Strings and Dates (pps. 57-71, 76-87, 97-103)
Week 3: Database Design, MySQL, and the SQL Language - Part 1
Topics:
Introduction to Databases
Relationship Modeling
Using PhpMyAdmin To Create Your First Table
MySQL Data Types
Basic SQL Commands
Class Resources:
Class #3 Notes
PhpMyAdmin Database Tool
DWD Bookmarks about MySQL
Weekly Assignment:
The basis of this week's assignment is to create and manipulate a table of your own creation, but also to show what you did and present it in a web page that is created by a PHP script. Thus, all SQL statements that you issue will be documented in your web page, as well as how each statement affected the data in your table. Here are more specific instructions:
- Create a table of your choosing which contains the following columns: an ID column, at least one numeric column (i.e. integer, double, or decimal), at least one string column (i.e. varchar, text, or blob), and at least one date or time column (i.e. date, time, datetime, etc). Show a visual representation of the columns of your table in your PHP-generated web page. You can use the "Print View" link on the PhpMyAdmin "Structure" page and take a snapshot of your table in PhotoShop and present it as an image, or you can cut and paste the HTML from the "Print View" link into your PHP script, or use whatever means necessary to show the structure of your table inside of your PHP-generated web page.
- Using the INSERT statement in the PhpMyAdmin SQL window, create at least 5 records.
- Inside of your PHP-generated web page, list the INSERT statements that were used to create your data set. Then show all records in your table. You can use the "Print View" link on the PhpMyAdmin "Browse" page and take a snapshot of your table in PhotoShop and present it as an image, or you can cut and paste the HTML from the "Print View" link into your PHP script, or use whatever means necessary to show the contents of your table inside of your PHP-generated web page.
- Using the SELECT statement in the PhpMyAdmin SQL window, make at three targeted queries. One should be based upon a numeric column (i.e. where id=5), one should be based upon a text query (i.e. where name='Jones') and one should be based upon a datetime column (i.e. where date>'4/1/2001'). Show each query and its respective results inside of your PHP-generated web page.
- Using the UPDATE statement in the PhpMyAdmin SQL window, change at least one of the records in your table. Show the statement and the new contents of your table inside of your PHP-generated web page.
- Using the DELETE statement in the PhpMyAdmin SQL window, remove at least one but not all of the records in your table. Show the statement and the new contents of your table inside of your PHP-generated web page.
Please try to choose your table columns and queries in some sort of coherent fashion. Think of some data in your life that you'd like to organize (address book, the weather, your CDs, etc), and how you might be able to keep track of it, and to obtain interesting results by querying it.
Recommended Reading/Reference:
Web Database Applications with PHP & MySQL
Chapter 5, SQL and MySQL, Database Basics (pps. 134-138), SELECT statements (pps. 152-160)
Teach Yourself MySQL in 21 Days By Anthony Butcher
Pages 42-46 (Relationship Modeling), 65-83 (Data Types), 109-112 (INSERT), 115-116 (UPDATE), 128-134 (SELECT), 151 (DELETE)
Week 4: Database Design, MySQL, and the SQL Language - Part 2
Topics:
Database Optimization - First 3 Forms of Normalization
Multiple-Table Queries
Advanced Single-Table Queries
MySQL Date and Time Functions
Class Resources:
Class #4 Notes
DWD Bookmarks about MySQL
Weekly Assignment:
Pick a raw data set of your choosing that contains at least 10 records, and normalize it through the three forms of normalization, making sure that the design changes with each step. The design of your raw data set is what will help demonstrate your knowledge of what defines each step of normalization, so choose it carefully. Your design must consist of several tables. Take snapshots of your design at each step and present them in a web page generated by PHP such that we can dissect them in class.
Recommended Reading/Reference:
An Introduction to Database Normalization By Mike Hillyer
Multiple Table Joins @ Wikipedia
Teach Yourself MySQL in 21 Days By Anthony Butcher
Pages 46-49 (Normalization), 127-139 (SELECT Queries), 156-161 (Multiple Table Queries), 188-196 (MySQL Date and Time Functions)
MySQL GROUP BY Functions
MySQL Date and Time Functions
Week 5: PHP Talks to MySQL: The Web to the Database and Back
Topics:
The PHP Interface To MySQL
Practical Considerations on Stage
Common PHP DB Methods
Example Scripts for the Four Main SQL Queries
Favorite Sites Demo
Handling One-To-Many Relationships
Handling Many-To-Many Relationships
Class Resources:
Class #5 Notes
Favorite Web Sites Demo - Submit & Vote
| Source Code
Favorite Web Sites Demo - Submit with Category (One to Many)
| Source Code
Favorite Web Sites Demo - Submit with Tags (Many to Many)
| Source Code
Weekly Assignment:
Create a web page that accepts user input and stores it in a table (or tables) in your database. This page should also be able to display the contents of your table(s) in some interesting way. As always, try to choose your data and functionality in some coherent fashion, paying particular attention to user interface design. Why would someone want to use this little application you've created? Why is it important that whatever activity they have performed be persistent in your database? On a more technical level, this means that PHP will have to perform at least one SELECT query, at least one INSERT query, possibly an UPDATE query, and possibly a DELETE query. However, the functionality of your interface is ultimately more inportant than the range of SQL operations it needs to perform.
Recommended Reading/Reference:
Web Database Applications with PHP & MySQL
Querying MySQL and Formatting Output (pps. 171-183), Processing User Input (pps. 190-197)
PHP/MySQL Documentation
Week 6: Basic PHP Tricks and Bulk Data Population
Topics:
Redirection
Cookies
Session Management & Password-Protected Pages
Sending Simple E-mail
Image Management
Data Population Techniques
Miscellaneous Tricks
Class Resources:
Class #6 Notes
Class #6 Login Demo
| Source Code
Note: To login to the demo, use the username: itpdb and the password: interact
Weekly Assignment:
Your assignment is start working on your mid-term project, which is due Oct 27th. Your mid-term project cannot be a collaborative effort with another student, as each student must show a core proficiency in the basic concepts that have been taught up to now. You will be free to collaborate on your final project if desired. The main technical requirements for the mid-term project are as follows:
- Well-architected HTML front-end demonstrating a firm grasp of form widgets
- Normalized multiple-table database design
- PHP scripting that incorporates error checking, database manipulation, and proper user feedback
Your finished project should consist of the following:
- A description page containing a paragraph explaining your project, and an image screenshot of your database design.
- A working demo. If your demo requires a login to see various functionality, then the login page should either allow for new user registration or indicate a valid username/password combination to login.
- Note: If your demo is not hosted on the ITP Stage server, then please provide links so that I can view the source code to all relevant scripts (re-saving "script.php" as "script.php.txt" and linking to the latter will accomplish this) or email them to me.
Recommended Reading/Reference:
PHP Header Function Reference
PHP Session Handling Functions
PHP Mail Function | Emailing in PHP - Reference
PHP File Upload Reference
Week 7: Advanced PHP Tricks and Site Architecture Basics
PHP Tricks:
Command-Line Scripting and Using Cron
GD and Image Processing
Intro to Regular Expressions and Form Parsing
Networking Basics (HTTP, Email, FTP)
Creating PDFs in PHP
Site Architecture Topics:
Creating Site Templates and Navigation
Creating Laundry Lists and Paging
Creating Profile Pages
Editing Content (Administrative Tasks)
Other Forms of Templating
Class Resources:
Class #7 Notes
Weekly Assignment:
Your assignment is to continue your work on your mid-term project.
Please be prepared to present your project next week. Also, please make sure that your description page and your working demo link to each other such that you can easily switch between them. Note that if your project isn't functioning properly, it is still far better to submit it than to submit nothing, because we can dissect any problems during class.
Recommended Reading/Reference:
GD Library Reference
Regular Expressions - Perl-Compatible
PHP Curl Library
PHP IMAP extension
PHP FTP extension
Week 8: Mid-Term Project Presentations
Topics:
Mid-Term Projects - Each student will present the fruits of the last few weeks of work as their mid-term project. We will spend 5-10 minutes dissecting and learning from each student's demo and database design.
Your finished mid-term project should consist of the following:
- A description page containing a paragraph explaining your project, and an image screenshot of your database design.
- A working demo. If your demo requires a login to see various functionality, then the login page should either allow for new user registration or indicate a valid username/password combination to login.
- If your demo is not hosted on the ITP Stage server, then please provide links such that I can view the source code to all relevant scripts (re-saving "script.php" as "script.php.txt" and linking to the latter will accomplish this). Alternatively, you can email them to me.
Weekly Assignment:
Your assignment is to spend the week thinking about ideas for your final project. It can expand on your mid-term project or be an entirely new concept. Create a PHP script that discusses what your final project will be and what type of functionality you expect it to encompass.
Week 9: CSS, The DOM, and Basic Javascript
Topics:
Intro to Cascading Style Sheets
Assigning CSS Rules
CSS In Practice
Favorite Sites - Table w/CSS
Favorites Sites - 3-Box Model
Intro to the Document Object Model (DOM)
Intro to JavaScript
The Concept of a Function in JavaScript
Popup Windows
Interacting with the DOM and HTML Forms
Image Swapping
The Location Object
PHP Writes JavaScript
Class Resources:
Class #9 Notes
DWD Bookmarks about CSS
DWD Bookmarks about JavaScript
Weekly Assignment:
Your assignment is to create a PHP script that uses CSS and basic JavaScript to enhance its visual design and functionality. Pay particular attention to your user interface design, as your use of these technologies should augment your page's capability, and not simply exist just to fulfill the assignment.
Recommended Reading/Reference:
W3Schools CSS Tutorial
CSS Zen Garden
WebMonkey CSS Guide
CSS Property Reference
David Thau's JavaScript Tutorial at WebMonkey.com
JavaScript Tools at Webreference.com
Adventurous uses of Javascript - Bookmarklets, Browser Sniffing, Rollover Menus
Week 10: XML, AJAX, Frameworks and Web Service Basics
Topics:
Introduction to XML
PHP Writes XML
AJAX (Asynchronous JavaScript and XML)
Introduction to Javascript Frameworks and jQuery
Google Maps
Introduction to JSON
Web Services and Flickr (images)
Web Services and YouTube (videos)
Web Services and Delicious (bookmarks)
Web Services and Twitter (status)
Class Resources:
Class #10 Notes
DWD Bookmarks about JavaScript
DWD Bookmarks about AJAX
DWD Bookmarks about JSON
DWD Bookmarks about Web Service APIs
Weekly Assignment:
Your assignment is to create a PHP script that uses Javascript to interact with a web service API. Please feel free to use a Javascript framework to handle the parsing of web service data and to streamline the display process.
Recommended Reading/Reference:
Head Rush AJAX by Brett McLaughlin
The book website has on-line demos with source code downloads
AJAX Tutorial at W3Schools
Ajax Programming at Wikipedia
XMLHttpRequest API at Wikipedia
jQuery Official Site | jQuery Documentation
Google Maps Documentation
Flickr API Documentation
YouTube API Documentation
Delicious API Documentation
Twitter API Documentation
Week 11: Web Service Integration, Mashups, and Facebook Apps
Week 12: Interfacing with Flash
Week 13: Final Project Workshop
Week 14: Final Project Presentation