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.
- 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:
- When the page is loaded, the library scans the html for valid DDBC Authority tags and dynamically writes “onclick()” handler functions for these elements.
- 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.
- 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.
- The php script (http://authority.dila.edu.tw/getAuthorityData.php) fulfills the role of web data-provider, performing the following functions:
- Upon receiving a valid http request, it transforms the request into SQL syntax and passes it to the back-end database.
- The SQL response is then parsed into json format and returned to the requesting page.
- 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.