Project 1, Part 2

Marvel Character Lookup from Web Page
Due: Oct 4, 11:55 pm

Moodle Link



To take the code from project one that allows the looking up of Marvel Characters with an inverted index, and create a web version. Rather then write this from scratch you will reuse and modify the code from part one, as well as the provided code for the US Census name lookup program.

Minimum Functionality:

  1. Enter in a name or year to search for.
  2. Display the number of matching character.
  3. Allow the user to select a character to see complete information
  4. Allow user to go to the characters Marvel Wiki character page. All you have to do is append the third item in the character data (urlslug) to the end of " "
Additional Functionality
  1. Multi name search.
  2. Show a picture of the character in the page.
  3. ???

US Census Name data program

You have been given the code to look up names in the US Census data. The architecture of the solution is seen below:


The code for this US Census Name Data lookup system is located at (c++) or (Python)

Clone the program to your folder

For C++ Type: "git clone"

For Python type: "git clone"

Change the names

You will need to change the programs in two files to make it work correctly for you. You can use textwrangler or notepad++

1. Change the Makefile

Copy this project into a new folder in your folder. Then change the "user= skon" in the Makefile to be "user=username" where username is your server username.

2. Change the reference to the CGI program in the HTML file

For C++ in namelookup.js change the line:"GET", "/cgi-bin/skon_namelookup.cgi?"

Or for Python in namelookup.js change the line (44):

     url: "/cgi-bin/",

so that skon is now your username. This makes sure your code is copied to the right directories, and with the correct names.

Run the program

To run the system go to the project folder (see above) in a ssh terminal.

  1. Make the project: make
  2. Go to your folder with a browser, and open namelookup.html

Create a new project

You will need to make a copy of the nameserver folder to use as the wtarting point for the new Shakespeare project. From your main directory make a copy (C++ version):

cd ~
cp -r namelookup marvelproject2

or for Python:

cd ~
cp -r PythonNameLookup marvelproject2

You will then need to change the file names, and then change the Makefile to make the changes in the filenames. You are required to use a makefile for this project.

Marvel Lookup Program

In project 1 you created code to lookup characters in the Marvel database. You will combine that code with the code from this US Name data system to make a web version of your Marvel Character Lookup Program.

You will need to modify the program to serve up Marvel Character information

  1. Make a copy of the Name Lookup program (C++ or Python)
  2. Rename the files as appropriate, change the Makefile to reflect these changes
  3. Modify the the HTML and Javascript from the Name Lookup. You will need to change the name of the program called in the $AJAX command to match your program (and name). You will need to modify them to collect and send the type of search (name or year), and the search string (s). (You only need to send the search string if you only have a single index).
  4. Modify the CGI program (renamed from namelookup.cpp or to receive a search type and word from the web page, lookup the lines with the matching words matching lines back, and send them to the web page.
  5. Make the user interface look good, and be easily usable by the casual user.
  6. Add in any extra features.


Below is a list of features you can put in your program, along with the points. Notice that people with Data Structures must do more than students with only the introduction course to get 100 points (the perfect score) on the program. If you do more than 100 points, you getr= extra credit.

RequirementData StructuresIntro ProgCommentsScore
Name Match - Program displays the number of matches, shows matching characters for each name entered on the web page. 30 60
Year Match - Program displays the number of matches, shows matching characters for each year entered on the web page 30 60
Program shows the picture of each character (you have to figure this out!) 10 15
Program allows the searching for two names on the same line. 15 20
Well designed User Interface* 10 10
Program broken up into functionally cohesive functions* 10 10
Program has meaningful comments, good variable names, and good formatting* 10 10
Program uses appropriate classes 10 10
*These are required in order to get extra credit.

Turn in

  1. The program must be runnable.
  2. All source files you authored
  3. A writeup with the table above, and an indicated of which was included. Paste table into Moodle text field, and put X's in to options you attempted. Also include a statement of the highest computer science course you have taken.
  4. Several runs showing all features.

This topic: Main > WebHome > SoftDev2019 > SDProject1-2
Topic revision: r1 - 2020-01-23 - JimSkon
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2020 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback