-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdm_manifest.html
113 lines (101 loc) · 6.49 KB
/
dm_manifest.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
<!DOCTYPE html>
<html>
<head>
<title>skarphed - Documentation</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link href="static/logo_32.png" rel="icon" type="image/png">
<link href="static/mainsite.css" rel="stylesheet" type="text/css">
</head>
<body>
<div id="body_overlay" >
<header>
<div id="headercontent">
<a class="bclink" href="http://skarphed.org">
<img src="static/logo_32.png" alt="skarphed" style="float:left; margin-right: 10px;"></a>
<a class="bclink" href="index.html">Documentation
</a>
<a class="bclink" href="dev_man.html">
→ Developers Manual
</a>
<a class="bclink" href="dm_modules.html">
→ The module-manifest
</a>
</div>
</header>
<div id="space_content">
<span class="headerlink_nohover"><h2> The module-manifest </h2></span>
In a file called manifest.json, you provide metadata information about the module.
The Metadata:
<h3>Attributes of the JSON explained:</h3>
<ul>
<li><b>name</b> - Defines the internal name of the module. It must consist of the name
of the module-developer and the name of the module itself, with a un-
derscore inbetween. This is done to prevent name collisions.
For example: I am grindhold and i develop the module "news", so i call
the module "grindhold_news"</li>
<li><b>hrname</b> - A human readable version of the name. This version of the name will
be displayed everywhere, the Module shows up in GUI-context.</li>
<li><b>version_major</b> - The major version of the module. This number can be chosen freely
But it should only ascend over time</li>
<li><b>version_minor</b> - The minor version of the module. This number can be chosen freely
But it should only ascend over time.</li>
<li><b>permissions</b> - A list of permissions that gets installed with this module.
<li><b>js_mandatory</b> - Defines how this module depends on javascript functionality (rendermode ajax)
'no' means, that javascript is not needed and supported at all. if this
module renders as ajax, it simply returns the pure html output.</li>
'supportet' means, that this module delivers some extra functionality if
rendered with javascript but does not necessarily need it
to work properly
'mandatory' means, that this module wont work only with html and requires
javascript functionality to work properly. only the render_ajax method
of this script works</li>
<li><b>tables</b> - A set of Tables that are to be generated in the database when this module
is installed. Each table consists of a name and a set of columns.
The colums each contain at least a "name" and a "type" the name can
be chosen freely but it is recommended to stick to the skarphed columnstyle
The type must be a valid firebird2.5 compliant columntype e.g. INT or VARCHAR(300)</li>
<li><b>dependencies</b> - The modules that this module depends on. A dependency must at least contain
A valid module name, and the dependency must be available in the repository.
Optionally there can be a version_major and a version_minor-attribute.
If they are set, there must be at least this version installed.</li>
</ul>
<p>
Note that the version of a skarphed-module consists of 3 components in a fashion
of X.Y.Z where X is version_major, Y is version_minor and Z is the revision.
The revision is being set automatically when the developer uploads the module
to a repository.
</p>
<h3>Database definitions</h3>
<p>
If your module needs to store data (which will be true in the most cases), you
are to define the tables, that your module needs. The syntax is as follows:
<table>
<tr>
<td>Element</td>
<td>JSON-Code</td>
</tr>
<tr>
<td>The tables-list</td>
<td><code>"tables":[<table>?,<table>?,...?]</code></td>
</tr>
<tr>
<td>A table</td>
<td><code> {"name":"tablename","columns":[<column>?,<column>?,...?]}</code></td>
</tr>
<tr>
<td>A Column</td>
<td><code> {"name":"columnname", "type":"DATATYPE", "foreign":"tablename.columnname"} </code></td>
</tr>
</table>
The "type"-Attribute of the columns must be a valid datatype of the Firebird
database. Research them in the documentation of Firebird.
Please note that the defined foreign-key may not take any effect by now, but
will in some future release.
</p>
</div>
<footer id="space_footer"></p><a href="../imprint.html">Imprint / Impressum</a></p>
<a rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/"><img alt="Creative Commons License" style="border-width:0" src="http://i.creativecommons.org/l/by-sa/3.0/88x31.png" /></a><br />This work is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/">Creative Commons Attribution-ShareAlike 3.0 Unported License</a>.
</footer>
</div>
</body>
</html>