DILA logo

Framework / Architecture

DDBC Authority Database Architecture Diagram

The system model for the Pop-up Annotation Service consists of three important components: a JavaScript library, a php script and a back-end SQL database.

  1. The JavaScript library (http://authority.dila.edu.tw/webwidget/popup.js) will be embedded in a web page and used to provide some front-end functions:
    1. When the page is loaded, the library scans the html for valid DDBC Authority tags and dynamically writes “onclick()” handler functions for these elements.
    2. When the “onclick()” event is triggered, the handler function parses the tag’s attribute values into a http request which is transmitted to the php script located at the DDBC Authority server.
    3. The http response, in JavaScript Object Notation (json), is parsed and a css-styled pop-up element is generated. The query result is then displayed to the viewer of the page.
  2. The php script (http://authority.dila.edu.tw/getAuthorityData.php) fulfills the role of web data-provider, performing the following functions:
    1. Upon receiving a valid http request, it transforms the request into SQL syntax and passes it to the back-end database.
    2. The SQL response is then parsed into json format and returned to the requesting page.
  3. The back-end database stores and organizes the raw data of the Authority Database. It is a server-side service, and only accepts queries from the php script.