Web programming

Units WEB1P and WEB2P

Pre-SWS task 2006-2007s2

Preparation task (Task A)

Your task is to implement a web application that has the following functionality:

  1. It must provide an online address book facility.
  2. The information entered about a person must include the following:
    1. Their name (identifying their firstname(s) and lastname separately), which must be present
    2. Their company/organisation name, which may be absent
    3. Their address, including a valid postcode if it is in the UK
    4. Their phone number, which, if present, can validly be in any one of the formats illustrated below (where spaces are not significant):
      1. +44 (23) 92846438
      2. (023) 92846438
      3. x6438
    5. Their email address, which must be present and in a valid format.
  3. In addition, each entry must contain the date and time when it was last updated.
  4. If the user enters a valid entry, it is added to a list of entries stored as a session variable. The list of a user's entries (showing all the above details) is then displayed back to them.
  5. If the user enters an invalid entry, the system indicates to the user where invalid data has been entered and provides them with an opportunity to correct it.

Validation of entries (where possible) is to be done both at the client and at the server side. However, a checkbox should be provided on the entry form which, if checked, disables client-side checking completely.

The code you produce will form the basis for further development work on the day of the SWS. You will need to hand in the code you write for this exercise as part of the individual assessment of the SWS.

You may either:

Notes

You should develop your code using HTML, JavaScript, Java servlets and JSPs as appropriate.

The code written should be of "good quality", viz. exhibit good layout and readability, and possess good structure (using classes, packages and inheritance where appropriate). The reuse of existing code is encouraged, but must be acknowledged.

Constraints

Resources

The webapp1 web application contains example code that you may find useful in this assessment.

You may find it useful to use some of the Java Collections Framework classes (java.util.*).

Deliverables

  1. There is no formal deliverable for this task, however you will need to bring an electronic version of your work along to the SWS.
 

Last updated by Prof Jim Briggs of the School of Computing at the University of Portsmouth

 
The web programming units include some material that was formerly part of the WPRMP, WECPP, WPSSM and WEMAM units.