Introduction

There are four elements of a typical web site that this course is designed to pull together: content markup (XHTML), content presentation (CSS), user—browser interaction (JavaScript) and content management (PHP/SQL). The prerequisite for this course is Computer Science 081 or the equivalent, which should have given you a firm grounding in XHTML and CSS.

JavaScript is a programming language that is available in all browsers as well as several other applications, including Photoshop, OpenOffice, and Flash (where it is called ActionScript). In all these environments, JavaScript is used to extend and customize the behavior of the base application. In the case of browsers, JavaScript can be used to validate information entered by users locally before submitting that information to a remote server, as well as to provide many forms of user interaction that go beyond those availabe using CSS. JavaScript is the 'J' in AJAX.

Content management refers to a combination of programs and a database that run on a remote server, often the same server that delivers web pages when the user clicks on a link. Server-side programs can be written in any programming language; in this course you will work with PHP, a scripting language largely derived from an earlier scripting language, Perl. PHP is the most widely used server-side scripting language in use today; other popular languages (besides Perl) are Ruby, Python, and Java. (Java, by the way, has nothing to do with JavaScript.)

There are several database systems that can be used for managing content: Oracle is widely used on very large corporate and shopping web sites; MySQL, owned by Sun Microsystems, is an extremely popular system that is available at no cost. We will use PostgreSQL for our databases. It is free and open source, and historically has had a better feature set than MySQL. This course concentrates on JavaScript and PHP programming, so the choice of which database system we use will have little impact on your work in the course.

There is a laboratory in the Computer Science Department where we have Apache web servers with PHP support installed, access to PostgreSQL databases (one for each student), and industry standard development tools like Dreamweaver and Aptana Studio. You use the computers in the lab any time the college is open, and you can log into them remotely from off campus anytime, 24/7. Alternatively, you can set up Apache/PHP/PostgreSQL on your own computer, do your assignments there, and then upload your assignments to your account in the lab for final testing and submission.

Syllabus

The following is a generic syllabus for the course. The actual schedule of assignments and exams is given in this semester’s course web page.

Unless otherwise indicated readings are in Simply JavaScript by Kevin Yank and Cameron Adams. The book is available directly from the publisher: sitepoint.com.

Class NumbersTopics
1

Introduction to Scripting Languages

Topics
  • Compilers, Emulators, and Interpreters
  • Shell Scripting: Bash; Cmd.exe, …
  • CGI Scripting: Perl, …
  • Scripting Languages: JavaScript; PHP; Ruby; Python, …
  • Libraries and Frameworks
  • Scripting, Web Standards, and Accessibility
Readings
Chapter 1
2

Web Site Structure And Operations

Topics
  • Client-Server Model: Internet message passing; hosts; ports
  • The Apache Server: Configuration file; modules; log files
  • DocumentRoot
  • Subdirectories: css, scripts, images
  • Life-cycle of a web request from browser’s perspective
  • Server request processing: server-side scripting
Readings
Chapter 2
3-10

Client-Side Scripting

Topics
  • script tags, scripts directories, and .js script files. jsmin and jslint.
  • Embedded JavaScript — Not!
  • Values: numbers; strings; references; booleans
  • Variables, Expressions, Statements, Functions, Arrays, and Objects
  • Events: handlers vs listeners; managing
  • Control Structures
  • DOM Interactions: Form verification; Dynamic Effects
  • Debugging/Optimizing with FireBug
Links
JavaScript Tutorial
Readings
Chapters 2, 3, 4, 6, 7
11Midterm Exam
12-20

Server-Side Scripting

Topics
  • Server Processing (Apache): embedding in XHTML documents; code scope; generating response headers
  • Variables, Expressions, Functions, Arrays, Objects, Classes
  • Control Structures
  • Receiving and sanitizing form data.
Readings
21-28

Client-Server Script Interactions

Topics
  • XMLHTTPRequest Processing
  • JSON Processing: JavaScript; PHP
  • XML Processing: Use as a database
Links
JSON Website
Readings
Chapter 8
Final Exam/Project

There will be four programming projects in addtion to the final exam/project. The four projects will count 10% each, the midterm will count 30%, and the final exam/project will count 30%.

This is a “best guess” syllabus: everything is subject to change!