Difference between revisions of "WebFund 2015W: Assignment 2"

From Soma-notes
Jump to navigation Jump to search
(Created page with "'''This assignment is not yet finalized''' In addition to the points below, you also get up to 2 points for overall programming style. In total, there are 10 points. '''The...")
 
 
(6 intermediate revisions by 2 users not shown)
Line 1: Line 1:
'''This assignment is not yet finalized'''
In this assignment you will be modifying the the [http://homeostasis.scs.carleton.ca/~soma/webfund-2015w/code/form-demo.zip form-demo] code from Tutorial 2.


In addition to the points below, you also get up to 2 points for overall programming style.  In total, there are 10 points.  '''The questions below will be automatically graded for everything but style.''' Further details on how to structure your output will be added here soon.
Please submit your answers as a single zip file called "<username>-comp2406-assign2.zip" (where username is your MyCarletonOne username).  This zip file should unpack into a directory of the same name (minus the .zip extension of course).  This directory should contain your modified version of <tt>form-demo</tt> (one version with all code changes).
 
In addition to the points below, you also get up to 2 points for overall programming style.  In total, there are 10 points.  '''The questions below will be automatically graded for everything but style.'''
 
==Questions==


# [1] Make the application listen on port 3200 by default.
# [1] Make the application listen on port 3200 by default.
# [1] Add a "Home" link to the submit results screen (/add) that takes you back to the form screen.  Note that this should be a link (a tag)!
# [1] Add a "Home" link to the submit results screen (/add) that takes you back to the form screen.  Note that this should be a link (a tag)!
# [2] Add a "Phone" field to the end of the form that behaves similarly to all of the other form entries, in all parts of the application.
# [2] Add a "Phone" field to the end of the form that behaves similarly to all of the other form entries, in all parts of the application.
# [4] Implement a simple query interface that searches the previous records for any containing partial matches to any of the filled in fields. The button at the bottom should say "Query" and should cause a new query screen to be loaded. This new screen, once submitted, should return a listing screen (based on the original listing one) that lists only the selected records.
#* the name attribute of the phone field should be "phone"
# [4] Implement a simple query interface that searches previous records for any record containing partial matches to the query in any of the filled in fields. For example, if the user inputs the string "test" and hits submit, the list screen should have all records which have "test" somewhere in one of its fields.  Specifically, this interface should:
#* be a new screen accessible from the main page (/) from a button whose text says "Query"
#* be located at a route named /query
#* contain a form with a single text input whose name attribute is "input" and a single submit button whose action is "/doquery" using a POST request.
#* once submitted, return a listing screen (based on the already existing /list screen) that lists only the records which contain, in one or more of its fields, the input string as a substring.
 
==Solutions==
See [http://scs.carleton.ca/~mbingham/assn2-solutions.zip solution code].

Latest revision as of 11:11, 9 February 2015

In this assignment you will be modifying the the form-demo code from Tutorial 2.

Please submit your answers as a single zip file called "<username>-comp2406-assign2.zip" (where username is your MyCarletonOne username). This zip file should unpack into a directory of the same name (minus the .zip extension of course). This directory should contain your modified version of form-demo (one version with all code changes).

In addition to the points below, you also get up to 2 points for overall programming style. In total, there are 10 points. The questions below will be automatically graded for everything but style.

Questions

  1. [1] Make the application listen on port 3200 by default.
  2. [1] Add a "Home" link to the submit results screen (/add) that takes you back to the form screen. Note that this should be a link (a tag)!
  3. [2] Add a "Phone" field to the end of the form that behaves similarly to all of the other form entries, in all parts of the application.
    • the name attribute of the phone field should be "phone"
  4. [4] Implement a simple query interface that searches previous records for any record containing partial matches to the query in any of the filled in fields. For example, if the user inputs the string "test" and hits submit, the list screen should have all records which have "test" somewhere in one of its fields. Specifically, this interface should:
    • be a new screen accessible from the main page (/) from a button whose text says "Query"
    • be located at a route named /query
    • contain a form with a single text input whose name attribute is "input" and a single submit button whose action is "/doquery" using a POST request.
    • once submitted, return a listing screen (based on the already existing /list screen) that lists only the records which contain, in one or more of its fields, the input string as a substring.

Solutions

See solution code.