Đang tải... (xem toàn văn)
Higher Nationals in Computing
WEBG301: WEB Project ASSIGNMENT
Learner’s name: Trần Thái Hoà, Đào Vĩnh Khang, Lê Thanh Tùng ID: GCS200222
Class: GCS0905B Subject code: WEBG301
Assessor name: PHAN MINH TAM
Trang 3
ASSIGNMENT FRONT SHEET
Qualification BTEC Level 5 HND Diploma in Computing
Unit number and title WEBG301: WEB Project
Student Name 1 Đào Vĩnh Khang 2 Trần Thái Hoà 3 Lê Thanh Tùng 4 X
Student ID 1 GCS200222 2 GCS200783 3 GCS200722 4 X
Trang 4I certify that the assignment submission is entirely my own work and I fully understand the consequences of plagiarism I understand thamaking a false declaration is a form of malpractice
Trang 5Grade: Assessor Signature: Date: Signature & Date:
Trang 7P a g e | 0
Table of Contents Contents Chapter 1: 2
Trang 8What went well 36
What did no go well 36
Lessons learned and further improvements 36
REFERENCES 37
Trang 9P a g e | 2
Chapter 1: Introduction
1 Background information
Our scenario will work on a sales website that specializes in selling Lego items Here we will update and evaluate the latest products and have special offers for potential customers The website will continuously update and cover the product in the fastest way With professional team and young staff, we want to bring great experience to customers Currently our website is accepting requests to make custom products and everyone can guarantee the genuineness of Lego items in our store
2 Project aim and objectives
Customer: To serve the needs of a customer, a person uses the website to view and Find out
about the manufacturer's products, learn about details, contact manufacturer or want to buy
models through the website these different goals users can only view the information on
the website and leave feedback after implementation buy, lean on, cling to; he or she cannot
change the information of the product or the website
Admin: The object that accesses the website to manage the information and data it contains
This user can manage and modify product information (products, customer feedback)
Trang 10
P a g e | 3
Chapter 2: Literature Review
Introduction
It is generally accepted that there are three basic lifecycle approaches to software development, the waterfall approach, iterative development and component-based software engineering This literature review places Rapid Application Development in context as well as looking at some of reasons for the evolution of methodologies
SDLC model
2.1 Introduction to SDLC: The Software Development Life Cycle (SDLC) is a process that follows for a software project, within a software organization It includes a blueprint that describes how to develop, maintain, change, or upgrade specific software
Trang 11P a g e | 4
2.2 Type of SDLC:
General categories of SDLC: • Waterfall Model • Prototyping Model • Agile Model • Spiral Model • Lean Model • DevOps Model • Iterative Model • V -Model
2.3 SDCL model applied in project:
We chose the waterfall model for the Mono sales website design project
Trang 12P a g e | 5
Requirements: Our team analyze the requirements and the specification document to determine the requirements related to the functional and non-functional aspects of the Mono sales project This stage needs the customer's activeness and ends with a document called "Software requirement specification" or SRS (software requirement specification) The Requirement Specification document is the foundation for further activities until the end of the project
- Design: After having the functions and non-functions in the first step, we will shape the software system to meet the requirements of the customer required in the SRS document (software requirement specification) - Implementation: We program everything in the system analysis and design phase
- Verification: The testing step after the code is completed, we will test the entire project system with the participation of the customer to see if the customer accepts it or not
- Maintenance: The final step of the project, which is installation and maintenance when the customer has accepted, this phase will only let the customer use the software and fix software errors if any or change new requirements or add new requirements reduce system functionality
Advantages of waterfall model:
This is a simple model, easy to apply, clear step-by-step process
Trang 13P a g e | 6
Ease of management and maintenance by a linear and fixed step-by-step approach The input and output criteria are clearly defined so it is easy to control the quality Works effectively on small projects, with clear requirements There are many documents provided to customers
Cons of waterfall model:
Not the ideal model for large and long-term projects
Not effective for projects facing unclear requirements from the start
Difficulty adapting to change including requirements, plans, project scope Intuitiveness is low and value is slow to deliver when the end-of-life user sees and uses the product
MVC architecture
MVC is an architectural pattern which means it rules the whole architecture of the applications Even though often it is known as design pattern, but we may be wrong if we refer it only as a design pattern because design patterns are used to solve a specific technical problem, whereas architecture pattern is used for solving architectural problems, so it affects the entire architecture of our application It has three main components:
-Model -View
-Controller and each of them has specific responsibilities
The main reasons why MVC is used are: First, it doesn't allow us to repeat ourselves and second, it
Trang 14• View
Data representation is done by the view component It generates UI or user interface for the user So, at web applications when you think of the view component just think the Html/CSS part Views are created by the data, which is collected by the model component, but these
data aren’t taken directly but through the controller, so the view only speaks to the controller • Controller
It’s known as the main man because the controller is the component that enables the interconnection between the views and the model, so it acts as an intermediary The controller doesn’t have to worry about handling data logic, it just tells the model what to do After receiving data from the model, it processes it and then it takes all that information it sends it to the view and explains how to represent to the user Note: Views and models cannot talk directly
Trang 15P a g e | 8
So MVC is not that easy to understand, it’s hard, but not impossible to learn and every developer needs to keep it in mind when developing an application Just keep in mind that MVC is an architecture that divides your software into smaller components The model deals
with data and the logic of your system The view only displays data, and the controller maintains the connection between the model and the view This ‘division’ enables readability and modularity as well it easier the testing part
PHP Frameworks
4.1 What is PHP Framework?
PHP Framework is very necessary for PHP Developer to do web programming Instead of each time developing an application, you must rebuild functions that have been used many times before, with these frameworks, this "downtime" is minimized
4.2 Why use a PHP Framework?
PHP Framework provides a basic structure to improve the web application development process It can be said that PHP Frameworks are popular because they help speed up the development process Above all, the PHP Framework meets the performance needs of businesses thanks to the responsiveness of websites and applications built with the PHP Framework
4.3 Common PHP Frameworks
Have 10 common PHP Frameworks: Laravel:
Phalcon:
Trang 17P a g e | 10 Zend:
Fat-Free:
PHP-Pixie:
FuelPHP:
Trang 18P a g e | 11
4.4 PHP Framework is used in project:
The PHP used in the website design project is the Laravel Framework Because Laravel helps you speed up the application development process, save you time, increase the stability of the application Reduce the number of times you have to rewrite programmer code
Advantage:
• Getting started is easy
The first reason is that Laravel is extremely easy to use for beginners, even if you only know a little about PHP, you can still develop a website with 5 pages in a few hours
• There is open source code
The free, open source Laravel framework allows you to build large and complex web applications quickly and easily
All you need to do here is install PHP, plus a text editor to get started • Community support
In case you are stuck with difficult bugs, but someone has gone through and guided you, nothing better
Trang 19P a g e | 12
Laravel has an extremely large support library system and is more powerful than other frameworks If you report a bug or a security breach in the Framework, the community response will be very quick
• Follow MVC
The MVC architecture and OOP object-oriented programming are still retained in the Laravel Framework, providing better documentation, and increased performance
• Built on top of the most efficient frameworks
Because it was born late, Laravel inherits the advantages and strengths of other Frameworks, when there is a strong route section A video example is Laravel using some of the best components of Symfony
• Easy Database Migration
Database migration is one of the key features of Laravel It allows you to maintain the application database structure without necessarily recreating it
Database migration also allows you to write PHP code to control the Database, instead of using SQL It also allows you to roll back the most recent changes in the database
• Complete security features
Your application will be safe using the Laravel Framework Laravel's ORM technique uses PDO, insertion SOL
anti-Additionally, Laravel's crsf protection helps prevent cross-site request forgery It's a syntax that automatically escapes any HTML being passed through view parameters, to prevent cross scripting on the web page
What you need to do here is use the appropriate components of the framework
Database
MySQL is an open source database management system (referred to as RDBMS for short) that works under the client-server model With RDBMS stands for Relational Database Management System MySQL is integrated apache, PHP MySQL manages data through databases Each database can have many relational tables containing data MySQL also has the same access and similar code to
the SQL language MySQL was released in the 90s Advantages:
Trang 20database to many servers, or create a MySQL cache
Techniques and Tools
CSS:
Bootstrap:
Trang 21P a g e | 14 JavaScript:
MySQL workbench:
6.2 Tools
Visual studio code:
Xampp:
Trang 22P a g e | 15
Chapter 3: Requirements Analysis
User’s requirements
Functional requirements
1.1.1.Customer roles:
Trang 24P a g e | 17
Use case diagram
Use case
- Users can use the following functions:
- User has 2 main functions and each function has many sub functions - Manage Accounts:
• Login • Log Out • Register - View Product:
• View Product Image • View Product Name • View Product Price
Trang 25
P a g e | 18 - Admin manages higher functions:
Admin has 4 main functions and each of its functions has 3 to 4 sub functions: - Manage Product :
• Update Product • Show Product • Delete Product • Edit Product - Manage Admin Account:
• Login • Log Out - Manage Customer:
• Delete Customer View Infomation Customer - Manage Producer: •• Add Producer
• Delete Producer Edit Producer Show Producer •
Use Case specification
Trang 26ID: UC-2 Priority: High
Actor: Admin and Customer
Descriptions: After the account has entered the main page Preconditions:
Must login to admin and customer account
Actor: Admin
Description :Only admin can add products
Trang 27Actor: Admin and Customer Description:
You must type in the correct product keyword or approximate it to appear
Trang 28P a g e | 21
2.2.5 UC-5: Use Case Name: Search Product
Actor: Admin Description:
As an admin, I want to go through all the categories (Name, Image) so I can see what products the manufacturer currently has
Trang 29P a g e | 22
2.2.6 UC-6: Use Case Name: Search Product
Actor: AdminDescription:
As an administrator, I want to delete categories (Name, photo) so I can delete those that are out of
Trang 30P a g e | 23
2 X
Chapter 4:Design
1 Site map 1.1 User:
Trang 31Fields Data type Constraint Description
Admin_ID varchar(15) primary key Admin’s identificationAdmin_name nvarchar(50) Not null, unique Admin’s name Admin_password nvarchar(30) Not null Admin’s password Admin_email nvarchar(100) Not null Admin’s email
Customer_ID varchar(15) Primary key Customer’s identificationCustomer_name nvarchar(50) Not null, unique Customer’s name Customer_password nvarchar(30) Not null Customer’s passwork Customer_email nvarchar(100) Not null Customer’s emailproduct Product_ID int Primary key Product’s identification
Product_name nvarchar(200) Not null Product’s name Product_price int Not null Product’s price
Trang 32P a g e | 25
Class diagram
WireFrame design
4.1 Home
Trang 33P a g e | 26
4.2 Product
Trang 34P a g e | 27
4.3 Registration
4.4 Login
Trang 35P a g e | 28
4.5 Admin
2 Xxx
Chapter 5:Implementation
1 Application screenshot
1.1 Customer side:
1.1.1 Home page
Trang 36P a g e | 29
1.1.2 Products
1.1.3 Register
Trang 37P a g e | 30
1.1.4 Login
1.2 Admin side 1.2.1 Home
Trang 38P a g e | 31
1.2.2 Product list
Trang 39P a g e | 32
2 Sample source code
2.1 Customer controller
Trang 40P a g e | 33
2.2 Product controller
Trang 41P a g e | 34
2.3 Product controller3
Trang 42P a g e | 35
3.GITHUB Repository:
https://github.com/daovinhkhang/LEGO-Shop
Trang 43
P a g e | 36
Chapter 6:Conclusion
What went well
• The members completed their coding on schedule and fulfilled the requirements • We worked quickly to make things testable
• We discussed issues frequently so they could be resolved
• We had a workflow figured out, i.e how well we can work with each other • Learned a little about technical limitations
What did no go well
• We didn’t follow the design.This could have been easier with flow charts and pictures • We didn’t pay attention to the details that add “fun”.
• Some requirements were not included in the design document Therefore, some of therequired features had to be coded late in the project This rework resulted in adverseimpacts to the project schedule
Lessons learned and further improvements
• After this project, I gained new teammates, a better understanding of coordination andteamwork During the project implementation process, we have gained more experience as well as understood more about the MVC model, Laravel, or Bootstrap Along with learning more about how to manage time between tasks well to ensure project progress is not delayed
• At the same time, in the process of working through the Laravel model, we also improved the programming language mainly PHP, as well as the HTML and CSS languages
Further improvements:
• It takes a lot of practice to use bootstrap to master it Some validation of the admin manager page such as deleting the customer's name to update information, when submitting, the message is required to fill in customer name information while the old name of the customer is still displayed
This is nonsense
• Will deploy more shopping functions for customers
• To control the inclusion and bundling of code, my team will use GitHub - GitHub is a project and code versioning system that acts as a social network for developers Programmers can clone source code from a