شرکت اهواز با مسئولیت محدود شرکت توسعه وب

Ahvaz

A Web Development


                                                                                    Online Book Shop   

Technologies Used 

Front-end: HTML5, CSS3, JavaScript, JSP (Java Server Pages)

Back-end:Servlets, JavaBeans, JDBC

Framework: Struts 2 

Database: MySQL

Server: Apache Tomcat

Additional Tools: Bootstrap for responsive design  

Java Server Pages (JSP):
JSP is used to create dynamic web pages that interact with the user.
It represents the View in the MVC architecture, displaying data from JavaBeans and allowing users to
 input information via forms.
JSP pages can embed Java code directly within HTML to produce dynamic content.

Servlets:
Servlets are server-side Java programs that handle client requests and responses.
They act as the Controller in the MVC architecture, managing the flow of data between the user 
interface (JSP) and the backend logic or database.
For example, a servlet may handle login requests, process transactions, or update account details.

JavaBeans:
JavaBeans are reusable software components used to encapsulate data.
In the project, JavaBeans are used as the Model objects to store and transfer data between the 
different layers (Controller, View, and Database).
They follow the standard convention of having private fields with public getter and setter methods.

JDBC (Java Database Connectivity):
JDBC is a Java API that enables Java applications to interact with databases.
It is used in the project to connect to the MySQL database, execute SQL queries, and retrieve or
 update data such as customer details, account balances, or transaction history.

Struts Framework 2:
Struts 2 is an MVC (Model-View-Controller) based web application framework for developing Java EE
 web applications.
It helps separate the business logic, presentation layer, and data management, making the application 
easier to maintain and scale.
It provides features like form validation, internationalization, and tag libraries for building 
dynamic web interfaces.

MySQL:
MySQL is the relational database used to store all the application's data.
It contains tables for users, accounts, transactions, and other entities required by 
the system.
It works with JDBC to provide a reliable data management backend.


                                        E-Commerce Enabled Web Application 

The fundamental functionality that an online store requires is a shopping cart.

A shopping cart allows users to browse through products and select the items they wish to purchase.
In this project, the shopping cart was modelled using JavaBeans, which manage product information 
and maintain the list of selected items during a user’s session.

 Project Overview 

The project consists of the following main components:

 Product Catalogue Page 
Displays the list of available products retrieved from the database.
Each product entry includes details such as product name, description, price, and an “Add to Cart” option.

 Shopping Cart Page  
Displays all products added by the user.
The user can review, modify quantities, or remove products before checkout.
The total price is automatically recalculated whenever changes are made.

 Checkout Page 
Collects the user’s shipping and payment information.
This step ensures that accurate delivery and payment details are obtained before finalizing the order.

 Order Processing Page 
Stores all shipping, payment, and order details in the database using JDBC.
This confirms the order and creates a record for future reference or order tracking.


 Workflow Explanation  

The user visits the product catalogue page, where product data is dynamically fetched
 from the database using JDBC and displayed via JSP.

When a product is added to the shopping cart, the details are stored in a JavaBean 
object, which keeps track of items during the user’s session.

On proceeding to checkout, the Servlet handles form submission, validating the shipping
 and payment details entered by the user.

Once confirmed, the order information (including user details, selected products,
 quantities, and payment information) is stored in the MySQL database.

Finally, a confirmation message or page is displayed, summarizing the user’s order details.