Back To: [Winthrop] [CBA] [CS&QM] Jim McKim
Welcome to Winthrop.edu

Homepage for Client/Server Programming for the WWW (CSCI 241)

Fall, 2008

[Announcements] [Labs] [Homework assignments] [Notes]

[Student Projects] [Eagle Digs]

Syllabus

Announcements:


 

Labs:

The goal for the lab on 11/20 is to set up a writable directory on the server and use it to store files that contain temporary state information. Also we'll make some changes in the classroom example to verify that you understand how that process works.

 


The goal for the lab on 11/6 is to accept forms submitted from a web page and record the data from the form on the server.

 


 

The goals for the lab on 10/28 are to learn how to write to files and to learn how functions work in perl. That combination will allow us to develop a hit counter.

 


The goal for the lab on 10/21 is to learn how arrays work in perl.

 


The goals for the lab on 10/9 are to learn more about Perl, particularly wrt if statements, while statements and reading from files.

 


The goals for the lab on 10/7 are to learn more about Perl, particularly how scalar variables and interpolation work, and to learn a little about how SSI's (server side includes) work.

 


The goals for the lab on 10/2 are to learn a little bit about Perl, make sure your account on the INFD server is working properly with respect to Perl, and get a taste of how cgi programming works, both in general and with Perl.

 


The goal for the lab on 9/24 is to apply the string manipulation techniques to the Dogs example. This will better set the stage for reading a string sent from the server to be decoded by javascript on the client side.

 


The goal for the lab on 9/22 is to explore some of javascript's string manipulation capabilities. We'll use them to read a compound string off the page and break it into its component parts.

 


The goal for the lab on 9/18 is to build on the previous lab to illustrate how the onmouseover event can be used with a javascript array of objects to change an image. You'll need to keep the list of dog names from before, but you don't have to keep the barking functionality if you don't want to. I'm really only interested in the pictures for today.


The goal for the lab on 9/16 is to build on the previous lab to illustrate how the onmouseover event can be used with a javascript array of objects.


The goal for the lab on 9/11 is to get a web page on the INFD server that shows the construction and use of javascript objects.

 


The goal for the lab on 9/2 is to get a web page on the INFD server that exhibits some javascript code. It would be natural for you to use the volleyball page you're working on for HW to accomplish this, but any page that meets the below requirements will do.

 


The goal of the lab on 8/28 is to get a web page onto the INFD server that is divided into sections using the HTML div element and that uses an external style sheet to control those elements. My recommendation is that you do this with your volleyball page that you're working on for the homework assignment, but any new page will do (e.g. you can't just point me to your Hangman project from last term or any other page you've done in the past). There should be at least three div elements. Use the style sheet to arrange these on the page. And there should be

These styles can be very simple for the lab. I just want to be sure you can still do them. For the hw assignment I'll look for a little more creativity.

When you've finished, move your files to the INFD server and e-mail me the link to the html document. Note that all labs and all hw should include the boilerplate at the top that specifies the most rigorous standard will be met, and should include the icons/links at the bottom that allow that claim to be easily checked.

 


The goal of the first lab (8/26) is to put an HTML page up on the INFD server. A secondary goal is for me to collect some updated info about you. So....


Homework Assignments:

Assignment #5. Due midnight 12/8.

1. Include at least two elements on your Get Well form. Do a client side check that both parts of the form have been properly filled out. You get to decide what "properly" means as long as both parts of the form are checked. If there's a problem present an appropriate error message to the user. If all is well, submit to the server side.

2. On the server side, show the information provided by the user and offer them the choice of confirming it or returning to the previous page to change their submission. If they confirm then go ahead and submit to the server again. Note that this step will require maintaining state in some way. You get to choose how you do this.

3. On the third page, thank them for their submission, append their submission to a file and offer them the opportunity to view all the submissions to the file so far.

4. As always, meeting the bare requirements nets you a middle B. You need some extras either in substance or style to raise your grade beyond that. E.g. js code in a separate file, additional form elements in the get well card, adding some style to the confirmation pages, etc.

5. E-mail me the link to your site, but also attach your perl code.

Extra credit opportunities (these are due midnight 12/10):

1. Put an image element on the main page. Rotate a variety of team images through this element, based on a timer.

2. Do some research to add appropriate links to the main page. Possibilities include the Big South volleyball pages, winthropfans.com, volleytalk, Rich Kerns.

3. Add a link to the picture in the player's section. This link could just take you to that player's personal page, but you might be able to come up with something more imaginative.

4. Design a place for a schedule as part of your site. Each entry in the schedule should include the date, time, opponent and venue (home or away) for the game. Read the schedule from a file in order to display it. The file needs to be set up in such a way that it is easy for a nontechnical person to go in and change the schedule.

5. I'm interested in anything you think of doing, but you should talk to me first before trying something not on this list.


Assignment #4. Due midnight 11/11.

1. Move your players' data from the HTML page where it currently resides to a text file on the server. Put each player's info on a separate line. Write perl code to read that file into one large string. Then use an SSI (server side include) to include that string (invisibly) in your main volleyball html page. If you do this right the perl code should write a string that looks just like the string you had to type in for the previous assignment. Your js code should then pick that up, and all should work as it does now.

2. As discussed in class, the reason for setting the code up this way is so that a nontechnical content expert can update the web page, by changing one data file. This technique and others like it are the common ways that web sites keep their data current.

3. Add a hit counter to your volleyball page. It's up to you to find a suitable place on the page for the counter to go. Generally speaking, these should be subtle and be towards the bottom of the page.

4. Kellie Sellers recently underwent surgery for a knee injury. Include a form on your volleyball page that allows fans to offer her best wishes for recovery - a get well card of sorts. The actual form should be submitted using the "put" method, but the underlying code should work regardless of whether "get" or "put" is used. As the forms are submitted append the get well messages to a file. The idea is that the file will grow as more messages come in. Spend some time thinking about how the file needs to be set up. In particular it needs to be clear where one message ends and the next begins.

5. Once a form is submitted, there needs to be some acknowledgement of that fact. This can be done with a Perl generated web page that just says something like "Thanks for your good wishes, we'll pass them on to Kellie". That's the basic requirement, I'm hoping you'll do a little better than that.

6. As usual, meeting the basic requirements nets you a middle B. You have a lot of leeway wrt how the hit counter is set up, how the form is set up, the format of the "get well Kellie" file, and the acknowledgement. I'll be looking at how well you accomplish those tasks when it comes to adding points to your base grade.

7. I don't think we need to have presentations of these assignments, so don't worry about that.

8. Send me the link to your page and attach the perl code to the message.


Assignment #3. Presentations in class on 10/14. You can do some fixing up after that. E-mail me the links to the code on the INFD server by midnight that night. Also send the link to hamus14@yahoo.com. That's Steve Polhamus, our volleyball liaison. He gets the final say on whether your individual player page is ready for prime time.

1. Fix any problems from last time. This includes any css issues that are causing significant differences in viewing through IE and other browsers. Come see me for help on this or any other issue if you need to, but also remember that most of y'all solved similar problems successfully last year in your Hangman code. All the final hangman code that was submitted to me is here so you can investigate how you and others solved such css problems before.

2. Add at least two attributes to the Player object. One of these should be displayed when the picture of the player is displayed. The second should be a URL for the player. For your player this should be the address of the page you've written. For the other players you can use the profiles on the athletic web site.

3. Clicking on the player should now take the user to the URL discussed above. Do this by adding to the javascript code that writes out the list of players. You can do it with anchors, you can do it by listening for the onclick event, or you may come up with another way. Anything that works and looks good is fine.

4. Instead of typing all the player info into the javascript code as you build the Player's array, read this information from a long string on the html page. This is similar to what we did in the last Dogs lab. In the next HW assignment we'll use a server side include to put this string on the page, but for now you'll have to type it yourself.

5. Finish up your individual player's page. In the top left corner of the page display at least two links. One back to the main Eagle Digs page and one to the player's profile on the official athletic site. At the bottom of the page, mention your name as the author. How exactly you do this is up to you.

6. Include at least two pictures on the page that are different from the headshot we're already displaying. Ideally, one of these would be the player in action on a volleyball court and the other would be a more personal shot. If you can't get the latter, use two action shots. Remember there are lots of action shots available here.

6. More pictures are probably better. Remember that the above are the minimal requirements. Doing a good job meeting these gets you a middle B.

7. Coding notes: All the code you write for this course needs to be written by you. In particular, you should not be using Expression Web or any other tool to generate html or css code.


Assignment #2. This is now the full assignment, due midnight Thursday, 9/25, with presentations on the following Tuesday, 9/30.

The first part of the assignment deals with the javascript code. Create a Player object and give it at least two attributes: a name and a headshot image. That second attribute should really be the image, not the file name or url. Modify your array of Images from the first assignment to be an array of Players. Use it so that whenever the headshot of a player is shown on the screen, it is accompanied by the player's name as a caption.

Somewhere on your site you should still have a players' section that when loaded shows one randomly selected player image and name. In that same section you should have a list of player names. Moving the mouse over the name should change the image and caption to that player's image and name. For the moment clicking on the name could link to the player's official profile on the athletic site, but as you know we hope to replace these with our own specialized pages.

From a coding point of view we want to set this up so that we only type a player's information (for now just the name and image info, but later perhaps much more) once. Then anytime we want to access any bit of player info we should be able to pull it out of the Player array. Then if a new player is added or an existing player needs to be deleted we need only change the Player array. Later we'll set it up so that the Player array itself is built automagically from some server side file or database, but for now we'll just type the info we need as part of the javascript file. But we'll just type it once.

