Shopping Festival

From CS486wiki
Jump to navigationJump to search

== Introduction ==

Shopping Festival is an e-commerce website project for Information System Senior Project. The project’s aim is to create an E-Commerce website. It will use Java on server side and client side, and MySQL on database management. Shopping Festival provides a platform with various kinds of outfits as data. On Shopping Festival Website, guests can reach the products in stocks and information of the products, but they cannot shop due to authorization limitations because they are not user. In order to get authorization, guests are expected to login as a user and if they do not have an account, they will first register and then they should login as user. After user login, they can check items in store by categories which are mainly divided into two categories as women and men. And also if a user wants to, s/he can choose the type of outfit as t-shirt, dress, shoes, etc. once they have selected a gender. Since users have authorization to buy items, the user can select one or multiple items and buy them. In admin panel on website, the admin can add or delete items, users, products or product categories from database. Even if admin has wide range of database actions, there is no direct connection between webpage and database. In a nutshell, Shopping Festival carries almost all the features of today’s e-commerce websites. By finishing this project team members will have more experience in this field and this is the main purpose of the assignment.

Development and Operation Environment

Environment Platform

3 main environments;

  • Java
  • MySQL
  • HTML
  • JavaScript
  • IOS
  • Android

As a helping application, Apache Server TomCat will be used to establish connection between database and working environment. Necessary programs to run the projects are: Netbeans; which runs the Java Servlets and JSP files, WAMP Server; which runs PHP My Admin application to use database from localhost as server and a web browser which is an interface for user to browse the website, for Android part, we will use Eclipse as developing environment.For mobile applications Objective C and Java will be used.

Functions

  • AddProductToStock : Adding existing product to stock
  • AddProduct : New Product adding handler
  • AddCategory : Category adding handler
  • DeleteCategory : Product category deleting handler
  • DeleteProduct : Product deleting handler
  • DeleteUser : User deleting handler for admin
  • AddUser : User adding handler for admin
  • Logout : Logout handler for session ending
  • Search : Search handler for users
  • Registration : Registration page

Source Packages

  • Main Servlet Admin : Main page servlet for admin
  • Main Servlet Guest : Main page servlet for guest
  • Main Servlet User : Main page servlet for user
  • Shopping Cart : Shopping cart session handler for shopping cart
  • Product : Product class for shopping cart

Database and Variables

Database ER Diagram

Database Variables

This database has 8 tables. These tables have their Primary and Foreign keys.

  • Users table, there is one primary key which is UserID. It should be unique and primary because user can has only one id and all other properties are dependent on the UserID.
  • Orders table, there is a primary key which is OrderID and also there is a foreign key,UserID, references to the user table. It should have this foreign key because the database should show the which user has which order.
  • OrdersDetails table, there is a primary key which is DetailID and also there is two foreign keys; DetailOrderID, references to the orders table and DetailProductID, references to the products table to indicate that which product is ordered.
  • ProductOptions table, there is a primary key which is ProductOptionID and also there is three foreign keys; ProductID references to the product table to get the product name and other properties, OptionID references options table to indicate the size or the colour of the product, and OptionGroupID references optiongroups table to indicate that the property of option is color, size or shoesize.
  • Products table, there is a primary key which is ProductID and it is also a foreign key which references to the productoptions table to indicate the product properties.
  • Productcategories table there is a primary key CategoryID which is also a foreign key and references to the products table to indicate the variety of the products, T-shirt, shirt, dress, shoe or something that the admin would add or change to categories.
  • Options table, there is a primary key which is OptionID and it is also a foreign key and references to the productoptions table to indicate the options of the product.
  • OptionGroups table, there is a primary key which is OptionGroupID and it is also a foreign key and references to the productoptiontable to indicate the option group of the options.

Cascade and Restrict

In this database we use cascade option on updates and deletes because the database need to update the refencing table. For example, when we update the OptionID:1 OptionGroupID:1 OpitonName: Red to OptionID:2 OptionGroupID:1 OpitonName: Red and it will update all OptionID:1 to OptionID:2 in productoptions table and that product will be red.

Mobile Programming

There is Android and IOS mobile applications of the website. For Android, java language is written in eclipse and for ios objective C is the language. The mobile versions are working similar, although there is no Admin page for the mobile apps, admins can only reach the website from the original webpage.

Android

File:Mainactivity.jpg