Assignment 2


Assignment Description

A small group of friends have started up a web site that displays all the movies that they've seen and reviewed. You have been asked to design a page that allows visitors to read movie reviews that have been written by the web site's staff. At the moment, the staff use a database program to add movie reviews to a database; your current task is only to design the page that displays the reviews. You will not need to do anything that requires data manipulation

Basic Functionality

The main screen consists of a list box that displays the available titles in the database. When a title is selected from the list, a grid displays a lits of the available reviews. For each review available, the grid displays:

The grid also contains a "View" link button. When clicked, the the review item is highlighted and the review text appears in the space below the list box and grid controls.

When the page first loads, the first item in the list box is highlighted, and the text of the corresponding review appears in the space below the controls. In this particular screen shot, I used a FormView control, but feel free to explore your own ideas.

To view a list of the available movie reviews, the visitor can select a title in the list box. Selecting a title in the list retrieves a list of matching reviews for this title in the database. The information about each review is displayed in the grid. The "View" link button is actually a Select button in the grid with the text changed to the word "View".

If the visitor selects a title for which there are no reviews, the grid displays a message "No Reviews Available". This is actually the content of the EmptyDataTemplate of the grid control. You can configure this template any way you wish - you can add controls, text, fonts, whatever. In this example, I used a simple formatted label, but do whatever you want that matches your audience.

One other note about this part of the page's functionality: I used a FormView control to show the review text when the user selects a review item in the grid. You can put anything you like in your FormView template (I used a simple formatted label, but you could also add a plain table with a coloured border or background if you wish). If the user selects a title for which there are no reviews, you may have to make your FormView invisible, depending on what controls and formatting you've placed in the control's ItemTemplate.

When a visitor wants to read one of the available reviews, s/he simply clicks on the "View" link button of the review item they wish to read. Clicking this link button will retrieve the text for this review and display it below the controls. In this example, I used a FormView control that contained one label in the ItemTemplate, but you might choose to do something else.

The Database

When you submit your assignment, you will not be submitting your database; I'll be running your program using my own database server. Therefore, you must ensure that your database follows these specifications exactly. Any deviation from these specs will mean that your program will not run, which will result in a grade of 0.

Database Name: Assign2

Table: Movies

Table: Users

Table: Reviews

Populating the Database

Instead of wasting a lot of time typing in movie data and review information, you may use the following SQL statements to add records to each of your tables. Note that in order for these to work, you must have defined your tables with the exact same structure as defined above.

INSERT INTO [Assign2].[dbo].[Movies] ([Title], [YearReleased],
  [Genre]) VALUES ('Gladiator', 2000, 2);
INSERT INTO [Assign2].[dbo].[Movies] ([Title], [YearReleased],
  [Genre]) VALUES ('Timeline', 2003, 9);
INSERT INTO [Assign2].[dbo].[Movies] ([Title], [YearReleased],
  [Genre]) VALUES ('Spitfire Grill, The', 1996, 2);
INSERT INTO [Assign2].[dbo].[Movies] ([Title], [YearReleased],
  [Genre]) VALUES ('Under the Tuscan Sun', 2003, 2);
INSERT INTO [Assign2].[dbo].[Movies] ([Title], [YearReleased],
  [Genre]) VALUES ('Shipping News, The', 2001, 2);
INSERT INTO [Assign2].[dbo].[Movies] ([Title], [YearReleased],
  [Genre]) VALUES ('Corporation, The', 2003, 1);
INSERT INTO [Assign2].[dbo].[Movies] ([Title], [YearReleased],
  [Genre]) VALUES ('Bowling for Columbine', 2002, 1);
INSERT INTO [Assign2].[dbo].[Movies] ([Title], [YearReleased],
  [Genre]) VALUES ('Revolution OS', 2001, 1);
INSERT INTO [Assign2].[dbo].[Movies] ([Title], [YearReleased],
  [Genre]) VALUES ('Water', 2005, 4);
