IT-Universitetet
/Courses Spring 2007 /Introduction to Scripting, Databases and System Architecture

Introduction to Scripting, Databases and System Architecture, Spring 2007 (DSDS)

Course Schedule Literature DSDS News Group CourseGrader

Teachers

Office

Martin Elsman (mael@itu.dk) — ME4C02 
Arne John Glenstrup (panic@itu.dk) — AJG 4C14 

Teaching Assistants

Office

Office Hours

Jonas Holbech (holbech@itu.dk) News group News group help
Jesper Rude Selknæs (jaesper@get2net.dk) News group News group help
Kristian Skriver Jensen (kristianskriver@itu.dk) News group News group help
Kim Alex Olsen (kao@itu.dk) News group News group help

News

  • 2007-07-14: See the distribution of grades on the distribution graph.

  • 2007-05-08: The exam is held June 7, 2007, 9:00-13:00 at ITU.

  • 2007-05-07: Read the response to the evaluation by Martin Elsman (in danish).

  • 2007-03-19: Jesper Rude Selknæs is ill today March 19, 2007. Thus, there will be one fewer teaching assistant than usual, both for the afternoon and evening classes.

  • 2007-02-05: Note: When you turn-in your problem set solutions using CourseGrader, it is important that you include the content of your files in the text you turn-in. Doing so makes the lifes of the teaching assistants significantly easier...

  • 2007-02-01: Note: Each student is supposed to attend only one exercise class each week. Thus, each student may choose between attending one of the two exercise classes 15.00-17.00 or one of the three exercise classes 19.00-21.00.

  • 2007-02-01: Exercise classes are held on lecture days 15.00-17.00 in 2A52 and 4A58, and 19.00-21.00 in 4A54, 4A56, and 4A58.

  • 2007-02-01: Please consider using the editor SciTE for editing HTML and PHP files. SciTE is much an improvement over Notepad.

  • 2007-01-26: The first lecture is Monday, January 29 at 17.00-19.00 in Aud. 2.

  • 2007-01-26: There are no exercise classes in the introductory week (January 29).

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 14 weekly lectures and 11 weekly exercises.

Lectures are on Mondays from 17.00-19.00 in Aud. 2, starting Monday, January 29, 2007. There are exercise classes from 15.00-17.00 in 2A52, 4A58 and from 19.00 to 21.00 in 4A54, 4A56, and 4A58. Each student is supposed to attend only one exercise class each week. Thus, each student may choose between attending an exercise class 15.00-17.00 or an exercise class 19.00-21.00. Note: There are no exercise classes in the introductory week (January 29). Thus, the first exercise class is February 5.

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.DSDS 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: DSDS_F2007@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 7, 2007.

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

Teacher

Exercise Deadline

29/01 Course introduction. Static Web pages, HTML, HTML-forms. Slides. HTML overview, part 1, HTML overview, part 2. ME    
05/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) ME PS1
PS1-extra
12/02
12/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) ME PS2 19/02
19/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) ME PS3 26/02
26/02 PHP continued. Regular expressions. Checking form variables. Fetching data from foreign Web sites. Slides. PHP and MySQL Web Development, 105-128 (Chapter 4) ME PS4 05/03
05/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) ME PS5 12/03
12/03 SQL continued. Aggregate requests, calculated fields, outer joins, indexes, keys. Slides. PHP and MySQL Web Development, 217-263 (Chapters 9-10) AJG PS6
PS6-extra
19/03
19/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) AJG PS7 26/03
26/03 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) AJG PS8 02/04
02/04 Dates. Example: Todo list service. Simple user authentication. Community Web sites. Slides. PHP and MySQL Web Development, 439-449 (Chapter 20) AJG PS9 16/04
09/04 Spring Break Spring Break Spring Break
16/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) AJG PS10 23/04
23/04 AJAX I: JavaScript. Manipulating HTML on the client side. Document object model (DOM). Reacting on events. Suggested solutions to an earlier exam. Slides. Basic JavaScript, Event Handlers AJG Spring 2004 Exam
30/04 AJAX II: Setting style properties. Navigating the DOM. Asynchronous server requests. Slides. Ajax: A New Approach to Web Applications AJG Spring 2004 Exam
07/05 Advanced Web Programming Techniques. Programming Web Applications with SMLserver. Slides. Research paper: Web Programming with SMLserver ME PS11 14/05

Some ealier exam sets with solutions


Accessing ITU's network

During the course, you will need to create, save, and read files in the folder W:\f2007\DSDS\login at ITU's network (here login is your ITU login name). The directory W:\f2007\DSDS\ is mounted on every ITU student PC. If you do not have a personal directory login in the directory W:\f2007\DSDS\, please send an email to sysadm@itu.dk indicating that you are enroled in the course and therefore is entitled to a directory.

Files in the directories are served by ITU's Web server. That is, if you place a file file.html in your directory W:\f2007\DSDS\login, the ITU Web server accepts requests for the file at http://itu.dk/stud/f2007/DSDS/login/file.html.

Another possibility for managing the above directories is through use of ssh to the ITU host ssh.itu.dk. All user directories are located in the directory /import/stud/www/f2007/DSDS.

Before you start with the exercises, it is a good idea to install a version of ssh on your home computer.

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").
See also the course specific MySQL guide.

Literature

Related Literature

Links


Maintained by Arne John Glenstrup and Martin Elsman

til top