Building a new component

By DocLab | 10 July, 2017

Building a new component

Assembly

myBoxxd components are built so that they can be copied over a myBoxxd container.

The only exception is the integrated Help where the new help files have to be linked into the existing Help system.


Copy and edit

The best way forward is to take an existing component and to edit it.


Parts to consider

If the app is to be used offline, the assets need to be stored within the myBoxxd container.

The following are a couple of guidelines on how to handle the specific assets.

CSS

css files should be specifically named so that there is no name clashing.

css files are stored in .wiring -> css

Fonts

Font are stored in the .wiring -> fonts.

Naming convention

To make it easier to edit configuration details and to track down bugs, all the fonts have a specific naming convention.

The directory name is the same as that of the font.

CamelCase is used for the names i.e.

DroidSerif

The file names use a “dash” to separate the font name from its attributes i.e.

DroidSerif-Bold.ttf

Demo and test

If the utility is to be installed locally, it is wise to have a demo so that the util installation can be tested on its own.

The demo should be place in .help -> en -> demos.

If you have other language demos please always supply an “en” version as well.

Wiring API files

The component needs a pkgID directory in .wiring -> .info -> pkg.

The name of the pkgID follows the following syntax:

  <name-of-package>-<language>

where the language is the two letter ISO form

See the page for examples of the naming conventions.

Tip: Copy over the contents of another package and edit them.

Help

Please always supply a help file.

The help file should describe what the component is and does.

The help file should be placed in the corresponding directory i.e. if it is a util the help file should be placed in .help -> en -> utils.

Examples of the actual help files within a boxxd can be seen here.


Adding to the library

After you have built it, please send us your component via email, git, etc. so that we can include it in the library.