Project 2
CS290F Fall 2006 - UCSB Computer Science - Thorsten von Eicken
- Handed out Monday October 16th, 2006
- Part A due Monday October 23rd, 2006
- Part B due Monday October 30th, 2006
Important
- Projects 1 thru 4 are to be done in groups of 2 (two). Each group must hand in a single solution with both group member names on it. If your partner is dropping out of the course, email the instructor as soon as possible.
- A lot of resources are available on-line and in the library. It is great to use these, but please always cite them in your projects.
Objective
In this project you will get started with Rails. Your task is to build a simple site that displays the data you gathered in project 1 and that gives you some simple editing capability.
Part A
The purpose of Part A is for you to define what you will accomplish in project 2 and for us to give you early feedback on these plans. The earlier you complete part A the earlier you will receive feedback and suggestions.
Define the functionality of your project 2 and post a one page description on the course wiki. Your page must be linked off the main project page in the index section and it should include the following:
- The name of your project as well as your names
- A description of the final web site you are planning to build in a paragraph. Separate the "expected" from the "optional" functionality. You could also describe it as "course project" functionality and "dream" functionality.
- Describe where you obtained (and will obtain) the data for your site, give credit to the source.
- Describe the functionality that you will implement for project 2. In particular:
- Describe the models / tables (abstractly, not every field).
- Describe the controllers and their functionality (e.g. "Operate on books: list, search by title or author, show, add to cart").
Important: when you create/edit the page be sure to indicate in the "summary" box just above the "save page" button whether it's final or not. E.g. "create preliminary version" vs. "edited final version". This way we know when to actually read it and post feedback. You should "watch" the page you created so you get notified of feedback.
Part B
Implement your web site according to the Part A descritpion using Ruby on Rails, the WEBrick development server, and a Mysql or PostgreSQL database. Your web site should have the following functionality:
- A database with on the order of 100 records that you fetched in project 1 and a handful of records for each table that you create manually (e.g. users, ratings, etc.). Just enough for you to test the functionality.
- Display all the data in your database, including the relevant relationships between tables. For example, if you have books, and reviews, then the page for a book should list or link to the reviews.
- Allow editing of the data in your database, but not necessarily the relationships. For example, you should be able to edit review text, but not necessarily add/delete reviews from books. To create your data you do need some way to edit the relationships, but you can keep this very crude. The simplest could be to have a text box on each review into which you can manually enter the book_id to which the review belongs. You can then create nice drop-down selection lists in project 3.
- Note that you do not need to implement users and authentication at this stage. It may be helpful to do it now, but it's not required. (Note: use the acts_as_authenticated plugin if you implement authentication.)
- A layout that allows navigation of your entire site. This primarily means you need to have tabs, menus, buttons, or a similar mechanism that allows all web pages to be reached. For example, a "books" tab, and a "reviews" tab, both of which lead to the "list" action of the respective controllers.
In addition, you must do the following:
- Use source code control to manage your code base, we will provide a subversion server for this purpose.
Optional/bonus features:
- Demo your web site on an instance of Amazon's Elastic Compute Cloud.
- Have capistrano deployment scripts to automate loading the production database and deploying production code.
What to turn in
The details here may still change.
- We will schedule a meeting with each group where you will demo your site.
- Turn in a tar archive of your source tree (the Rails tree with the app, config, db, etc. subdirectories) using the turnin program.
- Update your project wiki page.
