Assignment 2
Tasks
Using Perl, JavaScript and HTML, write a CGI application which implements a search engine. The contents of the database for your search engine is your own choice. For simplicity, you may use text files to store the database contents.
Some suggested possibilities for your search engine:
- a people directory system storing addresses, emails, phone and fax numbers.
- a web page search engine storing titles, descriptions, and URLs.
- a dictionary and storing terms and description of terms.
- Basic requirements (marks: 50%)
Your search engine must
- allow access through a web browser.
- have a Help button on every web page, which pops up appropriate instructions in a pop-up window for elements on that page when the user clicks ont he button.
- allow access only if the user supplies a valid username and password.
- allows users to search individual fields in your data, as well as all fields at once.
- return search results in a web page, which includes options of doing extra searches.
- validate that the input from the users are not empty before searching, and notify the user if the inputs are empty.
Advanced features (marks: 25%)
Your search engine should also:
- keep an archive of searches done by each user.
- allow a group of authorized administrators to add, delete, and edit entries to the database.
- Documentation (marks: 15%)
Produce the following documentation for your software in parts I and II:
- Instructions on how to install and start your application.
- Architectural design description - descriptions of the design of your program for future programmers (including yourself) who may change and extend your source code.
- Description of tests done on the final program, with sample inputs and sample outputs - testing should include at least the following data:
- different normal data with results.
- faulty data which returns error messages.
- faulty data which crashes the program (if any) - to show that you know about it.
- A statement of what works and what doesn't, and which requirements you have not satisfied. Test your programs extensively - you will be severly penalised if you claim that a requirement is satisfied but the assessor finds that it doesn't.
- Learning to Learn (marks: 10%)
Read the Learning to Learn document, and complete the information in the two forms:
- Plans. (2%)
- Evaluation of plans and methods. (8%)
Deadlines
A copy of your plans (part IV a) must be submitted directly to your tutor before or during week 8. Internal students must do so during your lab sessions.
The whole assignment (including part IV a) is due at 12noon Monday 15th October 2001 (week 10).
Submission Requirements
The following must be submitted to your tutor before or during week 8:
- A copy of your plans (part IV a) - keep the original for the final submission.
The following must be submitted by 12noon Monday 15th October 2001 (week 10). Internal students should submit to the assignment boxes. External students submit to External Studies Office as normal.
- All scripts and web pages on floppy disk for parts I and II (see *).
- Printed documentation for part III.
- Completed Learning to Learn forms (part IV a and b).
- Printed and completed cover sheet. Internal students must use the internal cover sheet. External students must use the copies sent to you by the External Studies Office.
* Your scripts and pages on floppy disk should be in the same directory structure as what you had on red.murdoch.edu.au where you developed the application. All the files will be copied to a new directory to be assessed. Indicate clearly on your documentation which file is the front page. Use relative links (the simplest way to test whether you have used absolute links is by moving your whole application to a new directory, and see if it still works).
Some guides on working on this assignment:
Most of you will finish part I relatively quickly, but have to spend a significant amount of time on part II, eventhough part I is worth so much more. This uneven marks distribution is deliberate. It is in keeping with most programming tasks, where you have to spend 90% of your time on 10% of the requirements. What it means is, it is relatively easy for you to pass, but you need a monumental effort to get a high distinction.
Do not concern yourself with how the contents of the search engine's database is gathered. You may create an artificial set of data yourself. Make sure they are comprehensive to make the search results interesting (about 10 different types of entries should do). Also, since the manipulation of database management systems (DBMSs) is beyond the scope of this unit, you may use simple text files to store the contents of the database. When you do get on to learning to hook into DBMSs, the CGI principles will remain the same.
Try and satisfy the requirements above in the order that they are specified. This will allow you to build from a very simple system to a more and more complex one, at each stage doing complete testing of what is already implemented. Your tutor can advise you on how to achieve this. Two mistakes inexperience programmers make:
- Write a large program satisfying all requirements at once, then realising it doesn't work and not knowing where to begin debugging.
- Not doing full testing of each section before moving on. When a bug does arise, the programmer is fooled into believing it is something implemented recently, rather than something implemented long ago.
The section of your documentation which describes "Instructions on how to install and start your application" should be very simple. Use the following lines (fill in the blank):
- Copy all files from the attached floppy disk to a CGI-enabled directory on a web server. Keep the files in the same directory structure as on the floppy disk.
- The front page for the application is ............. .html. Start the application by having your web browser access the URL
http://your.server.domain.name/your.server.cgi.directory/............. .html.As in assignment 1, you may choose to fill the forms in part IV using just pen and paper. Presentation is not important in part IV, only the content, so do not waste time formatting the content in a word processor. The purpose of the having you fill the forms is to assess how well you understand the processes you use to complete this assignment, so that you can learn from them and apply them for future tasks.
Part IV (a) is only a plan. You only need to think about how you will approach doing the tasks, without starting any work. Just look at what resources is available to you, think about what you should do, and complete the form. It may turn out you make major adjustments in your methods as you are doing your work - that's OK. The adjustments can all be described in part IV (b).H.L. Hiew
Unit Coordinator
Document author: H.L.
Hiew, Unit Coordinator
Last Modified: Sunday, 02-Sep-2001 20:58:40 MST
Disclaimer & Copyright Notice © 2001 Murdoch
University