Department of Information and Computer Science
Written by: Sadi Evren SEKER Home Page
Instructor: Ender Ozcan Home Page
1.1. Aim of Project
2.1. Analyze of Creation Wizard
2.2. Analyze of GUI
2.3. Analyze of Necessary items in project
3.1. Design of Database
3.2. Design of Web Pages
3.3. Design for Customers
3.4. Design of connections between main entities
4.1. Implementation Environment
4.2. Implementation of Web-pages creation Assistant
4.3.Implementation of Cart System
4.4. Checkout System
5. Interpretation about project
We have wanted to implement an online shop creator. Our program will create shops dynamically and keep track of users. Their orders will be kept in a cart system. And all of data in our project will be dynamic. Number of products, prices, definitions, names and attributes of products are dynamic.
1.1. Aim of Project:
Today acceleration of Internet technologies has reached the peak value. There are many implementations of commercial, personal and educational sites. Unfortunately there are only a few number of online database implementation. Now hot topic of Internet is the online database implementations. There are only a few numbers of online database applications and most are commercial. I think today’s most popular improvement is the online database implementations.
Our purpose is implementation of a flexible online database application. We have selected an online shop design tool. An implementation, which will create another implementation. We will implement our design tool and by this tool any user can create his site with database connections. It has to be flexible because it can be used for any purpose; to sell any product (e.g. CD, books, textile products etc.) or any service can be sold online (for example a web developer may want to sell his maintenance service online, he can advertise his service specialties and prices online and by any request he can give this service).
As discussed above, there is a 3-tiered approach in most of the online database implementations. A database to keep data, web server to serve online pages, and a client to connect and view these pages.
Today’s most of applications use wizard based approach in a new project creation phase. So in our project we will start interface by using wizard-based approach. And creation phases will be passed by using step-by-step data input.
We have created an interface for power user of the system. There should be a simple GUI in the creation phase of project. Any user will be able to create an online shop with no information on programming. So all web pages, database entries and links will be created by project.
We should supply a suitable environment for customers shopping over our online shop. So there will be some web pages for introducing the company info while some other pages publishes the information about products. So these data should be carried on a database. And main idea behind the project is the cart system for customers should be designed for every product in our database.
We have used top-down approach in our design phase. First we have declared that there should be a 3-tiered approach in our system. Then we have declared each tier by their attributes. Then created the connections between these tiers. So in the sub view of our implementation there are 3 different projects:
· Design of Database
· Design of Web Pages
· Design for Customers
a. Design of Database
In our project we use access database, which is randomly selected. So this choice is a recessive effect on our project, it can be easily changed by another database (please refer to connection between tiers subject)
b. Design of Web Pages
Still all web pages are created by our wizard; we should design all design issues. For example the colors of pages and issues like center, bold, horizontal lines etc…
Following snapshot represents a sample product page.
As you can notice above, there are 4 parts for a sample product.
· Name of product
· Definition for a product
· Unit price of product
· Order form for product
Sizes of fonts lines, our creation assistant dynamically creates buttons text boxes.
So the view on this product page is directly read from web-creation assistant database. You can see the record basketball in the following database.
c. Design for customers
We have to keep data about customers. We have to know their address contact info, name etc… So we have designed a user input page for customers.
You can see an example input page for customer info.
As you can notice there is a view of ordered products and their prices. So we have to handle this data and keep it in our database. We use a database mechanism here because someone can want to see his sales and report the customer profile. It is also possible to use only an e-mail system for this form.
d. Design of connections between main entities
We have implemented suitable connection mechanisms for our entities. For example we have used ODBC connection between access database and visual basic database.
As we discussed before there are 3 main entities so the connection between them is as follows:
· Connection between visual basic (web-page creation assistant) and access database (the database to keep products, their information and their prices) is done by using ODBC connection method. So this gives us the flexibility of changing database. There is only a simple line makes connection. If this line is changed to another database, system will start to use this new database.
· Connection between Web-creation wizard and web pages is done by using simple file input/output operations. We have created these files dynamically so users can view and share the pages dynamically. For example there is a product page for each product which forces us to create another main page, which keeps a link, table for all these products.
· Connection between user and products is done by these dynamically created pages. So any customer can view the pages and place their orders without the effect on creation of web pages.
· Information is gotten from users by using PHP. For example we have to keep the information about customer (this data is needed them mailing product to customer) and about the product ordered by customer (again this data will be used in stock). So we have implemented our interface to the database by using PHP. A PHP file is called after the submit event in customer information form and all data shown in customer info page is kept to MySql database by using PHP.
a. Implementation Environment
We have agreed that most of the power users (we assume this user has no information about computer world, internet, databases) uses standard personnel computers with windows. So we have implemented an assistant with graphical user interface to help creation of web pages.
We agreed that the easiest and powerful tool to create windows based, GUI based applications is Visual Basic. So the creation assistant is written by using visual basic.
The temporary data input and output operations in visual basic are implemented on an access database. Because there is a strong relation of using access database in visual basic.
The web pages are created in standard html format. Because we assume that these pages can be published from any environment. Server maybe Linux, Unix, Windows, etc…
The cart system is implemented in Java script. Again it gives the platform independence and many advantages from java environment. We also implemented a cookie system in the cart system to handle the orders from customers.
We have implemented customer information page by using html and at the back of this html forms we have implemented PHP. So on submit event PHP pages will be executed. Reason for selecting PHP technology is because of it is powerful examples in server side scripting.
Customer database is implemented using MySql. I think it is obvious, why we have used MySql, still we use PHP.
b. Implementation of Web-pages creation Assistant
This figure show our initial screen. When our executable file is double clicked this view is displayed. There is a very simple design for dummy users. Only a new directory for the web pages will be selected. They can create their web pages to any directory they want. This may be a local or remote directory. They can either use the tree structure, driver check box to navigate or they can simply type the location on the textbox below.
This piece of code is executed when the next button is clicked. So in this visual basic code next page will be displayed, while constant files are copied to selected location.
Next screen displayed will get the data about the company to show products index page. User should enter the name of company, Address, Telephone and email data for a better reliability on the internet.
Code executed behind the next button is as the code above. There will be a temporary file to keep track of the data inserted by user. And all data in this temporary file is kept in html format.
So it gives us the flexibility for processing data and creating pages on html format.
There is another wizard page to ask for the logo of company. This is an optional part which is implemented for stronger view over internet. User will select the location and the name of logo file from his local hard-disk and this logo will be displayed on index of products page.
You can see the code reads from temporary file and outputs to index.html with an additional image line.
Maybe the heart of the Web-page creation assistant is displayed by this screen there is a database connection to read products info and create the web pages by using these data in database.
Code above will create a product page for each of the product in database. The data in these pages will be inserted by the for loop and values from this database will be inserted in necessary places with given format. There is an important tag that you can notice is
This line connects our pages to java-scripts which keeps the track of cart system. We have included the script instead of typing it to all pages because it would cost more time to load, more space and more complex codes.
So this was the final step of web pages creation phase.
c. Implementation of Cart System
As we discussed in previous chapter (implementation of Web-pages creation assistant) there is a script include statement for every product page.
This is the line which shows order button on product page and executes addtocart() function in shop.js script file.
In shop.js file our addtocart function is as follows:
so we call another function called addto in the same script. That’s why we need to stay in the same page.
This piece of code is the heart of cart system. You should notice the following statement.
This statement writes to cookie by the seperation of ‘+’. So when this data will be parsed we will discuss the help of this ‘+’ symbols. (and also signature oops J)
We have also another java script to show the content of cart. We call it viewcart and this function is called when the customer wants to checkout from system.
This code will be called when a customer wants to view his cart. As you can see there is an array declaration for cookies (we have implemented this to show the cart 20 by 20). And this function calls another functions printtitle, getcookie.
Printtitle function is used to output table title to file
As you can see we have declared a string to keep the table title and output the string to document by using document.write function.
A more important function called getcookie is implemented to parse the cookie files.
This function parses the cookie previously inserted to system. And call printcontent to print the values to screen.
We output the values of order by this function but there is a possible operation to erase the item in viewing his cart. So we have to print the cart info inside a form and put delete function to this form. We have also designed another printcontent function which enables customer to update the amount of product but we don’t put it to project because of some reasons the code is as follows
This erase operation is done by putback function.
putback is the simple function to set the death time of cookie. (I hope it finishes in deadline so future will be freeJ).
4.4. Checkout System
We have implemented the last procedures of cart system by checkout functions. There is another js file written for latest checkout. After a customer clicks checkout the information in his cart and the form asking his info is displayed to the customer. When customer enters his information to the system, our PHP starts to work and the data entered is directly written to the database (which is kept in MySql ).
5. Interpretation about project
Barry Silberstein who is the writer of b2b internet marketing starts his book by the words:
“The consumer world is composed of every suspect, prospect, or customer who considers the purchase of a product for himself, herself or another consumer. The purchase is a “personal” buying decision.”
Still internet has a great range from personal use to world-wide use, it connects companies whose target is whole world and personal users. So internet is the connection point for giants and dwarves. Dwarves has a chance over internet, they don’t need magnificent buildings, great number of workers or genius leaders (I think genius is genius but still they have chance).
By the help of layered companies for last years any single person with any great idea in his mind can be rich over internet.
The only difficulty for this kind of users is a simple e-commerce creation tool. There are many companies working for this kind of users but each has some minuses. I think our project is fills this holes and offers a complete output with databases and web pages for a single user.
By the help of modular programming we can easily update our product to another program which can work with different databases in different platforms.
Everyday, everybody in everywhere talking about e-commerce. There are many people working on e-commerce, many experts for e-commerce, computer science, finance working over e-commerce. There are many customers ordering over internet. Internet is the next frontier for market; a market for everybody, a market in everywhere, a market for anytime, a market for whole world. So somebody should serve a product for dummies in this world. The gained aim of this project is an easy interface for everybody. Also our aims theached us more than any lecture. We have covered many subjects about e-commerce, web technologies, databases and current applications over world.