Welcome to Kognifai Application Framework. This repository guides you to create your first Poseidon Module, Widget, a Kognifai (Yeoman) application and samples for each of them.
| Widget |
|---|
| Creating a widget - This helps you to create your first widget |
| Applying a Widget - this indicates |
| Main Headings | | Main Headings | | --- | | --- |
Creating Kognifai application has its own specifications as it is the same case with any other platforms. Application Framework provides a Visual Studio project template to create the basic artefacts required by Kognifai.
Also, we assume that you are currently running a development instance of Kognifai and have already completed the neccessary steps to run this instance.
To install and configure Kognifai Application Framework, refer to:
You can start building your first Koginifai App by using Yeoman, a scaffolding app. Yeoman app helps you to create the templates for your application. This article provides simple steps on how to use the Yeoman app and the sample codes to jump-start your application development.
After creating an empty kognifai application framework App based on the Yeoman template, you will get the following solution structure:
-
HelloPoseidon.manifest.json
The manifest file is used by the Poseidon Module Installer to register the new module in the DB.
-
HelloPoseidon.module.ts
In this file the root Angular module for the application is registered. Also some additional configuration can be performed, e.g. creating a state, registering the app in the ‘navigationService’, etc.
-
mainView.html
This is the main view of the new application. You can compose your content inside.
-
Locale-en.ts
This file is responsible to store localization of the application. If localization is not a requirement it can be removed.
-
install-module.cmd
This file simplifies the registration of the module in kognifai Application Framework.
-
uninstall-module.cmd
This file simplifies the uninstallation of the module in kognifai Application Framework.
The successfull creation of an empty Poseidon Instruments Package results a sample instrument package structure that can be populated with instruments such as dashboard instruments. This article provides a sample code for a platform instrument that you can use to jump-start your development.
The newly created sample Widgets Package project is the developer’s entry point for creating a new widget. User defined widgets are stored in the widgets project folder.
-
app > instruments > newInstrument > newInstrument.html
This is the main view of the new widget. Here you can compose its layout/content.
sample app > instruments > newInstrument > newInstrument.html
-
app > instruments > newInstrument > newInstrumentConfig.ts
The widget’s config file is used to define the configuration attributes/properties of the widget.
sample app > instruments > newInstrument > newInstrumentConfig.ts code
-
app > instruments > newInstrument > newInstrumentController.ts
It defines how the data is displayed. You can also use the file to: * create your property panel structure, * define custom/private properties (aside from the ones in the ‘config’)
sample app > instruments > newInstrument > newInstrumentController.ts code
-
app > instruments > newInstrument > newInstrumentEdit.html
In this markup file you should define how the property editing panel of your widget will be laid out.
sample app > instruments > newInstrument > newInstrumentEdit.html
-
App > instruments > newInstrument > newInstrumentDataController.ts
In this file you should include any logic that defines how data is edited and loaded in your widget. Also, it is responsible how the data will be updated/refreshed.
sample App > instruments > newInstrument > newInstrumentDataController.ts
-
App > instruments > newInstrument > newInstrumentDirective.ts
It defines the web component that encapsulates the widget UI.
sample App > instruments > newInstrument > newInstrumentDirective.ts
-
App > instruments > newInstrument > newInstrumentRegister.ts
It is used to bootstrap the widget and define its meta properties
sample App > instruments > newInstrument > newInstrumentRegister.ts code
-
Application.manifest.json
The manifest file is used by the Poseidon Module Installer to register the new module in the DB.
-
package.json
The package.json file lists your modules/dependencies and configures how ‘npm’ should behave when installing them.
[
<a href="http://www.youtube.com/watch?v=DgXdvI-Bm_M


