Web Programming
Tufts University
Department of Computer Science
Fall 2009
Assignment 2: The News Deck
Due: Monday, October 19th at 11 PM
Overview
You will create one web page that provides the latest and real-time news pertaining to your field of interest. For example, one of my fields of interest is computer security. This tool will list some of the latest news in the area of computer security, and real-time news on what people are saying with regards to computer security. I can also filter the news by submitting keywords (e.g., "SQL injection").
Instructions
Your deliverable consists of at least three files:
- A PHP file (the web page)
- A CSS file
- A running list of keywords entered, in text format
Your PHP page must read at most 3 remote RSS files pertaining to an area of interest of your choice, parse them, and display the news items. THe PHP file must also use the Twitter API to retrieve real-time "news," using XML or RSS as format for response. See the Twitter API documentation for more information. The page must have a form containing a search box and a button. The purpose of the search box is to filter the news and display only items (if any) pertaining to your search query. You must also keep a running list of all the search queries entered, and display them on the page. At least one CSS must be used to layout the page. The design of the page is up to you. One design idea is to have three columns: the left column of the page for news from RSS files, the middle for the real-time tweets, and the right for search queries.
Important details:
- The page must be refreshed every minute.
- For each RSS news item, the source, title with link to full article, description, and publish date must be displayed. The publish date must be in the format DD/MM/YYYY HH:MI AM|PM.
- For each Twitter tweet, the text, create at date, screen name of poster, and profile image must be displayed. The create date must be in the format DD/MM/YYYY HH:MI AM|PM. Also, all URLs (
http://) and references to Twitter users in the text (starts with @; example: @ctraganos) must be linked.
- Each search term that is displayed should invoke search on that particular term.
Grading
- (2.5 points) Render latest news items from 3 RSS feeds
- (2.5 points) Render real-time information using Twitter API
- (1 points) Search box to filter news, and keep track of search queries in a text file
- (1 points) Filter news provided search query
- (1 points) RSS and Twitter news items adhere to format detailed above
- (1 points) Refresh the page every minute
- (0.5 point) Web page must pass the official traditional XHTML specifications via http://validator.w3.org/
- (0.5 point) Style (e.g., readable PHP and CSS source, good use of comments)
Submitting the Assignment
Post all files and images to your Tufts CS website in a folder named a2 (e.g., http://www.cs.tufts.edu/~mchow/a2/).
Notes
- What we are not doing in this assignment:
- Use a database
- Create a natural language processing search
- Create the second coming of Digg or Reddit
- For now, we will pull the RSS feeds every time the page is is loaded and these are pulled one after the other. Unfortunately, this means that the page is not built until you have pulled the feeds and should one of them hang for some reason, the page build will hang.
mchow@cs.tufts.edu
