Design Doc & Style Guide - sagieske/Appstudio_project1 GitHub Wiki
Design Doc
- list of database tables and fields (and their types) that you've decided to implement Databases:
recipeinfo. Fields:
- recipeID
- Name
- Time
- Ingredients
- Procedure
- Yield
- Description
favorites. Fields:
- recipeID
ratings. Fields:
- recipeID
- rating
- list of classes and methods (and their return types and/or arguments) that you've decided to implement
-
Get_recipeinfo(recipeID): array of all fields of recipeinfo with given recipeID $query = $this->db->where('recipeID', $recipeID); $query = $this->db->get(‘recipeinfo');
-
Get_allrecipeinfo: all fields of recipeinfo $query = $this->db->get('recipeinfo');
-
set_rating(recipeID, rating): a user gives a recipe a rating $data = array(‘recipeID’ => $recipeID, ‘rating’ => $value); $this->db->insert(‘ratings’, $data);
-
set_favorite(recipeID): set favorites $data = array(‘recipeID’ => $recipeID); $this->db->insert('favorites', $data);
-
Get_Favorites(recipeID): get favorite recipe with recipeID $query = $this->db->where('recipeID', $recipeID); $query = $this->db->get('favorites');
-
Get_relevantrecipe: Get all fields of recipeinfo relevant to search query $query = $this->db->where($type, $searchQuery); $query = $this->db->get('recipeinfo');
-
Get_Favorites: Insert field in Favorites database - $query = $this->db->get('favorites');
-
Get_Rating(recipeID): Get rating of recipeID $query = $this->db->where('recipeID', $recipeID); $query = $this->db->get('ratings');
Style Guide
The format of your style guide is up to you, but it should somehow capture the style conventions to which you and your partner will adhere for this app's:
- Jquery will be used for styling layout etcetera.
- HTML tags:
header & footer templates
in head:
( meta name="viewport" content="width=device-width, initial-scale=1") import Jquery In body: (div id=container data-role="page" data-theme="a") (theme to be decided) within div container: (div id=header) & (div id=body) - PHP code: PHP loops to get all information from databases
- SQL queries: See design