For the second part of the assignment we now have a go from the volleyball staff in that they have agreed the players will feed us appropriate personal (but not too personal) information so that we may put up an individualized web site for each one. We'll assign student-player partnerships tomorrow (9/16) in class. I want to leave this part of the assignment as open ended as possible as I'm really looking for you and your player to be creative as possible. Nevertheless, several notes:

As always, grades will be assigned numerically, but will be in the B range if you meet the basics of the assignment, in the A range for going beyond the basics, planning for the future, trying some things out, attractive look and feel, and in the C range or below if the product falls short of expectations.

 


Assignment #1, due midnight Thursday, 9/4. Each team should select one member to present their site the following Tuesday (9/9). Five minutes should be sufficient.

    Design and implement a layout for a home page for a Winthrop volleyball fan website that includes all the following elements:

  1. A welcome area.

  2. A set of links to general volleyball pages, including sites on history, rules, and terminology. Include at least three well chosen links.

  3. A news area. This should be the showcase of the main page. The volleyball staff will be feeding us news bulletins throughout the Fall and we'll add them here.

  4. A section for the players. This should include a list of the players' names, with links to their pictures. You can download pictures of most of the players from the official volleyball site. Click on roster and then click on the player. The freshmen may not have pictures yet, but the others should.

  5. In or near the players' section, show an image of a player. The player should be randomly chosen at first. Once the page is loaded let the user decide which player is displayed by clicking on her name.

In terms of coding elements:

  1. For now, you can do this in just one page. In the future we may want a very simple welcoming page with links to news, players, related links, etc. But for now one page is good.

  2. Write an external CSS file. There should be separate styles for each of the main sections of the page: Welcome, External links, News, and Players. Use the HTML div element to divide the page into sections.

  3. We will need some javascript code to deal with the player/picture combinations. In particular store all the pictures of the players in an array as we did with our hangman images. When you list each player name do so in an HTML element that listens for an onclick event. When the event occurs pass the number of the image you want displayed to the event handler. For example, if Shannon Sitzmann's image is the 0th element of the array, then in the html element for her name you would include something like onclick = displayImage(0). Then write the displayImage code so that it displays the image whose number is passed to it.

Grading: As always, all code should be clearly written with good choices for names of styles and variables. Indenting should be used to set off nested elements. Javascript code should be well documented. A good rule of thumb is a comment on each routine and on each major control structure. Figure on a C if most of the requirements are met, a B if all are met in a minimal fashion, and an A if all requirements are met, but with additional creativity, planning for the future, and generally going beyond the minimum. Grades on assignments will normally be numerical, the above are just general guidelines. I hope there won't be many, if any, grades below C's, but obviously these go to projects that meet relatively few requirements and/or are late. One member of the team will present your assignment the class day after it's due. I'm not looking for anything deep here. This is what we did. This is how we did it. Here's a problem we ran into and solved. Any questions. These will be worth a small part of each assignment. I fully expect you'll get full credit for the presentation just about every time. I will keep track to make sure that each student makes their share of presentations.


 

 

Notes: These are notes from various class meetings.

8/26:

This semester's project: We have been asked to develop a fan site for the Winthrop volleyball team. We'll start with client side work: HTML, CSS, Javascript. This will serve as a review of last term's work, but also allow us to explore some more advanced features of these languages, particularly Javascript. We'll then move to the server side, eventually setting up a database of fans, so we can greet each by name, keep track of their favorite players, etc.

On working with a partner:

Strict paired programming calls for one person to do all the typing whilst the other kibitzes (that is, makes suggestions, catches typos, etc.) This technique is becoming widely used for software development in both education and industry, because it has been found to enhance learning in the former and to reduce bugs in the latter. Early on in this course, you may wish to work in just this way, but it means that your and your partner's code will be exactly alike. Later on, particularly as we change partners, you will likely want your project to have your own style, so you'll want your product to differ from your partner's. At that point, in lab, I expect you to work on one person's version first, then switch to the other's. Both of you are responsible for making sure both versions work.

No sharing of code with anyone except your partner. Get help from your partner, from me, from passive sources such as your text, tutorials on the internet, etc.

Implicit in every assignment is that you work hard with your partner. If you're the stronger person on a team I expect that you explain as you go, solicit suggestions from your partner, and so on. If you're the weaker person on the team I expect you to demand such explanations and work hard to contribute. Every time we switch partners I will ask you to evaluate your previous partner, so I will get a pretty good idea of who's behaving appropriately and who's not. Note that these evaluations will not affect either your or your partner's grades. You are required to do them, but I will use them only to have a heart to heart with anyone who is consistently receiving problematic evaluations.