IT-Universitetet
/Courses Spring 2005 /Web Publishing with Databases

Web Publishing with Databases, Spring 2005 (W2)

Course Schedule Literature W2 News Group CourseGrader

Teachers

Office

Martin Elsman (mael@itu.dk) 4E04 

Teaching Assistants

Office

Office Hours

Jacob Friis Mathiasen (jfm@itu.dk) News group News group help
Kristian Thy (thy@itu.dk) News group News group help
Jens Vesti (vesti@itu.dk) News group News group help

News

  • 2005-03-15: See note on register_globals Off below.
  • 2005-02-15: It is now possible with CourseGrader to turn-in your problemset solutions in one go.
  • 2005-02-09: Exercise classes are held on lecture days 15.00-17.00 in 2A52 and 19.00-21.00 in 4A56 and 4A58.
  • 2005-01-27: There are no exercise classes in the introductory week (February 1).
  • 2005-01-27: The first lecture is Tuesday February 1 at 17.00-19.00 in room 4A14.

Course Goals

To learn to apply advanced Web techniques for developing realistic, useful Web sites, involving information interchange with a database. The course is focused on the possibilities the server side provides for constructing Web sites with a high degree of dynamic content. After the course, the successful student will be able to design and construct medium-sized Web applications using PHP, design small MySQL databases, and construct PHP scripts that interact with databases using SQL (Structured Query Language).

See also the course base description.

Prerequisites

As a prerequisite, students should know about HTML and be able to use HTML to construct simple Web pages. Students with no programming experience should be motivated and prepared to put extra effort into the problem sets.

Course Content

Based on knowledge about the construction of static Web sites, the course provides the student with techniques for creating Web sites that are programs and Web sites that are databases.

The students are introduced to basic programming with PHP (PHP Hypertext Preprocessor) on the Web server, for generating HTML code dynamically, and to database programming with SQL (Structured Query Language), for enriching Web pages with dynamic content.

The lectures and the weekly individual exercises teaches the student
  • basic PHP programming
  • to design and implement simple databases using SQL
  • to construct Web applications that
    • access simple databases from PHP using dynamically generated SQL
    • extract information from foreign Web sites
    • send emails to potential users
    • perform access control using Cookies
  • to describe and evaluate the mechanisms behind dynamic Web sites
  • to know about the techniques used for constructing advanced community Web sites

Course Format (When and where)

The course is built around 12 weekly lectures and 11 weekly exercises.

Lectures are on Tuesdays from 17.00-19.00 in room 4A14, starting February 1, 2005. There are exercise classes from 15.00-17.00 in 2A52 and from 19.00 to 21.00 in 4A56 and 4A58. Each student must turn in (and get approved) at least 9 of the 11 weekly exercises within the given deadlines. This includes students joining the course late.

How to get Help: The Course News Group

If you have questions to the exercises or the course, please use the news group it-c.courses.W2 or visit a teaching assistant in the office hours (see above). See Sysadm's news-howto. Do NOT email teaching assistants or lecturers at their personal email address for general exercise help.

Email to everyone on the course can be sent using the course mailing list: W2_F2005@itu.dk.

Examination Format

The examination format is a 4 hour written exam with all written material allowed. Grades are given in the 13-scale using external censorship. Besides the written exam, the students must have turned in at least 9 of 11 possible weekly problem set solutions within the given deadlines, and the solutions must be approved by the teachers.

Problem sets will be discussed in the exercise classes on the dates listed below. For a problem set solution to be approved, the student must turn in the solution to the problem set using CourseGrader before the time 00.01 on the following course day. Solutions to problem set 11 should be turned in before the time 00.01 on May 10, 2005.

You are allowed to discuss solution strategies with your fellow students, but you must code up your own answers yourself. Copying other students' solutions and submitting them will be considered as cheating at the exams, cf. ITU's notes on academic conduct and misconduct.

Furthermore, for approval of a problem set solution, the student must have completed correctly at least 50 percent of the problem set. (Percentage rates for the individual exercises are stated in the problem sets.) So to get a problem set approved, you should probably solve well over 60 percent to be on the safe side.

