info2300-2020sp-website

Project 2: Dynamic Website Backed by a Database

Create a small catalog website that displays any collection of objects in a database. For this project, you’ll store the data for your catalog in a SQLite database. You’ll then write a PHP web page to read the contents of the database and then present the data in a usable form for the web.

Learning Objectives

Deadlines & Receiving Credit

Milestone Points Grading Method Sip Days Deadline
Milestone 1 (p2m1) 15 Feedback (completion) Not Permitted 2/27, 4:00pm
Milestone 2 (p2m2) 15 Feedback (completion) Not Permitted 3/5, 4:00pm
Final (p2fin) 100 Rubric (p2m1 + p2fin) Maximum: 2 days 3/12, 4:00pm

No slip days permitted for milestones. Late submissions will receive a 0.

Milestones are graded twice. First for feedback (completion grade only). Lastly, for points at the final submission (via rubric). All work is graded via rubric for points at the final submission. Use your milestone feedback to improve your final grade; revise milestone work prior to final submission.

Completion credit will be awarded so long as you made a good faith effort to complete the milestone’s requirements. Very obviously incomplete milestone submissions will receive a 0 for the completion grade.

Milestone feedback is not a pre-grade. This feedback is designed to catch large problems (which we sometimes miss). Regardless of the feedback (or lack of feedback) that you get, you are responsible for meeting all of the project’s requirements for the final submission.

Failure to push your submission to GitHub is equivalent to not submitting the assignment. You will receive a 0. It is your responsibility to verify that you submitted your assignment.

Git Repository & Submission

Clone git@github.coecis.cornell.edu:info2300-2020sp/YOUR_GITHUB_USERNAME-project-2.git. Replace YOUR_GITHUB_USERNAME in the URL with your GitHub username. This is usually your NetID.

Submit all materials to your GitHub repository for this assignment. See README.md in your Git repository for submission instructions for each milestone. Never email your submission to the instructor.

Tip: Commit and push your changes every time you work on your project. Every time you commit and push you store your changes on the GitHub server. This acts as a back-up for your work. It also means that if you forget to submit before the deadline, there’s something already on the server that the TAs can grade for partial credit.

Documenting Design (Design Journey)

We will grade your design-journey.md in VS Code’s Markdown Preview. Everything, including images, must be visible in VS Code’s Markdown Preview. If it’s not visible in VS Code’s Markdown Preview, then we won’t grade it. We won’t give you partial credit either. This is your warning.

If you included images in your design journey, they must be visible in VS Code’s Markdown Preview. No credit will be provided for images in your repository that are not properly linked in Markdown. No credit will be given for design work not included in the documents/design-journey.md file; do not rename this file or put your answers in another file! Remember to check and test all assignment submissions!

Requirements

Create a small catalog website that displays any collection of objects in a database.

Examples of catalogs you might consider include:

For example, your collection might look like the following on the index page: | Title | Actors | Genre | Rating | | ————— | ———————————– | —————– | —— | | Shrek | Mike Myers, Eddie Murphy | Adventure/Comedy | PG | | Despicable Me | Steve Carell, Chris Renaud | Comedy/Animation | PG | | Toy Story | Tom Hanks, Tim Allen | Fantasy/Adventure | G | | Treasure Planet | Joseph Gordon-Levitt, Emma Thompson | Romance/Adventure | PG | | The Iron Giant | Vin Diesel, Jennifer Aniston | Action/Adventure | PG |

Important! Image gallery catalogs are prohibited for this assignment. (Image gallery is for Project 3 when we learn how to do file uploads!)

Catalog

Database

Planning

Constraints

Seed Data

Design

The goal of Project 2 is to help you understand how to back a website by a database. Design is always important, but just remember that in this project we are focusing a bit more on the technology.

Site Design

Design Process

Website

Planning

Functionality

Database

Security

Implementation Constraints

Best Practices

Your assignment should follow the coding standards, conventions, and expectations of this class. See Project 1 if you need a reminder for some of them.

All code should be easy to read and understand any 2300 student. Use functions and includes to help organize your code. Make use of comments to explain things that aren’t obvious. Name your functions and variables appropriately. Your code should be indented properly. Test your add entry and search forms extensively.

Milestone 1: Plan your Catalog

Complete the sections labeled “Milestone 1” in the design journey. Plan your catalog, your catalog’s target audience(s), and explore design patterns for catalogs similiar to yours.

Note: You need at least 1 target audience but you may have more depending on your catalog/site.

Milestone 2: Design, Plan, & Draft Website

Design and plan your website and database in the design journey; complete the “Milestone 2” sections of the design journey. Code a draft version of your website.

Plan your Site

In the design journey thoroughly document your design process for your site.

Plan your Database Schema

Plan out your database schema in the design journey.

Think about the following questions:

Plan your Database Queries

You’ll need at least three (3) database queries: 1) retrieve all results, 2) search the results, and 3) insert a record into the database. Describe your plan for these queries in the design journey. You may use natural language, pseudocode, or the SQL queries themselves.

Example:

Natural Language/Pseudocode: Select all records and all fields from the movies table.\ SQL: select * from movies;

Populated Database/Seed Data

Using DB Browser for SQlite, populate your secure/catalog.sqlite database with your seed data.

IMPORTANT! Do not run the PHP Server and DB Browser for SQLite at the same time! This can cause your database to become corrupted. If you need to modify the database, stop the PHP server and then open DB Browser. When you are done with DB Browser you must exit it before you restart the PHP server.

Draft Website

Code up your design and produce a draft website. You don’t need to implement any calls to the database yet. But the website (HTML, CSS, PHP partials, forms, etc.) should mostly be done.

Final Submission: Complete & Polished Website

For the final submission, finish implementing your designed and planned website. Your final site should be complete and polished. All catalog content should be populated from the database and both forms should be fully functional.

Complete the Reflection in the design journey.

Reminder: All design/planning images must be visible in your design journey when using VS Code’s Markdown Preview. No credit will be provided for images in your repository that not properly linked in Markdown.

Test your final web site thoroughly, especially your forms. We will try to break your web page during grading. Make sure that we can’t inject HTML or SQL.