Difference between revisions of "Design Document For BID18xx"
(Initial page contents) |
m |
||
Line 77: | Line 77: | ||
) | ) | ||
</pre> | </pre> | ||
[[Category:Design]] |
Revision as of 06:41, 28 October 2020
Introduction
BID18xx has been designed to look and feel as much like BOARD18 as possible.
This means that a couple of the sections of the BOARD18 design document can be applied, for the most part, directly to BID18xx.
These sections are:
BID18xx is a multi page utility which makes use of emails to request input from and report results to the players. This utility moderates the hidden bids that are used to determine player order in games such as 18FL and 18West.
BID18xx Logic Flow
Most of the work of BID18xx is done in two pages, BID18xxStart and BID18xxSubmit.
This section contains links to WIKI pages describing in detail all 4 of the BID18xx pages.
Each such WIKI page list all of the functions contained in that BID18xx page.
The last link below points to a WIKI page describing a repository of common functions used by these pages.
- The index.html page for BID18xx
- The BID18xxStart Page
- The BID18xxSubmit Page
- The BID18xxGoodby Page
- The BID18xxCom File
BID18xx Server Side
The server side processing for BID18xx is done in stand alone PHP programs that
are executed from these web pages via AJAX calls.
Below is a link to a WIKI page containing descriptions of all of these PHP programs.
Database Structure
The BID18xx database is structured as follows:
mysql> show columns from bid_table; +---------------+------------------+------+-----+-------------------+-----------------------------+ | Field | Type | Null | Key | Default | Extra | +---------------+------------------+------+-----+-------------------+-----------------------------+ | bid_id | int(11) unsigned | NO | PRI | NULL | auto_increment | | bid | text | YES | | NULL | | | activity_date | timestamp | NO | | CURRENT_TIMESTAMP | on update CURRENT_TIMESTAMP | +---------------+------------------+------+-----+-------------------+-----------------------------+ 3 rows in set (0.00 sec)
The bid field is a text string containing a stringified JSON data object as shown below.
JSON Data Object
This object contains all of the information about a given bid except for the bid_id.
It is stored in the table as a stringified JSON object called bid and appears to JavaScript
as a JSON data object.
This JSON data object adheres to the following JSON structure:
BID18.bid = array ( 'gameName' => 'nnnnn' 'status' => 'Active', 'updtCount' => 1, 'numbPlayers' => 4, 'players' => array ( 0 => array ( 'order' => 1, 'name' => 'player1', 'email' => 'player1@example.com', 'status' => 'Pending' 'bid' => 0, 'urlKey' => '??????????', ), . more players . ), )