-
Notifications
You must be signed in to change notification settings - Fork 0
Archive Trac demo app tree
Legacy Trac archive page imported from
demo_app_tree. Source: https://genapp.rocks/wiki/wiki/demo_app_tree. Review age, links, and examples before treating as current.
- The directory structure of the Demo application (as well as of any other typical GenApp generated application) is the following:
./demo/
|-- appconfig.json
|-- appconfig.json.template
|-- bin
| |-- energy
| |-- mass_energy.py
| |-- mass_energy.pyc
| `-- penergy
|-- directives.json
|-- directives.json.template
|-- menu.json
|-- modules
| |-- energy.json
| `-- penergy.json
|-- output
| |-- html5
| `-- qt4
`-- pngs
|-- admin.png
`-- simulate.png
-
All .json files - in the base ({{{demo/}}}) and {{{modules/}}} directories - are described in the next section. In the remainder of this tutorial we will modify ONLY these files and see how these modifications affect the resulting application.
- {{{menu.json}}}, {{{appconfig.json}}}, and {{{directives.json}}} in the base directory are called global definition files as they define the framework and layout of the entire application. They are present in all GenApp produced applications and, generally, differ by only few primary application specific attributes, such as the application title, default colors and which target languages to produce.
- JSON files residing in the {{{modules/}}} directory are the module definition files; they define layout of individual modules within the application and are module specific.
-
Directory {{{bin/}}} contains underlying executable for the modules; executables can be written in any general purpose programming language (Perl, Python, C++ etc.) Besides dealing with the global and module definition files listed above, the user has to also ensure that executables accept JSON formatted input and produce JSON formatted output as defined in the respective module definition files. This GenApp architecture requirement is already met in the Demo application we just downloaded. Detailed discussion on how to "wrap" executables (written in different languages) in order to accept and produce JSON input and output is out of the scope of the present tutorial and is presented elsewhere. At the same time, for the sake of completeness the code snippets of the {{{bin/penergy}}} executable responsible for accepting and producing JSON formatted inputs and outputs will be demonstrated in the last section.
-
Directory {{{output/}}} contains system files necessary for producing Demo in 2 target languages: (1) html5 (web-application), and (2) qt4 (stand-alone application). In what follows we will discuss ONLY web version of the Demo.
-
Directory {{{png/}}} contains auxiliary system files, the images for web-application icons (e.g. see the icon next to the "Simulate" in the picture of previous section).