ITECH3224-6224 World Wide Web Technology 2
Assignment 2 – Dynamic review site ITECH3224-6224 World Wide Web Technology 2
Details of the weight of the assignment and due date are given in the course description.
Please note: you may adapt the application to the review of anything you wish – within tasteful boundaries – but you should keep the basic schema the same.
For example, you could do reviews of guitars, microbreweries, running tracks, nightclubs, coffees, tv shows, shoes, games, chicken parmigiana or similar. Adjust table names and foreign keys appropriately.
Raccoon Reviews is a website that allows raccoon enthusiasts to connect over their shared interest.
Each raccoon has a dedicated page that shows a photo and a name, a list of reviews, and some form of average rating.
Users can submit new reviews of a raccoon, including their name, some review text, and a rating.
A simple database with two tables contains data about raccoons, and their reviews.
The database has the following structure:
Raccoon(id, name, image_url)
Review(id, raccoon_id, reviewer_name, review, rating)
The assignment tasks are closely associated with the lab work of topics 7 to 10. Code and examples from lectures and labs should be a useful guide throughout this assignment. The assignment requires a number of files and a report to be produced. The report should respond to written tasks that are included below.
Create the database using your MySQL skills. You will need at least 4 raccoons, with at least 2 reviews each.
You may normalize the database if you wish, to include a dedicated “reviewer” table.
Invent your own data – name raccoons after your family, favourite bands, explorers, movie characters, or mythological figures, for example.
Use appropriate data types – in particular Review.review should be a TEXT field to allow long entries.
Review.rating is an integer value from 1 to 5 inclusive, where 5 indicates that this is an amazing raccoon.
XML and JSON markup
Mark up the complete data using XML tags and save it as an .xml file. Check that the file is well- formed and report the method used. Draw a diagram showing the structure of the DOM tree associated with the .xml file, using data from any ONE record. Include the root element, node types, elements and attributes.
Similarly, mark up the complete data using JSON and save it as a .json file. Check that it is valid JSON and report the method used to validate.
Create a RESTful XML or JSON API (your choice), implementing, at minimum, the following functionality.
Use the HTTP method specified in parentheses:
- List all raccoons (GET)
- Should return raccoon id, name and image_url for all raccoons, without reviews
- Use an optional querystring/GET parameter to allow sorting by name & average rating
- Retrieve all details for a single raccoon (GET)
- including reviews
- Create a new review/rating (POST)
- Delete a review/rating (DELETE)
- Update an existing review/rating (PUT)
ITECH3224-6224 World Wide Web Technology 2
Follow HATEOAS (Hypermedia as the Engine of Application State) practices. Include a note in your report about how you have followed HATEOAS.
Under Apache, this step will require configuring a .htaccess file to allow using clean URLs under the api folder (without a .php extension)
- Display a menu of all raccoons. Allow sorting the menu by name and rating
- Display an individual raccoon’s details when the menu item is selected, including the image and the average rating
- Allow the user to submit a new review/ranking, which will be displayed immediately in the review list, and upon which the raccoon’s average will be updated from the server
- Periodically (every 30 seconds), poll the details for the current raccoon and display any new reviews
Note: This task may require finding images to use. Consider using Wikimedia Commons to find images with permissive licenses.
Bonus task (Optional!)
Derive your averaging and sorting code based on the approach listed here:
Additional task for ITECH6224 students
On the topic of “Session hijacking and session fixation” identify four (4) relevant, independent resources. Use these resources to write an essay discussing the topic in your own words.
Take care to cite appropriately. Word count should be 450-550 words (excluding references)
- The theme of the review site (eg. Raccoon Review)
- Statement of completion
- DOM diagram
- Essay task (ITECH6224 only)
- Give details of any assistance received (apart from teaching staff).
Refer to the Course Description for details of submission to Moodle, late assignments, extensions, special consideration, plagiarism, student support, presentation of academic work and adopted reference style.
All files should be zipped and uploaded to Moodle by the due date and time.