The Technion Electrical Engineering Software Laboratory
"Net-Auction"
Online auction system
Project Book
Directed by: Mr. Maxim Gurevich
Submitted by: Yuri Kipnis
Alex Scheotkin
Table of Contents
3.1 Design goals and requirements 5
3.2 File structure 7
3.3 Data base design 8
3.3.1 Data base diagram 8
3.3.2 Tables' description: 9
3.4 Class structure 9
3.5 Global class diagram 10
3.6 DAL design 11
3.6.1 Design patterns 11
3.6.2 The big picture 12
3.7 BLL design 12
3.7.1 Design patterns 12
3.7.2 Diagram of classes relationships: 13
3.8 PL design 14
3.8.1 Design patterns 14
3.8.2 Diagram of site map: 15
3.8.3 Pages description: 15
3.9 Main algorithms 19
3.9.1 Bidding algorithm 19
3.9.2 Winners announcement algorithm 20
3.9.3 Feedback and vote algorithm 21
3.9.4 Search algorithm 22
4.1 Possible Extensions and improvements 23
4.2 Purchased knowledge 23
5.1 DAL Details: 24
5.2 Methods description: 30
5.3 Installation and deployment instructions: 44
5.4 User Guide 45
-
Abstract
Net-Auction is an implementation of web auction. It is like eBay, Sotheby, and others, but has its original design and bid politics.
The main goal is to provide easy way for buying and selling items (products) over the web. Any person can register in the web site and after that can to present his own products for tenders, to take part in another tenders (add bids), to manage user account, to resell unsold products, rate another users, to be rated and other. Unregistered person may only see common pages with all tenders, products and seller's information.
In addition to there common operations there are used some original marketing solutions. For example, there is an original algorithm for detecting auction winners, based also on the quantity of bought products and user`s money points that has been declared in his account or got in a process of his sells. There was invested much effort to make the web site easy, intuitive and friendly for use. Other features will be described in detail in following parts.
There are few personal goals in this project; to become more familiar with ASP.NET, C#, Microsoft SQL Server, SQL language and a complex of all above.
This project has been built using the ASP.NET 2 framework. ASP.NET 2 is a web application framework marketed by Microsoft that allows programmers to built dynamic web sites, web applications and XML services.
The programming language used in the project is Microsoft C#. It is an object-oriented programming language developed by Microsoft as a part of the .NET platform. It has procedural, object-oriented syntax based on C++ and includes aspects of several other programming languages (Delphi and Java) with a particular emphasis on simplification.
The additional programming tool we used in this project is a Microsoft SQL Server. It is a relational management system (RDBMS) produced by Microsoft.
“Microsoft Visual Studio 2005” is a program environment that was used for project development.
-
Introduction
The work on the project started with learning the main concepts and methods of web programming on ASP.NET 2. There were considered themes like HTTP protocol main methods, HTML objects and programming language.
The next stage was studying C#, its object-oriented concepts, syntax and main libraries included in. After achieving general understanding of web-programming and after consolidation of a project design, it become possible to begin with writing the program code.
On the first stage there were built a SQL data base that included tables, its fields, and table relations. The tables were used for hosting data information for management and administration of the web site. For example, there is a table that includes information about clients that opened their own account on a web site.
On the second stage there were built classes for working with the database. The classes contain main methods, like "Get Data", "Insert Data", "Delete Data" and others, for access a database. The main component used in the process of building it was a "Data Set" object. This object supported by ASP.NET 2 and provides programmers a simple access to SQL server. So the building of a "Data Access Layer" was accomplished. Of course, the work done in this stage will be updated in the future but the main part has been already done.
In the third stage, the main part of the project, "Business Logic Layer", was built. This part includes main algorithms used by the web site. Moreover, it includes classes and methods that connect between a "DAL" and a "PL" – the next part of the work.
The next stage was "Presentation Layer". This part contains a visual building of internet pages and its object functionality. Master page mechanism was used for getting a unique visual structure of site pages. Also was used .scc file for building visual unique objects for most of project pages.
Additional mechanisms that were used in this stage are a sitemap, session object and authentication forms. Some of the tools are present only in the latest version of ASP.NET and others are known from ASP.NET 1.x versions.
The last stage of working on this project was a stage of debugging. The project was brought to a laboratory web server and has been checked for its performances by parallel accessing from laboratory stations. It worked properly.
During the project development three reports were prepared:
-
"Requirements Report" - includes the basic requirements, initial design, basic algorithms and planned timetable.
-
"Design Document" – includes detailed layers design and object relations.
-
"Project booklet" – includes complete description of a project.
In addition there were prepared a power point presentation, placard and a simple website that represents our project.
-
Design
-
Design goals and requirements
This part contains detailed description of project requirements as it was presented at the start of a work on a project.
-
Clients system management goals:
-
Every user needs to register or to sign in before participation in an auction tender.
-
Allows users to present their products for auction.
-
The data base hosts the personal information about all registered users and the historical information about the products they sold and purchases.
-
Every user has his virtual account, updated according to user’s purchases and sells.
-
Every user can rank and add comments about other users he traded with.
-
Products system management goals:
-
Each product should be presented by description field that includes a short review, tender dates and a product picture.
-
The start tender date and end tender date should be fixed by user at the time of opening of a new tender.
-
Each product should have only three available states: before tender, on tender, after tender.
-
After not succeed tender (the product was not sold), the user can remove the product from the site or to fix a new tender dates.
-
There should be exist search tool for searching products by its tags.
-
There should be navigation tool for navigation to product by its category.
-
-
Tender process management goals:
-
In the process of tender, every user should be able to offer his price for each product, and fix a number of items for purchasing. This offer will be approved by offer algorithm. This algorithm would check the biggest offer, number of available items and user money-points.
-
There should be an option to see the current state of winners.
-
At the end of each tender the winners will be declared according to the following conditions:
-
The user is a winner if his bid is the biggest.
-
If the offer is the biggest one but there is no enough items to supply, we check if he agrees to get less items. If he agrees, he is a winner. Otherwise the next offer is been checked.
-
At the end of successful tender the product will be transfer to the history database.
-
File structure
"App_code"
|
Directory
|
contains "DAL" and "BLL" directories
|
"DAL"
|
Directory
|
contains dataset object
|
"BLL"
|
Directory
|
contains BLL classes
|
"Clients"
|
Directory
|
contains pages for user registration and signing in
|
"MyAccount"
|
Directory
|
contains pages for presentation and updating of account information
|
"Products"
|
Directory
|
contains pages for presentation products information
|
"Tenders"
|
Directory
|
contains pages for presentation and updating of tender
|
"Upload"
|
Directory
|
contains uploaded images of products
|
"Images"
|
Directory
|
contains images for presentation layer
|
OAStyles.css
|
File
|
contains visual description of page objects
|
AuctionMaster
|
File
|
site master page
|
Web.sitemap
|
File
|
contains sitemap description
|
Default.aspx
|
File
|
default start page (home page)
|
AboutMe.aspx
|
File
|
about page
|
-
Data base design
Database tables divide for two groups. The first contains tables for administration of the web site, like "Years", "Months", "Countries" and "Categories". The other one contains tables for hosting information about users, tenders, products, history and more.
-
Data base diagram
On this diagram we can see the fields of all tables and relationships between data base tables.
-
Tables' description:
Hosting tables (User can modify its content):
"Clients" – this table contains information about users, registered on the site.
"Products" – this table contains information about all products on the site, there are products that have an active tender ("active" field is sat), products before tender and products that did not sold on its tender ("after tender" field is sat).
"Tags vs. Products" – this table contains pairs of product and tag. We use this table for searching products by its tags. The "Is title tag" field is sat if current tag presents in title, we need it for priority in search algorithm.
"Tenders" – this table contains information about tenders.
"Bids per Tender" – this table contains information about all bids done by users.
"Seller vs. Buyers" – this table contains pairs of seller and buyer. The field "Is voted" sat if the buyer voted for the seller.
"Feedbacks vs. Clients" – this table contains feedbacks of all users.
"Sold Product History" – this table contains information about previous purchases.
Administrative tables (User can't modify its content):
"Categories" – this table contains a list of categories.
"Countries" – this table contains a list of countries.
"Years" – this table contains a list of years.
"Months" – this table contains a list of months.
Table for future use:
"Waiting Clients" – not in use, this table can be used in future for email registration of new users.
-
Class structure
Classes generated by ASP for dataset object:
BLL Classes:
Classes contain main algorithms:
-
Global class diagram
Note: detailed class diagram of BLL relations between classes will be presented in BLL design part.
-
DAL design
-
Design patterns
This layer implemented by using ASP.NET object – dataset. Dataset is a group of classes describing a simple in-memory relational database, were the star of the show in the initial release (1.0) of the .NET. Some of class methods are simple methods for getting, inserting or deleting rows. Others are complicated and use relations between different tables.
Dataset object is represented by “Auction” class. It contains methods and fields allow access to in-memory data and classes for SQL database representation.
-
The big picture
-
BLL design
-
Design patterns
Business Logic Layer response for data exchange between DAL(Dataset) and presentation layer. In this layer were implemented main algorithms and all access operations to the database.
Moreover, it contains two types of classes. The first one is classes that implement BLL algorithms and define objects used by them. The second one is classes that allow access to the DAL Dataset object. Each BLL class of this type contains protected field named “Adapter”. This field references an appropriate Dataset object that represents SQL table and allows access to its fields and queries.
There is an example of creation such a field for “Clients” SQL table:
private ClientsTableAdapter _ClientAdapter = null;
protected ClientsTableAdapter Adapter
{
get
{
if (_ClientAdapter == null)
_ClientAdapter = new ClientsTableAdapter();
return _ClientAdapter;
}
}
Here ClientsTableAdapter is an auto generated class of “DataSet” tool represents “Clients” SQL table.
Example of operating GetClientByClientID query:
Auction.ClientsDataTable DataTable =
new Auction.ClientsDataTable();
DataTable = Adapter.GetClientByClientID(ClientID);
-
Diagram of classes relationships:
All links in this diagram represent composition UML links between classes.
-
PL design
-
Design patterns
Presentation layer contains 20 web pages. All of them use master page – "AuctionMaster" and .ssc file for visual matching of different pages and objects.
There are three session fields that we use for most of pages:
-
"CurrentClientID" – contains client ID of authenticated user.
-
"CurrentNick" – contains nick name of authenticated user.
-
"UserMessage" – contains friendly message for user presented on default page after execution of performs like registration, opening new tender, update performs and more.
-
Diagram of site map:
-
Pages description:
File Name
|
File description
|
Clients/Registration.aspx
|
This page allows registration of new user in the data base of web site.
|
Clients/SignIn.aspx
|
This page allows signing in for registered user.
|
Clients/UserInfo.aspx
|
This page presents information about user. Moreover, it contains tools for voting and writing feedbacks. When we redirect to this page we add POST parameter to query string named "ClientID". This parameter used for filling of presentation tables.
|
MyAccount/Default.aspx
|
It's a default page of my account menu item.
|
MyAccount/History.aspx
|
This page presents information about sales of the user in past. It uses session field "CurrentClientID" to recognize the user.
|
MyAccount/History1.aspx
|
This page presents information about purchases of the user in past. It uses session field "CurrentClientID" to recognize the user.
|
MyAccount/MyTenders.aspx
|
This page presents information about all active tenders related to the user. This page uses session field "CurrentClientID" to recognize the user.
|
File Name
|
File description
|
MyAccount/ProductsBeforeTender.aspx
|
This page presents information about all user tenders that haven't been started yet.
|
MyAccount/ProductsOutOfTender.aspx
|
This page presents information about all user products that haven't been sold on tenders. This page uses session field "CurrentClientID" to recognize the user.
|
MyAccount/PersonalInformation.aspx
|
This page presents personal information of user, moreover the user can update his information here. This page uses session field "CurrentClientID" to recognize the user.
|
Products/Categories.aspx
|
This page presents all available product categories and redirects user to products page of chosen category.
|
Products/Products.aspx
|
This page presents basic information about opened tenders by asked category. On redirection to this page we add POST parameter to query string named "CategoryToView". This parameter used for filling of presentation tables.
|
File Name
|
File description
|
Products/Product.aspx
|
This page presents all information about chosen product, tender of product and owner. Moreover, there is a table of bids on this page.
|
Products/Product1.aspx
|
This page presents all information about chosen product, tender of product and owner. Moreover, there is a table of current winners on this page.
|
Tenders/NewTender.aspx
|
This page allows user to create a new tender.
|
Tenders/NewBid.aspx
|
This page allows user to offer a new bid. On redirection to this page we add POST parameter to query string named "SerialNumber". This parameter uses by search algorithm.
|
Tenders/TenderUpdate.aspx
|
This page allows user to update tender before its start date or after failed tender. On redirection to this page we add POST parameter to query string named "SerialNumber". This parameter uses for identification of tender to update.
|
Default.aspx
|
Default start page.
|
AboutMe.aspx
|
This page contains basic information about this site.
|
File Name
|
File description
|
Products/FoundProducts.aspx
|
This page presents basic information about opened tenders searched by user. On redirection to this page we add POST parameter to query string named "category" and "tags". This parameter uses by search algorithm.
|
There are few screen shots of described web pages in the User Guide appendix.
-
Main algorithms
-
Bidding algorithm
-
Winners announcement algorithm
-
Feedback and vote algorithm
The vote algorithm allows user to vote for another user only if he purchased from him any product. After all purchases the buyer has a new availability for voting.
The algorithm for feedbacks writing is the same like vote algorithm, but every user (buyer and seller all together) can write feedbacks with no limitation.
-
Search algorithm
-
Parse the search string to get the search elements.
-
Get all items from "TagsVSProductsTable" that contain search elements.
-
Compute the number of search elements, separately for title elements and regular elements.
-
Sort all appropriate items by number of elements (high priority for title elements and low priority for regular elements).
-
Dostları ilə paylaş: |