Project 1 - An eBook Site
Due - Thursday, March 6, 2008
The goal of this assignment is to complete your centralized eBook site.
Your site will have the following features:
- An HTML-based site that supports search by author or title and browse
by author or title. The URIs supported will be formatted according to the
rules outlined in Lab 3. The site will also provide a main page and
appropriate links between pages. HTML content will be generated by
transforming XML using XSLT stylesheets.
- An XML-based site that provides a REST API for searching by author or
title and browsing by author or title. A developer may issue GET requests
to the following URIs and retrieve XML responses formatted according to
the rules described in Lab 3.
- rest/books/title/{title}
- rest/books/title?startswith={letter}
- rest/books/title?contains={phrase}
- rest/books/author/{name}
- rest/books/author?startswith={letter}
- rest/books/author?contains={partial_name}
- An Upload to Google Docs option that allows a user to upload a
particular book to his/her Google Documents account as described in Lab
5.
- A View My Documents option that allows a user to view his/her
Google Documents account as described in Lab 5.
- New (15 points) - A download book option that
allows a user to download a given book. To support this, you must add the
ability for your site to serve static content (the txt files or the zip
files).
- New (20 points) - An update thread that periodically
traverses a given directory and adds new content stored there to the
existing database. At startup, you may statically configure a directory
where new content will be placed. Periodically, your update thread will
traverse the directory, unzip the files stored there, process the txt
files, and add new entries to your XML database. Move or delete all
processed content so that it is not processed again.
- New (15 points) - A thread-safe database that supports
concurrent read and write requests.
- New (25 points) - An RSS feed that describes books
most recently added to the library. A user will be able to use any RSS
reader to subscribe to the feed at http://{host}/rss. To accomplish this,
use XSLT to transform the XML description of new content into RSS
format.
Update 3/4/08: I will not deduct points if you do not use
XSLT to produce your RSS feeds. Other options are to manually
generate the RSS by building a new XML tree, or to use a 3rd party
library for producing RSS feeds. If you use a 3rd party library,
make sure that you include all relevant classes in your
booksite.jar.
Grading will be based on the points allocated above. The remaining 25
points will be based on the overall design and the documentation of your
program.
Update 2/29/08: I am discovering LOTS of problems running your submissions for Lab 5. Make sure to double or triple check each of the following issues for the submission of your project.
- Do not hard code "localhost". Programatically determine the IP or hostname of the machine on which you are running and use it as the host. If you do not, you will only be able to run a client on the same machine as your server (which doesn't make much sense)! I strongly recommend you test by running your program on one computer and accessing it via a browser on another computer.
- Do not hard code an absolute path that I cannot access. I've seen several Lab 5 submissions that hard code /home/ME/myfiles/... Because I do not have permission to access your home directory, the server is unable to open the files to upload to Google Docs. Some of you have used /home/submit/cs682-s08/ME/myfiles/... That's OK. I have also put all of the files from the sample books.zip directory into /home/public/cs682-s08/booksitedata/
- Many of you have neglected to provide copies of your static files. I recommend that you serve your static files from a subdirectory of the directory where the program is run. With your program submission, include a copy of that subdirectory.
- Your main page should be at the following URI: {host}:3000/books
Due 5:30PM - Thursday, March 6, 2008
- Complete and submit your working code. Place a copy of your source code
and a readme in the submit directory
/home/submit/cs682-s08/username.
Note: No portion of your code may be copied from any other source
including another text book, a web page, or another student (current or
former). You must provide citations for any sources you have used in
designing and implementing your program.
Sami Rollins