CPSC 271 (Topics in Computer Science):
Web Site Programming

   Department of Mathematics and Computer Science
   Hobart and William Smith Colleges

   Spring, 2009.

   Instructor:  David J. Eck.

   Monday, Wednesday, Friday, 11:15--12:20, Room Merritt 200.

About This Course

Over the past few years, there has been a gradual transformation of Web applications. You see the results all the time, perhaps without noticing them, as new features are added to the web sites you visit, making them more responsive and more interactive. The result of this transformation is referred to as "Web 2.0" in acknowledgment of the significant improvement in the user's experience.

There are several reasons for the change. For one thing, browsers have become more standard, making it easier to program applications that will work in all major browsers. For another, there is the development of techniques for modifying a web page without loading a complete new page. And then there is the fact that some of the early users of the new technologies -- notably Google maps -- made the old style web applications seem clunky by comparison.

When programming web applications, there are two places where the code can run: on the "server" or on the "client." The client is the web browser, and the server is the computer that provides the web page to the client. So, we talk about "server-side programming" and "client-side programming." When I have taught this course in the past, I have covered server-side programming exclusively; at the time, I felt that client-side programming could add some flash to a site, but not much functionality. Things have changed. Client-side programming is essential to Web 2.0 applications. This time around, we will spend a great deal of time on client-side programming using the JavaScript language (which is the only real choice on the client side).

Of course, we will also work on the server side of web applications. On the server side, there are many popular choices of programming language. We will use Java, both because you already know it and because it is a popular choice for web servers, especially for large, enterprise-scale applications. Putting together the client side, the server side, and the interaction between them, there is a large number of technologies that you will have to learn about in this course, at least to some extent. Here is a list of the more important ones:

I do not have a detailed schedule of topics for the course at this time. This list gives you some idea of the topics that we have to cover, but the only thing I am sure of at this time is that we will spend the first half of the course mostly on client-side programming and the second half mostly on server-side programming. I expect class discussion and feedback from students to play an important role in determining the details of the schedule.


Textbooks and Tools

The most important aspect of this course is programming, and I have chosen two books that cover web programming, one for the client side and one for the server side. You will use these books for reference and for some reading assignments. For aspects of the course that are not covered in these books, you can expect some handouts and readings from the Web. The two books are very different in style (and hopefully everyone will like at least one of them!).

For client-side programming, we will use JavaScript: The Definitive Guide, Fifth Edition, by David Flanagan. This is a very careful and detailed book covering the basic JavaScript language as well as its use for client-side web programming.

For the server side, the book will be Murach's Java Servlets and JSP, Second Edition, by Joel Murach and Andrea Steelman. This book has short, easy-to-read descriptions of how to do various server-side tasks, with a code example for each task.

A few weeks into the semester, we will start using the NetBeans IDE for programming web applications. NetBeans is an Integrated Development Environment that is provided by Sun Microsystems (the same people who put out Java). It has good support for web programming, and it is the IDE recommended in Murach's Java Servlets and JSP. We will also follow Murach's choice for web application server and database server: Tomcat and MySQL. Tomcat is a web server that can be used to serve web applications that are written in Java and that are made up of servlets and JSP's. A version of Tomcat is bundled with NetBeans, and NetBeans makes it very easy to use. As a database server, we will use MySQL. MySQL is not bundled with NetBeans, but we will have a copy of it running on our campus network.

Since many of the things that one might want to do with JavaScript are both difficult and tedious to program (especially to make them work in most web browsers), it is common to use "JavaScript toolkits" that contain a variety of functions and classes that make common tasks easier. We will use Scriptaculous (from http://script.aculo.us), which is not the most sophisticated toolkit but does have a lot of neat capabilities. Scriptaculous depends on and includes a more basic toolkit, Prototype, and we will also use some features of Prototype directly, including its AJAX support. Other JavaScript toolkits that you might look into include YUI, Dojo, and JQuery.


Assignments and Tests

You can expect short weekly assignments, as well as a few longer-term, larger-scale projects. One of the larger-scale projects will probably be a report on some web technology. A final project, which will be due at the end of the semester, will require the creation of a fairly complex, working web application. I would like to make the final project a group project, but I might be persuaded to make exceptions. We will start discussing possible ideas for final projects early in the semester.

There will be three tests. Two of them will be given on Wednesday, February 18 and on Wednesday, April 1. The third test will either be given in class near the end of the semester or during the scheduled final exam period. We will have the test early if we decide to use the final exam period for presentations of final projects. Note that the official scheduled time for the final exam is: Sunday, May 10, from 11:00 AM to 2:00 PM.

Grading

Your numerical grade for the course will be computed as follows:

            First Test:          15%
            Second Test:         15%
            Third Test:          15%
            Final Project:       15%
            Other Assignments:   40%

I reserve the right to adjust your grade downwards if you miss more than one or two classes without a good excuse. In my grading scale, an A corresponds to 90--100%, B to 80--89%, C to 65--79%, D to 50--64%, and F to 0--49%. Grades near the endpoints of a range get a plus or minus.


Office Hours, E-mail, and Web

My office is room 313 in Lansing Hall. My office phone extension is 3398. I am on campus most days, and you are welcome to come in anytime you can find me there. My regular office hours will be posted on my door and on my website (math.hws.edu/eck), as soon as my schedule is determined. Office hours are times when I promise to try my best to be in my office. I do not generally make appointments during my office hours, since they are times when I am available to students on a first-come, first-served basis. When necessary, I am happy to make appointments for meetings outside my scheduled office hours.

My e-mail address is eck@hws.edu. E-mail is good way to communicate with me, since I usually answer messages within a day of the time I receive them.

There is a Web page for this course at http://math.hws.edu/eck/cs271/. I will post weekly announcements, readings, and assignments on that page.