Warning, /education/parley/src/practice/DESIGN is written in an unsupported language. File is not indexed.

0001 This file describes the program flow of the practice.
0004 Overview
0005 ---------
0007 The top of the practice window hierarchy is the
0008 PracticeMainWindow. This class owns a few other important classes:
0009  - a GuiFrontend
0010  - a PracticeStateMachine
0012 The frontend controls what is visible to the user.  There is an
0013 AbstractFrontend which defines the API to the frontend and an actual
0014 frontend class called GuiFrontend. The GuiFrontend owns and controls the
0015 main practice window and connects all the buttons (the answer button,
0016 "answer later", "hint", etc), and the image widget.  It also creates
0017 and destroys the practice widget depending on which practice mode that
0018 is chosen at every given time.
0020 Furthermore, it fills the widget with data and extracts the answer
0021 that the user replied.  It also animates the leitner boxes in the
0022 practice modes that use them.
0024 The details of the practice is controlled by the PracticeStateMachine.
0025 It connects the frontend, the backend and uses a SessionManager to
0026 keep track of the entries that are being practiced and also selects
0027 their order.
0030 Sessions
0031 --------
0033 A training session is a set of words that are practiced together.
0035 The SessionManager controls the entries that will be practiced during
0036 the session and the order of them. At the beginning of the session, it
0037 selects the initial set of entries given the boundaries by the
0038 practice settings, the last time each entry was practiced and the
0039 grade / confidence level of the word. During the practice it maintains
0040 a list of entries which are practiced right now, called the "current
0041 entries". These are shown to the user in an order defined by the
0042 session manager until s/he gets one of them right.
0044 There are currently two different SessionManagers to choose from:
0045 SessionManagerContinuous and SessionManagerFixed. The continuous one
0046 keeps a list of active entries and iterates between them until the
0047 user gets one right.  Then it removes this entry from the active set
0048 and includes a new one. The fixed session manager selects a set of
0049 words at the beginning of the training and just shows those. When the
0050 user has gotten all entries right it ends the session and returns to
0051 the main training window.
0054 Practice modes
0055 --------------
0057 Each practice mode uses 2 classes:
0058  - a backend
0059  - a widget
0061 The practice backend implements the methods used by the
0062 TestEntryManager to control the details of the practice. It controls
0063 the flow for one test entry, e.g. giving hints and determining if an
0064 answer is correct or not. It also extracts the user's answer from the
0065 frontend, analyzes it and updates the grades.
0067 There is one concrete backend class per practice mode.  The abstract
0068 backend class, AbstractBackend, also has lots of default
0069 implementations for the methods, and is therefore more of a base class
0070 rather than an abstract class / interface.
0072 The widget shows the question to the user and also the answer.  Many
0073 of the widgets contain sound buttons for question and answer and also
0074 pronounciation labels.
0076 Not all practice modes have their own widgets. Some practice modes
0077 reuse the widget from other modes instead. All modes seems to have
0078 their own backend, though.
0081 Questions
0082 ---------
0084  * It is a bit unclear why the frontend needs to define an API.  After
0085    all there is only one concrete frontend, the GuiFrontend.  Is
0086    another possible frontend a touch based frontend?  Should the
0087    GuiFrontend really be called DesktopFrontend or MouseFrontend
0088    instead?
0090  * ...