CS 280 01/Zelle May 2018

Internet Programming

Portfolio 1 Assignments (due 5/7)

Read Chapter 1

Answer the questions in the "net_tricks" handout

A nice write-up counts as "extra" towards portfolio credit.

Read the socket HOWTO under links

You can skip the last part (non-blocking sockets)

Simple chat clients

Reverse-engineer the protocol for the simple chat server scsrv.py and the write talk and listen client programs for this server. Your talk and listen clients should take the machine_address and port of the server as command line parameters. For example:

	 python3 talk.py glasscat.wartburg.edu 2001
       

HTTP Echo server

Write a server that listens for http connections on port 2080 and then echos back the headers of the HTTP request that was sent. For example, this is what I see in my browser when I go to the URL, http://localhost:2080/test.it

	 GET /test.it HTTP/1.1
	 Host: zellep50:2080
	 Connection: keep-alive
	 Cache-Control: max-age=0
	 User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like
              Gecko) Chrome/62.0.3202.94 Safari/537.36
	 Upgrade-Insecure-Requests: 1
	 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,
          image/apng,*/*;q=0.8
	 Accept-Encoding: gzip, deflate
	 Accept-Language: en-US,en;q=0.9
       

Note: Your server will need to produce a proper HTTP response in order for this to work. At the very minimum you will need the status line and header fields such as:

	 Connection: Close
	 Content_type: text/plain
       

Read Chapter 2

Personal (or Group) HTML Pages

Create a HTML document either for yourself or a group (real or fictitious) that you are in. Your document should consist of several pages and contain examples of the HTML elements that are used in exercises 2.1--2.14 (pp 93,94) of the textbook. Using audio, video, and organization elements (Sections 2.10--2.12) earns extra points.

Your site does not need to be "serious" or particularly complex, but it should definitely reflect your interests and personality. Looks are not critical, but try to structure the provided information well. Plan out what goes on the main page vs what is in separate pages that you link to.

Read Chapter 3

Add Style to your HTML pages

Use style sheets to make your pages from the previous assignment look nicer. Use an external style sheet to give all your pages some basic uniform look, and use an embedded stylesheet on at least one of the pages to change it up a bit. You may look at style sheets from online sites for guidance, but please try to understand and write your own rules. Do not just copy someone else's style verbatim. If I have any questions about your style rules, I will quiz you.

Course Pages Design Challenge

Create a course.css style sheet to style the index.html and syllabus.html pages for CS 280. You may also modify the embedded style sheets. DO NOT MODIFY THE HTML! If I like a design better than my default version, it earns an "A", and I will use it for the rest of the semester.

Portfolio 2 Assignments (due 5/14)

Skim Chapters 4 and 5

We will spend Monday and Tuesday on Javascript. I am just asking you to skim the Chapters to get some sense for what Javascript looks like and what you can do with it. Much of the textbook material is "old school" Javascript, so I will be doing my own introduction in class.

Shotput Web App

Complete the shotput.js file to make a shotput trajectory calculation web application. The starter html and demo Python app are here.

Adding a nice style sheet counts as bonus points.

Quadratic Equation Solver Web App

Write a web application for solving qaudratic equations. You can use the code in the book as a start, but make use our in-class techniques to turn it into a nice application. Styling earns bonus points again.

Web Site From Scratch

This is a group project (2-4 students) to build a small, self-contained, website including the HTTP server that delivers it. A description of the project is here.

Read Chapter 9

Server-Side Quadratic Solver

Redo the Quadratic equation solver with form processing on the server side using PHP.

Server-Side Shotput

Redo the Shotput simulation with from processing ont eh server side using PHP.

Read Sections 13.1 and 13.2

Portfolio 3 Projects

Book a Band

Use PHP and SQL (along with HTTP/CSS/Javascript) to create the Book a Band website that we discussed in class today. Your database should start with 3 tables:

The homepage provides a table with a summary entry for each band and a list of genres. Clicking on a genre produces a similar page that just lists bands that include that genre, with those for which it is the primary genre listed first. Clicking on a row in the bands table goes to a page for that band that lists all of the information about it. There is also an "add band" link that takes a user to a page that allows them to enter information for their band into the database. Of course all pages should allow for navigation around the site as necessary.

Possible bonus extensions:

Exam 3 Notes

Covers PHP DB access, cookies, and sessions as well as frameworks (Flask and Django as examples). I have posted zip files containing the Flask examples and the Django project in the frameworks folder under handouts.