Comp 1841
Comp 1841
Web Programming 1
Title:
Student’s Name: Nguyen Anh Khoi
Student’s ID: GCH221106
Submission Date: 21/08/2024
Word Count:3899
Table of Contents
Standalone Files............................................................................................... 9
I.Abstract
II.
I.Abstract
This project revolves around the development of a web-based platform
designed to facilitate knowledge sharing and mutual support among students
regarding their courses. Built with PHP and MySQL, this platform serves as a
prototype for a simple, standalone question-and-answer system similar to
Stack Overflow. The core functions include creating, viewing, editing, and
deleting questions, as well as managing user accounts and card information.
The main objective of this effort is to promote a collaborative learning
environment where students can seek clarification, share insights, and work
together to overcome academic challenges. This platform encourages active
participation, critical thinking, and problem-solving skills, thereby enhancing
the overall learning experience.
The main results of the project include a fully functional web application that
combines user authentication, CRUD operations for questions, user and tag
management, the ability to upload files for images/screenshots of questions,
and a contact form for administrative communication. The system adheres to
legal and ethical considerations, such as data privacy, accessibility
standards, and compliance with GDPR. Extensive testing, including unit tests
and manual test cases, has been conducted to ensure the quality and
reliability of the platform.
Overall, this project demonstrates the successful integration of PHP and
MySQL technologies to create a data-driven web application that meets the
needs of students, promotes peer support, knowledge sharing, and enhances
the learning experience.
II. Introduction
III. Methodology
To develop the web Q&A platform, we use a comprehensive set of tools and
technologies to improve the interface and ensure an efficient and robust
development environment.
V.Design
Database Schema Design:
The database diagram for the online Q&A platform is the designed to
eficiently store and manage the required data, while ensuring data integrity
and maintaining relationships between different entities.
The diagram includes the following tables:
Files hierarchy:
file hierarchy is very important to manage all the file location, here í the file
structure of the CRUD website system combined with PHP, MySQL, TailwinCSS and
Font Awesome:
Standalone Files
Sitemap
Detailed Description:
- index.php:
Purpose: first place to reduce space:
Features:
+ Authentication:
login:
Register: user who wants to create a new member will go through admin to
add new user.
Home:
Display: display active buttons for students to view details by clicking the
buttons.
Add question:
post question: user can add their own question to the list of posted questions
- Question list: user when entering the question list page can search
previously posted questions:
view question details: display the full content of the question
- edit/delete question: if user has permission, they can customize edit or
delete their own question.
- Contact Us (Contact Admin):
Submit a Question: Users can submit a question form to the admin so that
the admin can receive questions and answers
- Navigation Flow:
Top Navigation: includes links to the home page (dashboard), add questions,
list of questions, contact us are displayed on all pages.
User Interface Design:
Login wire frame:
This page is create for admin to add more student by adding name, email,
username and password.
Module management wire frame:
VI. Implementation
This section outlines the process of implementing the system's CRUD web
application using PHP, MySQL (with PDO) and tailwind CSS. The process is divided
into main areas including environment setup. Building the backend (PHP), interface
design (HTML, tailwind CSS, Font Awesome) and integrating the functions for each
interface.
CRUD Functionalities:
a. Install Necessary Software
- Xampp: Download xampp to run Apache, PHP and MySQL on your own
device(PC or Laptop)
- Visual Studio Code – Code Editing: the system used for development with
many benefis.
b. Setup a project file directory
Create a root folder in “htdocs”for the project, in the root folder system,
folder name wil be “CourseworkFN”
Inside the root folder file will have subfolder files: 'includes' for the
connection part of the local system, 'template' for HTML, and the remaining folders
are for the sub-functions of the system, as for tailwind CSS and Font Awesome will
be assigned to each interface
development part of the direct system.
c. Database Setup
Create MySQL database using phpMyadmin or command line
Import provided SQL files to create tables needed for the system
(author,`question`,`modules`,`messages`, etc.).
set up "Includes/DatabaseConnection" configuration file to manage database
connection using PDO.
1. Database Configuration
Create an “Includes/DatabaseConnection.php” file to manage connections
using PDO:
Layout Design
Use Tailwin CSS to style your page site. Start with basic wire frame layouts
and enhance them with Tailwin’s utility-first classes.
Example for Student layout page:
Figure 23: Example for use Tailwin CSS
Integrate with Backend
-Connect the frontend form and display pages with backend logic PHP.
-Ensure dynamic data rendering by retrieving data from the database and
display it within your HTML template.
Deployment
Deploy the application to a web server (if using Xampp, the application will
be local, if using a live server, configure the application accordingly).
Make sure the login information and database config are set up correctly for
the production enviroment.
Documentation
Document your code base, including details about your configuration,
database schema and any third-party tools or libraries used
Provide a user guide that explain how to use the application, including
features like adding questions and manage profiles.
- Transparency: Using terms of service and privacy rules, clearly notify users
about what data is collected, how it is used, and their rights.
2. Restrictions on Purpose:
- Don't use data for unrelated objectives; instead, only gather it for clearly
defined, precise purposes.
3. Minimization of Data:
4. Precision:
Make sure the data is correct and current and give people the ability to
update their records.
5. Storage Limitation:
Give users an account, keep their personal information only as long as
necessary, and remove their ability to access their records.
6. Security:
7. Responsibility:
Keep track of all data processing operations and confirm that services
provided by third parties adhere to the GDPR.
Users have the right to access their personal data and the ways in which it is
handled.
Users have the right to request that their personal data be erased.
Right to Restrict Processing: Users have the ability to control how their data
is used.
structure.
Right of Objection: People have the ability to protest the processing of their
personal data.
VIII. Testing
Testcase and scenarios
In this project, we will then have to have test cases since these are critical since
they only check on the most important parts of this system to make sure they are
as functional as expected. Besides this, there will be also test scenarios We will also
have test scenarios. The specific ideas are as follows:
Test cases/test scenarios will be presented below.
Test case number one:
Student login with valid credential.
First open the login page:
Click “login”
After that, one message display: