HE186591 HoangAnhQuan Assignment PRJ301
HE186591 HoangAnhQuan Assignment PRJ301
HE186591 HoangAnhQuan Assignment PRJ301
2. A database design
3. System Design
The project used MVC Architecture ( Model-View-Controller ):
Model layer:
Its most important purpose is to connect the database, process data and prepare data for
transfer to other components.
Business Object :
1. Laptop
Represents laptop products
Has attributes such as id, name, inPrice,... of laptop products
Connects to table [Laptop] in database
2. Accounts
Represents customers and admins in shop
Has attributes such as id, fullname, password, username, email, phoneNumber,
gender, birthday, image, role
Connects to table [Accounts] in database
3. Manufacturer, Ram, Cpu, Ssd, Screen
Used to filter different laptop based on Manufacturer, Ram, Cpu, Ssd, Screen
Has two attributes id and name (or detail)
Respectively connects to table [Manufacturer], [Ram], [Cpu], [Ssd], [Screen]
4. Order
Represents order s’information of customer
Has attributes such as id, date, customerId, status, totalMoney, address
Connects to table [order] in database
5. OrderDetail
Represents in more detail of order, it can accommodate more products
Has attributes such as orderId, laptopId, quantity, price
Connects to table [orderdetail] in database
6. Address
Represents address of order from customer
Has attributes such as id, Account, name, address
Connects to table [customer_address] in database
7. Review
Represents customers feedbacks on the product they bought
Has attributes such as id, customerId, laptopId, review, reviewDate, details
Connects to table [Review] in database
8. Cart and Items
Storage product when customer add to cart
Items has attributes such as Laptop, quantity, price
Cart is a list of items
Controller layer:
Servlet :
It receives requests from the user, interacts with the Model to process data, and
then forwards the processed data to the View for presentation to the user.
It includes class such as: AccountServlet, BuyServlet, CheckoutServlet,
ReviewServlet, SignUpServlet, AdminProductServlet,... Each classes has their own
function that manages the flow of information between the user, the data, and
the interface.
Filter :
A component that intercepts and processes requests and responses between the
client and the server before they reach the servlet.
It includes LoginFilter, LoginAdminFilter to prevent user from accessing to area
that are unauthorized.
View layer :
JSP File :
JSP files contain HTML markup mixed with Java code (scriptlets), JSP tags, and
expressions.
Used to dynamically generate the user interface based on data received from the
Model.
JSP files are typically placed within the Web Pages folder. For example, home.jsp,
cart.jsp, shop.jsp, profile.jsp, checkout.jsp, admin_order.jsp,... use to display to
the user.
Sequence Diagram :
New Technologies:
Responsive design : Uses Boostrap framework, jQuery for front–end website.
JavaMail API : Provides an API for sending email in Java applications.
CanvasJS : a JavaScript library used for creating interactive and customizable HTML5
charts.
Coding covention :
Class : UpperCamelCase. Ex: LaptopDAO, Ram
Variable : lowerCamelCase Ex: numberOfQuantity
Method: lowerCamelCase Ex: getAll
4.Screen Shot
Site map :
Home page and shop :
Product detail ,Shoppng cart,Checkout:
Profile:
Hồ sơ, đổi mật khẩu, địa chỉ giao hàng:
User managerment
Create new account :
5. Conclusion
Pros: The website offers users all the essential features of an e-commerce website, making it
easy for customers to look for and purchase products as well as for administrators to handle
things.
Cons: A couple functions require further optimization to make them more user-friendly. There
are some restrictions related to time and the constraints of the technology in use.
Learning experience: Website development helps me enhance my coding skills and thinking,
which gives me insight and experience for future projects.
Future improvements : Attempt to optimize functioning for users. Furthermore, there are
many more services to offer users, such as paying by electronic banking or logging in with
Google.