How does it know 'all'? If there's a product file, it's a product ◦ Each product has a link for viewing that individual product's page ◦ Make a reasonable decision on how much should be shown per-product on this page

computer science

Description

To clarify, and supplement, the requirements for the pages mentioned above: 

• You may not have more than one of any individual product in your wishlist at any time 

• Store product data across multiple files ◦ One product per file ◦ The precise format is up to you 

• A product listing page ◦ Shows all products 

▪ How does it know 'all'? If there's a product file, it's a product ◦ Each product has a link for viewing that individual product's page ◦ Make a reasonable decision on how much should be shown per-product on this page 

▪ Hint: full descriptions of each product aren't reasonable 

• An 'individual product' page ◦ Each product has (at least) a unique identifier, name, description, cost, and image ◦ The specific identifier doesn't matter, so long as it's unique; you can make it predictably autogeneratable, or choose them yourself ◦ The description can be filler, so long as it's at least slightly different for each page ◦ The image can either be base64-encoded within the product entry, or be a separate file (wherein the product's file would indicate the filename for that image) ◦ The cost doesn't matter, so long as it's a number, and isn't identical across all products ◦ Most importantly: this page is a single url, that lists any product (by adding an additional term to the URL, e.g. ?id=xxyyzz) 

• Product files ◦ Make at least five of these ◦ Your listing (and entire site) needs to be able to support an arbitrary number of products 

• Wishlist page ◦ Shows all products in the wishlist ◦ You can remove items from this page 

• Login page ◦ It's perfectly fine to be single-user (since you aren't using databases yet) ◦ Note special requirements for wishlist-merging (both above and below) ◦ The banner (and, by extension, all pages) must acknowledge the login status, and display either a login link, or something to acknowledge being logged in and a 'logout' button 

▪ The login/out element should probably go in the upper-right 

• General usage: ◦ The user, while logged out or logged in, has a wishlist 

▪ If logged out, it's only stored locally (via JavaScript) 

▪ If logged in, there's a list stored on the server ◦ The tricky part: 

▪ If you already have items in your local wishlist when you log in, it's merged with your stored list 

• Remember the prohibition against repetition of items 

• This requires pushing changes to the server via Ajax 

▪ Reminder: you're allowed to make additional helper scripts to help with tricky behaviours 

• This is a PHP and Ajax assignment. Don't try using Python or MongoDB yet! 

• You can add items to your wishlist from either the product overview or individual product listing pages ◦ Simply adding an item to your list should not reload the entire page! 

• In terms of finding all of the files matching a file format in a folder, don't forget globs are a thing


Related Questions in computer science category