From 5a5694f4336788fef2ebc3d05a57062e468432c3 Mon Sep 17 00:00:00 2001 From: OGordoo Date: Tue, 3 Mar 2020 11:56:12 +0000 Subject: [PATCH] audit forum and sqlite --- subjects/forum/forum.audit.en.md | 66 ++++++++++++++++++++++++++++++-- subjects/forum/forum.en.md | 29 +++++++------- 2 files changed, 75 insertions(+), 20 deletions(-) diff --git a/subjects/forum/forum.audit.en.md b/subjects/forum/forum.audit.en.md index 86a648aba..4f4875c4d 100644 --- a/subjects/forum/forum.audit.en.md +++ b/subjects/forum/forum.audit.en.md @@ -1,6 +1,24 @@ #### Functional -###### Has the requirement for the allowed packages been respected? +##### Enter the website as a non-registered user. + +###### Are you able to see posts/comments? + +##### Enter the website as a non-registered user. + +###### Are you prohibited to create a post/comment? + +##### Enter the website as a registered user. + +###### Are you able to create a post/comment? + +##### Try creating a post as a registered user. + +###### Are you able to choose a category for that post? + +###### Is the forum composed of services? + +#### SQLite ###### Does the code contain at least one CREATE query? @@ -8,9 +26,49 @@ ###### Does the code contain at least one SELECT query? -###### Are there HTTP requests between the database and the server? +###### Does the code contain at least one DELETE query? + +###### Is the use of the sqlite3 command missing from the code? + +##### Try registering in the forum, open the database with `sqlite3 ` and perform a query to select all the users (Example: SELECT * FROM users;). + +###### Does it present the user you created? + +##### Try creating a post in the forum, open the database with `sqlite3 ` and perform a query to select all the users (Example: SELECT * FROM post;). + +###### Does it present the post you created? + + +###### Did the server behaved as expected?(did not crashed) + +###### Does the server use the right [HTTP method](https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods)? + +###### Has the website runned without crashing at anytime? + +###### Are all the pages working? (Absence of 404 page?) + +###### Does the project avoid [HTTP status 400](https://kinsta.com/knowledgebase/400-bad-request/#causes)? + +###### Does the project avoid [HTTP status 500](https://www.restapitutorial.com/httpstatuscodes.html)? + +###### Are the libraries used allowed? #### General -###### + - \ No newline at end of file +###### +Is the database a service? + +#### Basic + +###### +Does the project runs quickly and effectively? (Favoring recursive, no unnecessary data requests, etc) + +###### +Does the code obey the [good practices](https://public.01-edu.org/subjects/good-practices.en)? + +###### +Is there a test file for this code? + +#### Social + +###### +Did you learn anything from this project? + +###### +Can it be open-sourced / be used for other sources? + +###### +Would you recommend/nominate this program as an example for the rest of the school? \ No newline at end of file diff --git a/subjects/forum/forum.en.md b/subjects/forum/forum.en.md index 001d6c4d5..d184b22e3 100644 --- a/subjects/forum/forum.en.md +++ b/subjects/forum/forum.en.md @@ -5,13 +5,12 @@ This project consists in creating a web forum that allows : - communication between users and the community through the creation of posts/comments. -- non-registered users to only see posts/comments. -- registered users to like or dislike posts/comments. - associate posts to categories. +- non-registered users to only see posts/comments. Your forum should work based on services. Using services to create a project means that instead of having a monolith architecture, you actually have various components distributed across a cluster of instances. In other words, dividing the project in smaller "projects", this way it becomes easier to understand and your project will become more scalable. -- For example for a taxi like application you can divide it in : passenger management, billing, notifications, payments, trip management and driver management. +- For example for a taxi like application you can divide it in the following services : passenger management, billing, notifications, payments, trip management and driver management. You can learn more about this [here](https://www.nginx.com/blog/introduction-to-microservices/). @@ -37,18 +36,17 @@ To know more about SQLite you can check the [SQLite page](https://www.sqlite.org student$ sqlite3 database.db SQLite version 3.29.0 2019-07-10 17:32:03 Enter ".help" for usage hints. -sqlite> CREATE TABLE people (id INTEGER PRIMARY KEY, first_name TEXT, age INTEGER, gender TEXT); -sqlite> INSERT INTO people (first_name, age, gender) VALUES ("John", 23, "m"); -sqlite> INSERT INTO people (first_name, age, gender) VALUES ("Jade", 36, "f"); -sqlite> INSERT INTO people (first_name, age, gender) VALUES ("Kim", 49, "f"); -sqlite> SELECT * FROM people; -1|John|23|m -2|Jade|36|f -3|Kim|49|f -sqlite> DELETE FROM people WHERE gender="m"; -sqlite> SELECT * FROM people; -2|Jade|36|f -3|Kim|49|f +sqlite> CREATE TABLE car (id INTEGER PRIMARY KEY, brand TEXT, year INTEGER); +sqlite> INSERT INTO car (brand, year) VALUES ("Mercedes", 2010); +sqlite> INSERT INTO car (brand, year) VALUES ("Volvo", 2018); +sqlite> INSERT INTO car (brand, year) VALUES ("Nissan", 1999); +sqlite> SELECT * FROM car; +1|Mercedes|2010 +2|Volvo|2018 +3|Nissan|1999 +sqlite> DELETE FROM car WHERE year>2000; +sqlite> SELECT * FROM car; +3|Nissan|1999 sqlite> ^C^C^Cstudent$ ``` @@ -116,7 +114,6 @@ This project will help you learn about: ### Instructions - You must use **SQLite**. -- You must use **SQLite** queries. - You must use HTML files. - You must handle website errors, HTTP status. - You must handle all sort of technical errors.