INSERT INTO [Assign2].[dbo].[Movies] ([Title], [YearReleased],
  [Genre]) VALUES ('Outfoxed', 2004, 1);
INSERT INTO [Assign2].[dbo].[Movies] ([Title], [YearReleased],
  [Genre]) VALUES ('Heroes, Season 1', 2007, 6);
INSERT INTO [Assign2].[dbo].[Movies] ([Title], [YearReleased],
  [Genre]) VALUES ('Winged Migration', 2001, 1);
INSERT INTO [Assign2].[dbo].[Movies] ([Title], [YearReleased],
  [Genre]) VALUES ('Who Killed the Electric Car?', 2006, 1);
INSERT INTO [Assign2].[dbo].[Movies] ([Title], [YearReleased],
  [Genre]) VALUES ('Sneakers', 1992, 7);
INSERT INTO [Assign2].[dbo].[Movies] ([Title], [YearReleased],
  [Genre]) VALUES ('Antitrust', 2001, 7);
INSERT INTO [Assign2].[dbo].[Users] ([UserID], [UserName])
     VALUES ('davidjw', 'David J. Widmann');
INSERT INTO [Assign2].[dbo].[Users] ([UserID], [UserName])
     VALUES ('kaluha', 'Kaluha Cat');
INSERT INTO [Assign2].[dbo].[Users] ([UserID], [UserName])
     VALUES ('missb', 'Bridget Destroyercat');
INSERT INTO [Assign2].[dbo].[Users] ([UserID], [UserName])
     VALUES ('profwendi', 'Wendi Jollymore');

The SQL for the Reviews table data needs to be downloaded because it contains html tags: AddReviews.sql

Bonus Marks

If you have ideas for extra things that you can add to your assignment, they must be approved by your professor. Email your proposed additions to the assignment. Some ideas might include:

View titles by Genre: If you add a Genres table, you can filter the movie list by Genre. The genres table should have the following structure:

The GenreID field is an Identity field (starts at 1, incrment 1) and will be linked to the Genre field in the Movies table.

SQL to create sample data for Genres table:

INSERT INTO [Assign2].[dbo].[Genres] ([Genre]) VALUES ('Documentary');
INSERT INTO [Assign2].[dbo].[Genres] ([Genre]) VALUES ('Drama');
INSERT INTO [Assign2].[dbo].[Genres] ([Genre]) VALUES ('Comedy');
INSERT INTO [Assign2].[dbo].[Genres] ([Genre]) VALUES ('Foreign Language');
INSERT INTO [Assign2].[dbo].[Genres] ([Genre]) VALUES ('Horror');
INSERT INTO [Assign2].[dbo].[Genres] ([Genre]) VALUES ('Television');
INSERT INTO [Assign2].[dbo].[Genres] ([Genre]) VALUES ('Action');
INSERT INTO [Assign2].[dbo].[Genres] ([Genre]) VALUES ('Anime');
INSERT INTO [Assign2].[dbo].[Genres] ([Genre]) VALUES ('Science Fiction/Fantasy');
INSERT INTO [Assign2].[dbo].[Genres] ([Genre]) VALUES ('Children/Family');

Extra user information: You can allow visitors to view information about the staff/users that write the reviews. If you choose to do this, you will need more fields in the users table. Be sure to email this information to your professor before submitting your assignment so that the main database can be updated.


You don't have to follow the same formatting as shown in the screen shots. You may change colours and layout, as long as the final look is professional and neatly organized, and doesn't contain too much whitespace.

Evaluation of the assignment, regardless of which option you choose, is as follows:


ZIP or RAR all project files (.ASPX, .ASCX, .CSS, .XML, image files, etc!) together and email to Make sure I reply within 24 hours (maybe longer if you email me on a weekend) confirming that I received your submission! If you do not hear from me, I did not receive your email.