February 17, 2015

GDF User Guide - Overview

The basic workflow of typical popup dictionary programs is as follows.

  1. Getting the text under the cursor (mouse pointer).

  2. Looking it up in the internal (or external) database.

  3. Displaying a popup window containing the search result.

In Genggoro Dictionary Framework (GDF), each task in this workflow is performed by a separate component, as shown below.

  1. Genggoro Dictionary Client (GDC)

  2. Genggoro Dictionary Database (GDD)

  3. Genggoro Dictionary Server (GDS)

Now, let's look into each component in more detail.

Genggoro Dictionary Client (GDC)

The main functionality of GDC is to get the text under the cursor and send it to GDS. A GDC must be written for each document viewer program (e.g. GDC for Google Chrome™, GDC for Mozilla Firefox®, etc.) as an extension to it.

GDC for Chrome
GDC for Firefox

Links:

Genggoro Dictionary Database (GDD)

The main functionality of GDD is to look up the text passed by GDS and send back the result to GDS. A GDD must be written for each language (pair) (e.g. GDD for Chinese-English, GDD for English-Spanish, etc.) as a Chrome packaged app.

In general, GDDs don't (need to) have any visual elements.

Links:

Genggoro Dictionary Server (GDS)

The main functionalities of GDS are to manage the communication between components and to display search results. The GDS is a central component of GDF written as a Chrome packged app.

There are two versions of GDS, GDS Basic (GDS-B) and GDS Advanced (GDS-A).

  • GDS-B has the basic functionalities mentioned above and is freely available in Chrome Web Store.

  • GDS-A has, in addition to the basic functionalities mentioned above, the ability to customize the look and feel of the popup. It also has the search tool by which you can perform a search for text typed into the built-in search box. GDS-A is given to people supporting the GDF project financially via Patreon in thanks for their support.

Popup of GDS-B
Popup of GDS-A (after customization)
Dictionary Manager
Style Editor (click to enlarge)
Search Tool

Links:

The benefit of GDF

The most important benefit of GDF is that it's easy to add new components.

Let's say you want to write a popup dictionary program for language X. If you make it a GDD (a Chrome packaged app conforming to the GDD specification), you don't have to worry about technical problems already solved by others over and over again like how to get the text under the cursor, how to display search results visually, etc. Instead, you can concentrate on problems specific to your dictionary like improving the search algorithm, dictionary contents, etc. Moreover, once written, your dictionary can be used by any application for which a GDC is available (and the search tool bundled with GDS-A).

The same can be said for GDCs as well. Any application (or any extension to it) capable of talking to GDS using the WebSocket protocol can function as a GDC. For example, someone writes a new GDC for the application Y, the users of that application can use all the existing GDDs from day one.

The architecture of GDF

Links:

  • GDD Developer's Guide (not yet available)

  • GDC Developer's Guide (not yet available)

Next: Tutorial 1

No comments:

Post a Comment