CS363A part-U

Syllabus

Spring 2004

Instructor part-U: Prof. R. P. Loui, loui-at-cs.wustl.edu

for Part-W see David Butler

Assistants:

M Raquel Bujans rb3-at-cec.wustl.edu
M Marc Pendlebury mp4-at-cec.wustl.edu

Time and Place:

Notice that Part-U and Part-W alternate each week, but keep the same times:
M 12-2 in Sever 201 (lab)
F 12-1 in Busch 100 (lecture)

Texts:

NONE. There will be handouts. You are free to find online help.

Catalog Description:

CS363A Server-Side and CGI Scripting

This course introduces experienced programmers to CGI and other kinds of web programming in several languages: ASP, SQL, PERL/GAWK, PHP. It will investigate input validation and security; search engine, database, and shopping cart applications; using the browser as a generic GUI for applications; customized web design; and some server management. JAVASCRIPT, RUBY, and PYTHON will also be discussed. Equal time will be given to UNIX and WINDOWS platforms. The course will emphasize practical design through small projects.

Prerequisites: programming at a CS101, CS136, or equivalent level, and web design at a CS160 or equivalent level, some UNIX familiarity beyond CS100.

Credit: 3.0 units

Insider Description:

  • this is where we actually teach you cgi programming in a variety of platforms and you think about where all the action is in programming .
  • this is not a team-design course with open-ended objectives; it is a do-your-own-work skill-acquisition and programming-paradigms course with a real grading "curve".
  • there is a lot to learn in this course, and the profs are still trying to learn it too, but the basic platform is incredibly rich and rewarding for interesting and useful software engineering.

    Requirements:

    You get a grade for part-U and a grade for part-W. Each is worth 1/3. For the final third, you will do a final project in your choice of tools. Final project options will be available later in the course. Each part will be graded separately. Part-U will depend on six homework projects (one per week).

    Normal Lab Session:

  • Students are encouraged to bring in their laptops and plug into the network, or else to pair with a NEW student in class each week. Students seen working with people for the second time will be forcibly re-assigned.
  • In each of the part-U labs, you will have two hours to complete a supervised task. Failure to complete the task will result in a small deduction on both students' homework grade that week.

    mini-calendar

       January 2004
     S  M Tu  W Th  F  S
    18 19 20 21 22 23 24
                    LOUI1
    25 26 27 28 29 30 31
       LOUI-LAB1    BUTLER1
    
       February 2004
     S  M Tu  W Th  F  S
     1  2  3  4  5  6  7
        BUTLER-LAB1 LOUI2
     8  9 10 11 12 13 14
        LOUI-LAB2   BUTLER2
    15 16 17 18 19 20 21
        BUTLER-LAB2 LOUI3
    22 23 24 25 26 27 28
        LOUI-LAB3   BUTLER3
    
       March 2004
     S  M Tu  W Th  F  S
    29  1  2  3  4  5  6
        BUTLER-LAB3 LOUI4
     7  8  9 10 11 12 13
    this is spring break week
    14 15 16 17 18 19 20
        LOUI-LAB4   BUTLER4
    21 22 23 24 25 26 27
        BUTLER-LAB4 LOUI5
    28 29 30 31  1  2  3
        LOUI-LAB5   BUTLER5
    
       April 2004
     S  M Tu  W Th  F  S
     4  5  6  7  8  9 10
        BUTLER-LAB5 LOUI6
    11 12 13 14 15 16 17
        LOUI-LAB6   BUTLER6
    18 19 20 21 22 23 24
        BUTLER-LAB6 PROJECTS
    25 26 27 28 29 30  1
        TBA         PROJECTS
    
       May 2004
     S  M Tu  W Th  F  S
     2  3  4  5  6  7  8
    	     final exams begin
     9 10 11 12 13 14 15
     THERE IS NO FINAL EXAM FOR THIS COURSE
     PROJECT DUE DATE TBA
    16 17 18 19 20 21 22
                   commencement
    

    tentative outline

    LOUI1
    	course mechanics
    	cs363 account and directory on wolf and k9
    	comments on gawk as a language
    	  original part of unix
    	  aho, weinberger, kernighan
    	  c-like (more c-like than bash, perl, or c++)
    	  small/easy to learn/easy to master
    	  consistent across time (not extensible!)
    	  fairly consistent across implementations (no libraries!)
    	  powerful and quick
    	  larger programs are surprisingly easy to read
    	  reasonable tradeoff between semantic power and difficulty
    	  some semantic traps
    	  best features:  associative arrays as hashes/regexp matching/parsing upon input
    		auto-initialization/auto-coercion/fundamental types/fairly clean syntax/
    		local variables as procedure polymorphism 
    	  worst features:  lacks support for serious systems programs (though pipes just
    		added)/semantic differences att vs. linux vs. sun/not elegant to look at/
    		slow to loop
    	here
    	GAWK:
    	  checking the directory
    	  #!
    	  saying hello
    	  permissions error : forbidden
    	  script error : internal server error
    	  header error : internal server error
    	  making it visible (linking)
    	  simple system call
    LOUI-LAB1
    	check that students can do all of this and start moving beyond it
    	cp, sftp, ssh file transfer, pico, vi, and dos2unix
    	output that rewrites a form
    		stuffing default values
    		setting hidden values
    	will specify a calculator and make you implement it
    	GAWK:  gsub and split quiz
    LOUI-HW1
    	design your own calculator 
    
    LOUI2
    	GAWK:
    	  get:  ENVIRON variables
    	  post:  getline
    	  multiple named fields
    		& and =
    		two-stage split
    		RS and FS (don't forget to reset them!)
    	  reading from files
    		getline < fname > 0
    		close
    
    	  textarea
    	  special characters
    		gsub
    		sprintf
    		dd
    	  writing to files
    		chmod a+rw
    	  debugging to /tmp files
    		mkdir
    		chmod a+rwx
    	  system security issues
              checking the client IP
    	  setting and reading cookies
    	  using grep on a file as a database query engine
    	  handling images:  djpeg, cjpeg, wc, ls -s, pnmcat
    	  logging and counters
    LOUI-LAB2
    	shopping cart with cookies, shopping cart with session id's
    LOUI-HW2
    
    LOUI3
    	GAWK:
    	  cgi just to vary the html output
    	  re-entering the same script
    	  parsing multi-part file type enc
    	  file locking
    	  input type=image
    	  each pixel a form?
    LOUI-LAB3
    
    LOUI4
    	PERL:
    LOUI-LAB4
    
    LOUI5
    	PHP:
    LOUI-LAB5
    
    LOUI6
    	PYTHON/RUBY:
    LOUI-LAB6