Shopping Festival: Difference between revisions
No edit summary (change visibility) |
|||
| Line 54: | Line 54: | ||
=== Cascade and Restrict === |
=== 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. |
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. |
||
== Web Programming == |
|||
===Program Flow === |
|||
Our program starts with index.jsp file this file is a homepage. In our homepage there is navigation bar, search field, and login form. You can navigate between cloth sections without login but when you are in guest mode you cant buy anything from catalogs. There is no buy button in guest mode. But you can still search in database and visit catalogs. Besides from all this there is a home button for return to index.jsp our home page. |
|||
Our navigation bar consist buttons dropdown menus and text fields. In dropdown menus there are categories, which we gather from our database dynamically. Text field is for our search operations and search button is a submit button for the text field. |
|||
Home page consists a login form, which helps guest to login. Our login form you can type your user name and password, or you can go to registiration area. Lets first talk about registiration area. When guest click the registiration button, this button redirect guest to reg.jsp which holds a form for our guest to enter information. In this jsp there are couple place to fill these are; |
|||
(*) Must filled |
|||
*First Name(*) |
|||
*Last Name(*) |
|||
*Email(*) |
|||
*Password(*) |
|||
*City |
|||
*State |
|||
*ZIP |
|||
*Phone |
|||
*Country |
|||
*Address(*) |
|||
*Address2 |
|||
There are couple validations for this form. First one password length can't be longer than 15. The other validation is you can't submit empty the ones with marks. Our program is checking these filleds strings with isEmpty() function. This function returns true if the string is empty. Last validation is more complicated one. In this validation we control if the email is valid or not. |
|||
== Mobile Programming == |
== 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. |
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. |
||
Revision as of 03:15, 13 March 2015
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.
Web Programming
Program Flow
Our program starts with index.jsp file this file is a homepage. In our homepage there is navigation bar, search field, and login form. You can navigate between cloth sections without login but when you are in guest mode you cant buy anything from catalogs. There is no buy button in guest mode. But you can still search in database and visit catalogs. Besides from all this there is a home button for return to index.jsp our home page.
Our navigation bar consist buttons dropdown menus and text fields. In dropdown menus there are categories, which we gather from our database dynamically. Text field is for our search operations and search button is a submit button for the text field.
Home page consists a login form, which helps guest to login. Our login form you can type your user name and password, or you can go to registiration area. Lets first talk about registiration area. When guest click the registiration button, this button redirect guest to reg.jsp which holds a form for our guest to enter information. In this jsp there are couple place to fill these are;
(*) Must filled
- First Name(*)
- Last Name(*)
- Email(*)
- Password(*)
- City
- State
- ZIP
- Phone
- Country
- Address(*)
- Address2
There are couple validations for this form. First one password length can't be longer than 15. The other validation is you can't submit empty the ones with marks. Our program is checking these filleds strings with isEmpty() function. This function returns true if the string is empty. Last validation is more complicated one. In this validation we control if the email is valid or not.
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.
IOS
Android
Main Activity
Main activity has 3 buttons, so user can login, sign up or go to the products page by clicking guest page button. Each button will lead the user to the next related activity.