Note: When submitting a problem set solution to CourseGrader, the whole solution must be turned in together (for all exercises in the problem set). If solutions to a problem set have been turned in several times, the last solution being turned in before the deadline is the one being rated.

Note: When using CourseGrader the first time, you need to ask it to send you your password. Notice that CourseGrader is an isolated system, which have no connection to other ITU-related systems. In fact, the system is not maintained by the System Administration, but by Martin Elsman.

Course Schedule

The schedule is preliminary

Day

Topic

Literature

Exercise Deadline

01/02 Course introduction. Static Web pages, HTML, HTML-forms. Slides. HTML overview, part 1, HTML overview, part 2.    
08/02 Introduction to PHP. The first dynamic Web page. Variables, arithmetic expressions, conditional statements, string operations, while loops. Querying data from users, simple forms, form variables. Slides. PHP and MySQL Web Development, 1-55 (Introduction, Chapter 1) PS1
PS1-extra
15/02
15/02 PHP continued. For-loops. Built-in functions, random numbers. User defined functions, code reuse, functions for constructing a changeable Web page design. Strategies for Web sites that are programs. Slides. PHP and MySQL Web Development, 129-155 (Chapter 5) PS2 22/02
22/02 PHP continued. Form-variables in links. Radio buttons, select lists. Hidden form variables. Arrays. Example: throwing dices. Check boxes. Slides. PHP and MySQL Web Development, 79-104 (Chapter 3) PS3 01/03
01/03 PHP continued. Regular expressions. Checking form variables. Fetching data from foreign Web sites. Slides. PHP and MySQL Web Development, 105-128 (Chapter 4) PS4 08/03
08/03 File-based databases. Relational databases. Introduction to SQL (Structured Query Language). MySQL. Slides. PHP and MySQL Web Development, 57-78 (Chapter 2), 205-216 (Chapter 8) PS5 15/03
15/03 SQL continued. Aggregate requests, calculated fields, outer joins, indexes, keys. Slides. PHP and MySQL Web Development, 217-263 (Chapters 9-10) PS6
PS6-extra
29/03
22/03 No Teaching No Teaching No Teaching
29/03 SQL continued. Connection to MySQL database from PHP on the Web server. Web sites that are databases. Database transactions via Web forms. Slides. PHP and MySQL Web Development, 265-283 (Chapter 11) PS7 05/04
05/04 Sending email. Text substitution with regular expressions. Example: Sending emails from mail list service. Example: On-line classification system. Slides. PHP and MySQL Web Development, 507-521 (Chapter 24) PS8 12/04
12/04 Dates. Example: Todo list service. Simple user authentication. Community Web sites. Slides. PHP and MySQL Web Development, 439-449 (Chapter 20) PS9 19/04
19/04 Cookies and sessions. User authentication with cookies. User tracking. Analysing user behavior. Suggested solutions to an earlier exam. Slides. PHP and MySQL Web Development, 479-494 (Chapter 22) PS10 26/04
26/04 Advanced Web Programming Techniques. Programming Web Applications with SMLserver. Slides. Research paper: Web Programming with SMLserver PS11 10/05

Some ealier exam sets with solutions


Creating databases at ITU

To complete the exercises, you will need to create some databases at ITU's MySQL server. Creating a database is done using ITU's database administration service:
  1. Enter your UNIX user name and password, click on "Log ind"
  2. Click on "Create new database" ("Opret ny database").
  3. Enter a name for the database.
  4. Enter a user name of your choice (e.g., your UNIX user name) as the user name for the database.
  5. Enter a database password. Do NOT use your usual password; select a new, different password (because the password will be written in your .php files).
  6. Click on "Create" ("Opret").
  7. When you have finished, click on "Logout" ("Log ud").

register_globals Off

If you have installed your own Web server or for other reasons need to live with register_globals Off, please see the Zend-note on register_globals Off for a description of how to program in such an environment.

Literature

  • Luke Welling og Laura Thomson. PHP and MySQL Web Development. Third Edition. Sams Publishing. ISBN: 0-672-32672-8. October 2004.
  • Peter Sestoft. HTML overview. An introduction to writing HTML documents. Translated into english by Martin Elsman.

Related Literature


Updated 01-27-2005
Martin Elsman

til top