CS-90.3: Script Programming for the Web
Syllabus

This syllabus gives the intended structure and requirements for this course, but the actual topics and amount of time spent on each topic varies from semester to semester. The course schedule for this semester, including exam dates and assignments to be handed in, is on this semester’s schedule page.

Course Objectives

The target for application development has evolved from the mainframe, to the desktop, to the web, and to mobile devices. Even with the advent of massively parallel computing systems, the basic principle that threads of execution implement algorithmic processes remains consistently applicable regardless of the target environment.

This course is designed as a first course in algorithmic computing for non-computer science majors. Although the course is open to computer science majors, the only prerequisite is familiarity with code development for basic web technologies: XHTML and CSS.

Although the ‘L’ in XHTML stands for “language,” neither XHTML nor CSS is an algorithmic programming language. Rather, they are declarative languages: they tell what content to display and what the content should look like. With the exception of some important pseudo-classes in CSS (:hover, :checked, etc.) they do not provide a way to specify the dynamic behavior of web pages, and they certainly do not provide a way to specify the procedural richness needed to create dynamic web applications.

The course introduces students to algorithmic programming using two scripting languages widely used for web applications: PHP and JavaScript. Because web applications typically draw parts of their content from online databases, the course will introduce students to PHP’s facilities for interacting with database systems.

Students who complete this course successfully will be able to:

Instructor

The instructor for the course is Dr. Christopher Vickery. See Dr. Vickery’s Contact Information and Office Hours for that information.

Course Structure and Assessment

There are two 75 minute class meetings per week. Attendance will not be taken (except at the beginning of the semester to verify your registration for the course), but students who often miss class will probably fail the course. The reading assignments for the course are listed below, and will be broken down further in the course schedule page for the semester.

Assignments

The course is based on a series of programming assignments, which may be coded and tested in the Computer Science Department’s TREE Lab using Dreamweaver and other development tools available in the lab to manage the web site used for your projects.

If you prefer, you may do your coding assignments outside the lab, provided you write the code according to the specifications given in the assignments.

In addition to your laboratory account, you will use a limited “shell account” on babbage.cs.qc.cuny.edu that you will use for testing and remote sites for your assignments. You will submit assignments for the course by uploading your code to a public server on babbage.

Assignments vary in complexity: simple assignments receive a full-credit grade of “ok” provided they are simply submitted on time and meet standard requirements for the assignment. Assignments receive half credit if they are submitted within one calendar week of the due date (“late”)‚ or if they are deficient in some way (“not ok”). A grade of “good” (extra credit) is possible, as are the grades of “late not ok” (quarter credit) and “too late” (no credit, but instructor feedback provided).

More complicated assignments are graded on a ten-point scale. The relative weights of the small and larger assignments vary from term to term. Assignments count 40% of the course grade.

All code submitted must use valid XHTML5 and CSS3, as verified by the W3C validators, in order to receive full credit. Certain warnings from the validators are acceptable; these exceptions vary from semester to semester, depending on the status of the validators themselves.

Exams

There will be two exams, a midterm and a final, which will each count 30% of your course average.

Grading

Grades are posted on the web as soon as they are available.

Exam and assignment grades become permanent one week after they have been posted, even if there has been a scoring error. Be sure to check that your exam was scored correctly and that the correct grade has been recorded (using the “Check My Grades” form on the course schedule page) as soon as exams are returned.

The College has a standard policy for converting course averages into letter grades, which I follow mechanically, with two exceptions: (a) I compute fractional course averages and round to the nearest integer, which gives you half a point of automatic grade inflation. For example, the college policy specifies a grade of B+ for course averages between 87 and 90: because of rounding, that means that any score between 86.5 and 89.5 is a B+. (b) Because a grade of C- (or less) cannot be counted towards the computer science major, I let my personal judgment (based primarily on class attendance and participation) influence how to handle course grades that are just below 71.5. But I do not automatically raise C– grades to C.

Reference Material

There is no textbook for this course, but there are numerous excellent resources available that deal with the topics covered, including both print and web media.

For the PHP language
,

the online manual at php.net provides well-organized and authoritative information, with additional annotations and examples from practitioners in the field.

There are many PHP books available, several of which include material on SQL access to databases from within PHP scripts. Many of these books are based on the “case study” method of exposition, which can be terrific if you are trying to learn the material on your own. However this course has it’s own set of case studies (assignments), and it can be difficult to use these books in conjunction with the course. Some books to consider, in no particular order, include:

Each of these publishers is highly regarded in the field, and it is well worth while looking at their other offerings in the field.

For the JavaScript language
,

you might want to consider these:

Topics

Here is an idealized schedule of topics and assignments for the course. The actual assignments vary from semester to semester.

ClassesTopicsAssignments
1-2 Web Structures and the UNIX programming model Verify lab account; set up web site for the course
3-4 Browsers, Servers, Databases, and the HTTP Protocol The PHP programming model: headers and generated content
5-7 PHP Programing: Syntax and Debugging Display PHP data types; calculate values
8-9 PHP Programming: Strings, Arrays, and Form Data Respond to form submission
10 PHP Programming: Session Management User login without database
11 PHP Programming: Regular Expressions Parse user input
12-13 PHP Programming: Database CRUD and SQL Injection Attacks User registration and login
14 Midterm Exam
15-16 JavaScript Programming: Syntax and Debugging Display variable types
17-18 JavaScript Programming: The DOM Change the class of DOM elements
19-20 JavaScript Programming: Event Handling Respond to clicks and keystrokes
21-22 JavaScript Programming: Form Enhancement Validate form submission
23-24 AJAX: Using XMLHttpRequests and JSON Validate input against selection list
25-28 Final Project Design and Implementation Final Project
Final Exam