1 | cv-dialog-sdk
|
2 | =========
|
3 | [![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg)](http://commitizen.github.io/cz-cli/)
|
4 |
|
5 |
|
6 | This is the Catavolt Javascript Software Development Kit
|
7 |
|
8 | This SDK provides easier access to the [Dialog REST API (OpenApi)](https://dialog.hxgn-api.net/v0/openapi.yaml)
|
9 | which can be viewed with an [OpenApi Viewer/Editor](http://editor.swagger.io)
|
10 |
|
11 | ## Installation
|
12 | npm install --save cv-dialog-sdk
|
13 |
|
14 |
|
15 | ### The Catavolt Dialog Model
|
16 | The Catavolt Dialog Model represents an '***Abstract User Interface***', managed by the server, and delivered to the
|
17 | client (this SDK) to be used as an instruction set for rendering the client's UI. This system differs subtley, but
|
18 | significantly from traditional client/server architectures in that rather than targeting a specific resource (i.e.
|
19 | next page), the client simply asks the server to redirect it to the 'next' resource (often without knowing
|
20 | specifically what that resource will be).
|
21 |
|
22 | The **Dialog** abstraction itself, is a metaphor for a current channel of communication or more simply, a current
|
23 | resource. A **Dialog** contains information describing the UI itself, as well as any 'business data' that should be
|
24 | displayed. A **Redirection** is a pointer to the next **Dialog**. An **Action** is a submission or instruction to the
|
25 | server (to do 'something').
|
26 | A typical **Dialog** application flow is comprised of:
|
27 |
|
28 |
|
29 | 1) Asking the server for a **Redirection** to a **Dialog** (e.g. rendered as an Html Page)
|
30 | 2) Performing an **Action** on the **Dialog** (e.g. user clicks a link)
|
31 | 3) Receiving a **Redirection** to the next **Dialog** (e.g. resulting Page is shown)
|
32 |
|
33 | ### Workbenches and Workbench Actions
|
34 | A Dialog flow is initiated by performing a **WorkbenchAction**. A given user may have one or more **Workbench**es
|
35 | which may have one or more **WorkbenchAction**s. These provide entry points into the various application flows and can
|
36 | be thought of as initial 'Menus' with 'Menu Items'. Performing a **WorkbenchAction** will begin the **Dialog**
|
37 | application flow as described above.
|
38 |
|
39 | ### Types of Dialogs
|
40 | **Dialog**s will always be one of two subtypes:
|
41 | 1) An **EditorDialog**
|
42 | This type of **Dialog** is associated with one, single 'data record'
|
43 | E.g. Viewing the 'Details' of a single list item
|
44 | 2) A **QueryDialog** is associated with a list of 'data records'
|
45 | E.g. Viewing a tabular list or a map with location points
|
46 |
|
47 | ### Views and Records
|
48 | A **Dialog** is always associated with a **View** and one or more **Records**. **View**s represent various ways
|
49 | of displaying the 'data record(s)' to the user. **View**s themselves DO NOT contain the 'data record(s)',
|
50 | only information about how it
|
51 | should be displayed.
|
52 | Some types of Views are:
|
53 | 1) **Details** (Properties)
|
54 | 2) **List**
|
55 | 3) **Form** (Layout other Views)
|
56 | 4) **Map**
|
57 | 5) **Graph** (or chart)
|
58 |
|
59 | **Record**s contain the actual business data for display and may be combined with the display metadata provided by
|
60 | the **View**, to render the UI.
|
61 | * A single **Record** may be retrieved directly from an **EditorDialog**, following a **read()** operation.
|
62 | * Multiple **Records** may be retrieved as a **RecordSet** from a **QueryDialog** via the query() method.
|
63 | However, a **QueryScroller** may also be obtained from the **QueryDialog**, and provides a buffer with record
|
64 | pagining functionality.
|
65 |
|
66 | ### Dialog Hierarchies
|
67 | **Dialog**s may be composed of one or more 'child' **Dialog**s. This is typically used to layout a
|
68 | 'Form', such that the top-level is **Dialog** is an **EditorDialog** with a **Form** **View** . The **EditorDialog**
|
69 | will also have a list of 'child' **Dialog**s which will contain the **View**s to be arranged based on the **Form**
|
70 | **View**'s metadata.
|
71 | * When retrieving a new **Dialog** (i.e. following a **DialogRedirection**), the top-level **Dialog** will be an
|
72 | **EditorDialog** with a **Form** **View**
|
73 | * This **Dialog**'s 'child' **Dialogs** will typically be used to compose the UI (**Lists**, Details, Maps, etc.)
|
74 |
|
75 |
|
76 | ### Menus and Actions
|
77 | **View**s are associated with a **Menu**, which may in turn have a list of 'child' **Menu**s, enabling a hierarchical
|
78 | representation of nested menus and menu items. A **Menu** may also have an '**actionId**' which can be used to
|
79 | 'perform an Action' on the associated **Dialog**, typically resulting in the server returning a **Redirection** to
|
80 | another **Dialog** (i.e. resource, page, etc.)
|
81 | * **Actions** are used to transition from one **Dialog** to the next.
|
82 | * **actionId**s are simply strings but are typically retrieved from **Menu**s associated with a **View*````````*
|
83 |
|
84 |
|
85 | ## Dialog model is [here](https://rawgit.com/catavolt-oss/cv-dialog-sdk/master/docs/dialog_model.pdf)
|
86 | ## (early) Api Docs are [here](https://rawgit.com/catavolt-oss/cv-dialog-sdk/master/docs/cv-dialog-sdk/index.html)
|
87 |
|
88 |
|
89 |
|
\ | No newline at end of file |